Skip to content

Commit 30f2a51

Browse files
Merge branch 'v1.x' into fix/registerToolTask-v1
2 parents 9a17341 + 2a15851 commit 30f2a51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+6206
-720
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@modelcontextprotocol/sdk': patch
3+
---
4+
5+
Add `url` property to `RequestInfo` interface as a `URL` type, exposing the full request URL to server handlers. The URL is unified across all HTTP transports (SSE and Streamable HTTP) to always provide the complete URL including protocol, host, and path.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@modelcontextprotocol/sdk': patch
3+
---
4+
5+
The authorization handler now applies RFC 8252 §7.3 loopback port relaxation when validating `redirect_uri` against a client's registered URIs. For `localhost`, `127.0.0.1`, and `[::1]` hosts, any port is accepted as long as scheme, host, path, and query match. This fixes native
6+
clients that obtain an ephemeral port from the OS but register a portless loopback URI (e.g., via CIMD / SEP-991).

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'github-actions'
4+
directory: '/'
5+
schedule:
6+
interval: monthly
7+
groups:
8+
github-actions:
9+
patterns:
10+
- '*'

.github/workflows/conformance.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Conformance Tests
2+
3+
on:
4+
push:
5+
branches: [v1.x]
6+
pull_request:
7+
branches: [v1.x]
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: conformance-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
client-conformance:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 24
25+
cache: npm
26+
- run: npm ci
27+
- run: npm run build
28+
- run: npm run test:conformance:client:all
29+
30+
server-conformance:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version: 24
37+
cache: npm
38+
- run: npm ci
39+
- run: npm run build
40+
- run: npm run test:conformance:server

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ jobs:
7070
# Check if this is a beta release
7171
if [[ "$VERSION" == *"-beta"* ]]; then
7272
echo "tag=--tag beta" >> $GITHUB_OUTPUT
73-
# Check if this release is from a non-main branch (patch/maintenance release)
74-
elif [[ "${{ github.event.release.target_commitish }}" != "main" ]]; then
73+
# Check if this release is from a non-primary branch (patch/maintenance release)
74+
elif [[ "${{ github.event.release.target_commitish }}" != "main" && "${{ github.event.release.target_commitish }}" != "v1.x" ]]; then
7575
# Use "release-X.Y" as tag for old branch releases (e.g., "release-1.23" for 1.23.x)
7676
# npm tags are mutable pointers to versions (like "latest" pointing to 1.24.3).
7777
# Using "release-1.23" means users can `npm install @modelcontextprotocol/sdk@release-1.23`

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,4 @@ dist/
133133

134134
# IDE
135135
.idea/
136+
test/conformance/node_modules/

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ npm run typecheck # Type-check without emitting
2222
- **Files**: Lowercase with hyphens, test files with `.test.ts` suffix
2323
- **Imports**: ES module style, include `.js` extension, group imports logically
2424
- **Formatting**: 2-space indentation, semicolons required, single quotes preferred
25-
- **Testing**: Co-locate tests with source files, use descriptive test names
25+
- **Testing**: Co-locate tests with source files, use descriptive test names. Use `vi.useFakeTimers()` instead of real `setTimeout`/`await` delays in tests
2626
- **Comments**: JSDoc for public APIs, inline comments for complex logic
2727

2828
## Architecture Overview

DEPENDENCY_POLICY.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dependency Policy
2+
3+
As a library consumed by downstream projects, the MCP TypeScript SDK takes a conservative approach to dependency updates. Dependencies are kept stable unless there is a specific reason to update, such as a security vulnerability, a bug fix, or a need for new functionality.
4+
5+
## Update Triggers
6+
7+
Dependencies are updated when:
8+
9+
- A **security vulnerability** is disclosed (via GitHub security alerts).
10+
- A bug in a dependency directly affects the SDK.
11+
- A new dependency feature is needed for SDK development.
12+
- A dependency drops support for a Node.js version the SDK still targets.
13+
14+
Routine version bumps without a clear motivation are avoided to minimize churn for downstream consumers.
15+
16+
## What We Don't Do
17+
18+
The SDK does not run scheduled version bumps for npm dependencies. Updating a dependency can force downstream consumers to adopt that update transitively, which can be disruptive for projects with strict dependency policies.
19+
20+
Dependencies are only updated when there is a concrete reason, not simply because a newer version is available.
21+
22+
## Automated Tooling
23+
24+
- **GitHub security updates** are enabled at the repository level and automatically open pull requests for npm packages with known vulnerabilities. This is a GitHub repo setting, separate from the `dependabot.yml` configuration.
25+
- **GitHub Actions versions** are kept up to date via Dependabot on a monthly schedule (see `.github/dependabot.yml`).
26+
27+
## Pinning and Ranges
28+
29+
Production dependencies use caret ranges (`^`) to allow compatible updates within a major version. Exact versions are pinned only when necessary to work around a specific issue.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ For more details on how to run these examples (including recommended commands an
154154
- [docs/server.md](docs/server.md) – building and running MCP servers, transports, tools/resources/prompts, CORS, DNS rebinding, and multi-node deployment.
155155
- [docs/client.md](docs/client.md) – using the high-level client, transports, backwards compatibility, and OAuth helpers.
156156
- [docs/capabilities.md](docs/capabilities.md) – sampling, elicitation (form and URL), and experimental task-based execution.
157+
- [docs/protocol.md](docs/protocol.md) – protocol features: ping, progress, cancellation, pagination, capability negotiation, and JSON Schema.
157158
- [docs/faq.md](docs/faq.md) – environment and troubleshooting FAQs (including Node.js Web Crypto support).
158159
- External references:
160+
- [V1 API reference](https://modelcontextprotocol.github.io/typescript-sdk/)
161+
- [V2 API reference](https://modelcontextprotocol.github.io/typescript-sdk/v2/)
159162
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
160163
- [MCP Specification](https://spec.modelcontextprotocol.io)
161164
- [Example Servers](https://github.com/modelcontextprotocol/servers)

ROADMAP.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Roadmap
2+
3+
## Spec Implementation Tracking
4+
5+
The SDK tracks implementation of MCP spec components via GitHub Projects, with a dedicated project board for each spec revision. For example, see the [2025-11-25 spec revision board](https://github.com/orgs/modelcontextprotocol/projects/26).
6+
7+
## Current Focus Areas
8+
9+
### Next Spec Revision
10+
11+
The next MCP specification revision is being developed in the [protocol repository](https://github.com/modelcontextprotocol/modelcontextprotocol). Key areas expected in the next revision include extensions and stateless transports.
12+
13+
The SDK has historically implemented spec changes promptly as they are finalized, with dedicated project boards tracking component-level progress for each revision.
14+
15+
### v2
16+
17+
A major version of the SDK is in active development, tracked via [GitHub Project](https://github.com/orgs/modelcontextprotocol/projects/31). Target milestones:
18+
19+
- **Alpha**: ~mid-March 2026
20+
- **Beta**: ~May 2026
21+
22+
The v2 release is planned to align with the next spec release, expected around mid-2026.

0 commit comments

Comments
 (0)