Skip to content

Conversation

@jerome3o-anthropic
Copy link
Member

@jerome3o-anthropic jerome3o-anthropic commented Dec 5, 2025

Summary

  • Add dev-with-mitm.sh for TUI-based traffic inspection using mitmproxy
  • Add dev-with-mitmweb.sh for web UI-based traffic inspection using mitmweb
  • Fix missing id field in JSON-RPC error responses (required by JSON-RPC 2.0 spec)
  • Migrate from zod-to-json-schema to Zod v4's native z.toJSONSchema()
  • Bump @modelcontextprotocol/sdk from PR preview to ^1.24.2

Details

Dev scripts

The mitmproxy scripts help developers debug MCP traffic by running the server through a reverse proxy that intercepts all client requests:

# TUI mode - run server and mitmproxy with interactive TUI
./dev-with-mitm.sh

# Web UI mode - run server and mitmproxy with web interface at http://localhost:8081
./dev-with-mitmweb.sh

Both scripts:

  • Start the MCP server on port 3232
  • Start mitmproxy reverse proxy on port 8080
  • Clean up both processes on Ctrl+C

JSON-RPC fix

The JSON-RPC 2.0 spec requires an id field in error responses. Added "id": null to all error responses in shttp.ts.

Zod migration

Replaced zod-to-json-schema with Zod v4's built-in z.toJSONSchema() for tool input schema generation.

SDK bump

Replaced the pkg.pr.new preview URL (PR #1189) with the official npm release now that the MCP_DEV_MODE HTTP issuer changes have been merged and published.

Test plan

  • Verify dev scripts start both server and mitmproxy
  • Verify JSON-RPC error responses include id field
  • Verify tool schemas are generated correctly
  • Verify build/lint/tests pass with new SDK version

🤖 Generated with Claude Code

jerome3o-anthropic and others added 2 commits December 5, 2025 13:35
- Add dev-with-mitm.sh for TUI-based traffic inspection
- Add dev-with-mitmweb.sh for web UI-based traffic inspection
- Fix missing 'id' field in JSON-RPC error responses (required by spec)
- Migrate from zod-to-json-schema to Zod v4's native z.toJSONSchema()

The mitmproxy scripts help developers debug MCP traffic by running
the server through a reverse proxy that intercepts all client requests.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace the pkg.pr.new preview URL (PR #1189) with the official npm
release now that the changes have been merged and published.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@jerome3o-anthropic jerome3o-anthropic force-pushed the jerome/dev-scripts-and-fixes branch from a19dd71 to e6f4377 Compare December 7, 2025 17:22
@jerome3o-anthropic jerome3o-anthropic merged commit d87c126 into main Dec 7, 2025
4 checks passed
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.

2 participants