Skip to content

chore: Upgrade @modelcontextprotocol/sdk to ^1.25.3 - #759

Merged
dcramer merged 1 commit into
mainfrom
upgrade-mcp-sdk-1.25.3
Jan 31, 2026
Merged

dcramer merged 1 commit into
mainfrom
upgrade-mcp-sdk-1.25.3

Conversation

@dcramer

@dcramer dcramer commented Jan 31, 2026

Copy link
Copy Markdown
Member

Summary

Changes

This is a minimal upgrade that only bumps the MCP SDK version. The agents package remains at 0.2.23 to avoid requiring the AI SDK v6 upgrade that agents 0.3.x requires.

Key SDK changes (1.21.0 → 1.25.3)

Notable changes from the changelog:

  • v1.25.0: SPEC COMPLIANCE - Remove loose/passthrough types not allowed/defined by MCP spec
  • Various bug fixes and improvements

Risk Assessment

Test plan

  • All unit tests pass (628 tests)
  • Type checking passes
  • Deploy to staging and verify MCP connections work
  • Monitor Sentry logs for any 400 errors with empty grantedSkills

Closes #756

🤖 Generated with Claude Code

This upgrades the MCP SDK from ^1.21.0 to ^1.25.3, bringing in the
latest spec compliance fixes and improvements.

Part of investigation into #756 - the diagnostic logging from PR #758
will help identify if any issues arise from this upgrade.

Note: The agents package remains at 0.2.23 to avoid requiring the
AI SDK v6 upgrade that agents 0.3.x requires.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@dcramer
dcramer merged commit 486becd into main Jan 31, 2026
13 checks passed
@dcramer
dcramer deleted the upgrade-mcp-sdk-1.25.3 branch January 31, 2026 02:43
dcramer added a commit that referenced this pull request Jan 31, 2026
dcramer added a commit that referenced this pull request Jan 31, 2026
## Summary
Reverts #759 to restore MCP server functionality.

## Problem
The MCP SDK upgrade caused a **protocol version mismatch**:
- Claude Code sends: `MCP-Protocol-Version: 2025-11-25`
- Our server (via `[email protected]`) only supports: `2025-03-26,
2025-06-18`

The SDK upgrade alone doesn't help because protocol version support
comes from the `agents` package, not the MCP SDK.

## Root Cause
Supporting protocol `2025-11-25` requires:
- `[email protected]+` (uses MCP SDK 1.25.2 with the newer protocol)
- `[email protected]` (required by agents 0.3.x)
- This is a significant migration with breaking changes

## Next Steps
- AI SDK 6 migration tracked separately in #756
- This revert restores service for users on older Claude Code versions

Fixes #756

🤖 Generated with [Claude Code](https://claude.com/claude-code)
dcramer added a commit that referenced this pull request Feb 3, 2026
Upgrade to AI SDK 6.x to support MCP protocol version `2025-11-25`.

This upgrade enables compatibility with `[email protected]+` which is
required for the latest MCP protocol features.

## Package Changes

| Package | Before | After |
|---------|--------|-------|
| `ai` | ^4.3.16 | ^6.0.64 |
| `agents` | ^0.2.23 | ^0.3.6 |
| `@ai-sdk/anthropic` | ^1.2.12 | ^3.0.33 |
| `@ai-sdk/openai` | ^1.3.22 | ^3.0.23 |
| `@ai-sdk/react` | ^1.2.12 | ^3.0.66 |
| `@ai-sdk/mcp` | (new) | ^1.0.16 |
| `@modelcontextprotocol/sdk` | ^1.21.0 | ^1.25.3 |

## API Migrations

- **MCP client imports**: `experimental_createMCPClient` moved from
`"ai"` to `"@ai-sdk/mcp"`
- **Type rename**: `LanguageModelV1` → `LanguageModel` (now a union
type)
- **Step control**: `maxSteps: N` → `stopWhen: stepCountIs(N)`
- **Tool API**: `parameters` → `inputSchema`, `execute(params)` →
`execute(input, options)`
- **Tool call capture**: `toolCall.args` → `toolCall.input`

This branch includes a revert of #759 as the base, then applies the full
AI SDK 6.x migration on top.

---------

Co-authored-by: Claude Opus 4.5 <[email protected]>
BYK pushed a commit that referenced this pull request Sep 23, 2026
)

In #759 I added the headers and missed that there is also a `bundle.ts`
that has stringified types in it. With that we 1. add the missing
`headers` type and 2. derive the types directly from
`src/lib/sdk-types.ts` - not sure if you're ok with the latter. I could
also trim down the PR to just add the `headers` type as string

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
BYK pushed a commit that referenced this pull request Sep 30, 2026
)

In #759 I added the headers and missed that there is also a `bundle.ts`
that has stringified types in it. With that we 1. add the missing
`headers` type and 2. derive the types directly from
`src/lib/sdk-types.ts` - not sure if you're ok with the latter. I could
also trim down the PR to just add the `headers` type as string

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
mr-danya pushed a commit to mr-danya/sentry-mcp that referenced this pull request Oct 6, 2026
…tsentry#1500)

In getsentry#759 I added the headers and missed that there is also a `bundle.ts`
that has stringified types in it. With that we 1. add the missing
`headers` type and 2. derive the types directly from
`src/lib/sdk-types.ts` - not sure if you're ok with the latter. I could
also trim down the PR to just add the `headers` type as string

---------

Co-authored-by: Claude Opus 5 <[email protected]>
Co-authored-by: jared-outpost[bot] <jared-outpost[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Investigate: 400 error on MCP endpoint - empty grantedSkills after SDK upgrade

1 participant