Repository navigation
feat!: move to MCP TypeScript SDK v2 - #46
Merged
Merged
Conversation
Swaps @modelcontextprotocol/sdk 1.x for @modelcontextprotocol/server 2.3.1 (and @modelcontextprotocol/client as a dev dependency for the scripts and tests), same as mapbox/mcp-server#296. The v1-to-v2 codemod did the imports and context types. No tool has an output schema, so v2's strict output validation doesn't apply. Adds a test that installs every tool and resource on a real v2 McpServer, since the tool tests call run() directly and never touch the SDK. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Open
4 tasks
Adds npm run typecheck (tsc over src and test) as a CI step, fixes the one error it found, and sets noEmit in tsconfig.test.json so tsc can't write .js files next to the sources. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ctufts
approved these changes
Oct 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of mapbox/mcp-server#245, same move as mapbox/mcp-server#296.
Moves us from
@modelcontextprotocol/sdk1.x to the v2 SDK package (@modelcontextprotocol/server2.3.1).What changed
Mostly the official codemod (
npx @modelcontextprotocol/codemod v1-to-v2 .). This repo had no SDK patch and no tool output schemas, so v2's stricter output validation doesn't apply here. Beyond that:@modelcontextprotocol/clientis a dev dependency (tests andscripts/test-resources.ts).run()directly and never touch the SDK, so there's a newtest/sdkRegistration.test.tsthat installs every tool and resource on a real v2McpServerand checkstools/list, atools/call,resources/listandresources/read.SearchDocsTool.test.ts;tsconfig.test.jsonis now clean.Clients
Nothing changes. It still negotiates 2025-11-25.
Heads up
installTo(server)needs a v2McpServer, so hosted pins v2 releases of all three server packages together.lenientOutputSchema, or v2 will fail calls on any mismatch.require(import.metainsrc/utils/versionUtils.ts). Hosted uses ESM so it isn't affected. Left for a separate fix.Testing
npm test: 9 files, 88 tests passing (3 new)tsconfig.src.jsonandtsconfig.test.jsonboth 0 errors; build passessearch_mapbox_docs_toolandget_document_toolcalls, clean stderr🤖 Generated with Claude Code