git: the string "null" for base_branch, contains or not_contains arrives as None (python-sdk#3055)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github, typescript
- Domain
- backend-api-design, testing
Research direction
Start in src/git and inspect its SDK lockfile and protocol tests for git_create_branch and git_branch. Check the Python SDK release that fixes python-sdk#3055, then add protocol coverage for base_branch, contains, and not_contains. Done means the fixed SDK release is locked and each test confirms the literal "null" reaches the tool as a string.
Written by the indexing model from the issue text.
Description
Since #5174 (#5175), the git server is built on MCPServer. Before validating arguments, the SDK's FuncMetadata.pre_parse_json JSON-decodes every string argument whose annotation is not exactly str. For the git server's three str | None parameters, that turns the literal string "null" into None:
| Tool | Parameter | Effect of "null" |
|---|---|---|
git_create_branch |
base_branch |
Branches from the current branch, not from a branch named null |
git_branch |
contains |
The filter is silently dropped |
git_branch |
not_contains |
The filter is silently dropped |
All three advertise anyOf: [string, null], so "null" is a valid string value. Before #5175, the server received it unchanged.
Upstream: modelcontextprotocol/python-sdk#3055 (open), with the fix in python-sdk#3056. A comment there already reproduces this "null" → None case.
Done when
The SDK release that fixes python-sdk#3055 is locked in src/git, with a protocol test for each parameter showing that "null" reaches the tool as the string "null". Before then, a workaround in the server (declaring the parameters as str with a custom validator and a hand-written schema) is not wanted: these servers are meant to show the plain high-level API. Found in the Copilot review of #5175.
- Dominant language
- TypeScript
- Stars
- 91.7k
- Forks
- 11.9k
- Avg merge
- 3h 30m
- Merged PRs (30d)
- 204
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from modelcontextprotocol/servers
-
bug v2
Difficulty 1/5 Under an hour Newbie friendliness 88/100
modelcontextprotocol/servers#5483 ·
Maintainers usually reply within 1 day
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
modelcontextprotocol/servers#5482 ·
Maintainers usually reply within 1 day
-
chore dependencies server-filesystem v2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/servers#5481 · 1 comment ·
Maintainers usually reply within 1 day
-
chore v2
Difficulty 4/5 3-5 days Newbie friendliness 45/100
modelcontextprotocol/servers#5463 ·
Maintainers usually reply within 1 day
-
bug server-filesystem v2
Difficulty 5/5 Over a week Newbie friendliness 25/100
modelcontextprotocol/servers#5260 · 3 comments ·
Maintainers usually reply within 1 day
All issues in modelcontextprotocol/servers
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
🐛 bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
LibreChat-AI/LibreChat#17875 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
category:helper tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
LanternOps/breeze#11285 ·
Maintainers usually reply within 1 day
-
area: core area: docs good first issue help wanted lane: free-agent priority: P3 roadmap size: XS type: task
Difficulty 1/5 Under an hour Newbie friendliness 86/100
arminazimi/seaworthy#701 ·
Maintainers usually reply within 1 day