Repository navigation
fix(git): handle input without crashing - #4214
KonecSvetta wants to merge 1 commit into
Conversation
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Verified MCP server implementation for consistency with current SDK patterns.
|
Thank you for this pull request, and apologies for the long wait for a response. Since it was opened, the reference servers have been rebuilt for the 2026-07-28 MCP specification (#4857) and released as v2 (2.0.0 on npm for the TypeScript servers, 2026.10.19 on PyPI for the Python servers). The code this PR changes has been replaced, and the behavior it addresses has either been fixed in v2 or no longer exists in the same form. This is not a judgment on the change or on you; it's a consequence of the code it targets having been replaced. If the problem still happens on v2, please open a fresh issue with the version you're running and steps to reproduce. Note that this repository now accepts contributions as issues rather than pull requests from anyone but its maintainers; see This is part of the backlog triage in #4875. |
Description
This PR changes
mcp-server-gitto run the stdio server withraise_exceptions=Falseinstead ofraise_exceptions=True.With
raise_exceptions=True, JSON-RPC input can cause exceptions from stdin parsing to propagate into the server task group and terminate the process. With the default behavior, the server reports the error back to the client as a JSON-RPC error and keeps running.Fixes #4213.
Publishing Your Server
N/A — this PR modifies an existing reference server and does not add a new server.
Server Details
Motivation and Context
mcp-server-gitcurrently differs from reference servers such asmcp-server-timeandmcp-server-sqlite, which use the defaultraise_exceptions=Falsebehavior.A similar issue was previously fixed for
mcp-server-fetchin PR #3515. This PR applies the same kind of follow-up cleanup tomcp-server-git.The change prevents malformed or unparseable JSON-RPC input from terminating the server process.
How Has This Been Tested?
Tested with the reproducer from #4213:
mcp-server-gitto exit with code 1 and print aValidationError: recursion limit exceeded;Also verified that normal initialization and tool calls still work.
Breaking Changes
None. This is a non-breaking robustness fix.
Types of changes
Checklist
Additional context
This is a one-line change: