feat: Add VS Code MCP client compatibility#123
Open
trickyfalcon wants to merge 1 commit intoGitGuardian:mainfrom
Open
feat: Add VS Code MCP client compatibility#123trickyfalcon wants to merge 1 commit intoGitGuardian:mainfrom
trickyfalcon wants to merge 1 commit intoGitGuardian:mainfrom
Conversation
VS Code's MCP client has several incompatibilities with the protocol features enabled by FastMCP 2.x + mcp 1.24 (protocol version 2025-11-25). This causes silent failures when trying to use the GitGuardian MCP server from VS Code. This patch addresses the following issues: 1. **Protocol version**: Force 2024-11-05 (the stable version VS Code supports) instead of 2025-11-25 which enables unsupported features. 2. **outputSchema**: Disable auto-generated outputSchema from Pydantic return types - VS Code silently fails to call tools that include it. 3. **structuredContent**: Strip structuredContent from CallToolResult responses - VS Code doesn't support this 2025-11-25 feature. 4. **$ref/$defs in inputSchema**: Inline all JSON Schema references to produce flat schemas - VS Code can't resolve $ref/$defs references. 5. **Tasks capability**: Patch server to not advertise tasks capability - VS Code may try to use the task protocol causing "no response" errors. 6. **FastMCP _meta field**: Disable include_fastmcp_meta to prevent _meta fields in tool definitions that VS Code doesn't understand. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Collaborator
|
Hello @trickyfalcon Thanks for reporting this. The package now uses FastMCP 3.x. Can you check if it solves your issue ? |
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.
Summary
VS Code's MCP client has several incompatibilities with the protocol features enabled by FastMCP 2.x + mcp 1.24 (protocol version 2025-11-25), causing silent failures when trying to use the GitGuardian MCP server from VS Code. This PR fixes all known incompatibilities:
2024-11-05(the stable version VS Code supports) instead of2025-11-25outputSchema: VS Code silently fails to call tools that include auto-generatedoutputSchemafrom Pydantic return typesstructuredContent: RemovesstructuredContentfromCallToolResultresponses (unsupported 2025-11-25 feature)$ref/$defsininputSchema: Flattens JSON Schema references that VS Code's MCP client cannot resolvetaskscapability: VS Code may attempt to use the task protocol, causing "no response" errors_metafield: Prevents_metafields in tool definitions that VS Code doesn't understandProblem
When using the GitGuardian MCP server with VS Code, tools either don't appear or fail silently when called. This is because FastMCP 2.x negotiates protocol version 2025-11-25 which includes features VS Code hasn't implemented yet. The failures are silent — no error messages are shown to the user, tools simply don't work.
Changes
All changes are in
packages/gg_api_core/src/gg_api_core/mcp_server.py:_resolve_schema_refs()helper to inline$ref/$defsin JSON Schemasmcp.server.sessionto advertise protocol version2024-11-05__init__to disableinclude_fastmcp_metaand patch outtaskscapabilitytool()to forceoutput_schema=None_call_tool_mcp()to stripstructuredContentfrom results_list_tools_mcp()to flatten$ref/$defsin tool schemasTest plan
2024-11-05🤖 Generated with Claude Code