Skip to content

Move MCP templates to the v2 SDKs - #21

Merged
Larry-Osakwe merged 1 commit into
mainfrom
larry/templates-mcp-v2
Aug 7, 2026
Merged

Move MCP templates to the v2 SDKs#21
Larry-Osakwe merged 1 commit into
mainfrom
larry/templates-mcp-v2

Conversation

@Larry-Osakwe

Copy link
Copy Markdown
Contributor

Final PR of the MCP v2 cutover. keycardai-mcp 2.0.0 and @keycardai/mcp 2.0.0 are published, so the five templates on the v1 line move over. Go templates are untouched (no Go v2; they got v1.7.0 in #19).

Python — 2 templates

  • keycardai-mcp>=2,<3, interim mcp<2.0 pins from Bump MCP dependencies across templates #19 removed
  • mcp.server.fastmcpmcp.server.mcpserver; streamable_http_path moved from the constructor to streamable_http_app()
  • Both resolve keycardai-mcp 2.0.0 + mcp 2.0.0 and import clean

TypeScript — 3 templates

  • @keycardai/mcp ^2.0.0; v1 @modelcontextprotocol/sdk replaced by the v2 split: /server + /node for servers, /client for clients (Client, StreamableHTTPClientTransport, and the PRM discovery helpers all export from its root)
  • server.tool(name, desc, shape, cb)registerTool(name, {description, inputSchema}, cb)
  • Tool handlers read auth from ctx.http.authInfo (was extra.authInfo)
  • zod ^4: v2 types its schema overloads against zod 4, and z.record now requires an explicit key type
  • All three typecheck and build

The brokered TS template and snowflake-wif exercise the v2 client path (including PRM discovery), which the server templates don't — so this PR's CI run is also the first live test of that half against published packages.

CI verifies every changed template against a real ephemeral zone.

🤖 Generated with Claude Code

keycardai-mcp 2.0.0 (PyPI) and @keycardai/mcp 2.0.0 (npm) shipped, so
the five templates that were pinned to the v1 line move over.

Python (mcp-server-python-mcp, mcp-brokered-credentials-python):
keycardai-mcp>=2,<3, drop the interim mcp<2.0 pins. Source:
mcp.server.fastmcp -> mcp.server.mcpserver, and streamable_http_path
moved from the MCPServer constructor to streamable_http_app().

TypeScript (mcp-server-typescript-express,
mcp-brokered-credentials-typescript, autonomous-agent-snowflake-wif):
@keycardai/mcp ^2.0.0 and the v2 package split, server code on
@modelcontextprotocol/server + /node, client code on
@modelcontextprotocol/client (Client, StreamableHTTPClientTransport and
the PRM discovery helpers all export from its root). server.tool() is
gone in v2, replaced with registerTool(name, config, cb). Handler
context carries auth at ctx.http.authInfo instead of ctx.authInfo. zod
moves to ^4 (v2 types its schema overloads against zod 4, and z.record
now requires an explicit key type).

Verified locally: both Python templates resolve keycardai-mcp 2.0.0 with
mcp 2.0.0 and import clean; all three TypeScript templates typecheck and
build. The repo CI verifies each against a live ephemeral zone.

Go templates are untouched: no Go v2 exists and they moved to go-sdk
v1.7.0 in #19.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm snowflake-sdk is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: autonomous-agent-snowflake-wif/package-lock.jsonnpm/snowflake-sdk@2.4.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/snowflake-sdk@2.4.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@Larry-Osakwe
Larry-Osakwe merged commit c2b07c9 into main Aug 7, 2026
10 checks passed
@Larry-Osakwe
Larry-Osakwe deleted the larry/templates-mcp-v2 branch August 7, 2026 16:10
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.

1 participant