MCP: initialize fails with -32603 when a client sends object-valued experimental capabilities (breaks Codex CLI integration)
@NghiaTranUIT is already working on this.
Since Sep 30, 2026.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start at the bundled /Applications/Proxyman.app/Contents/MacOS/mcp-server entry point and trace decoding of the MCP initialize request, especially ClientCapabilities.experimental. Reproduce the object-valued capability case with the provided stdio script; done means initialize succeeds for arbitrary experimental values and Codex can list and call tools.
Written by the indexing model from the issue text.
Description
Summary
Proxyman's bundled mcp-server rejects the MCP initialize handshake with
-32603 Internal error: The data couldn't be read because it isn't in the correct format.
whenever the client advertises an experimental client capability whose value is not a string.
The MCP specification defines ClientCapabilities.experimental as a map of capability
names to arbitrary objects. OpenAI's Codex CLI always advertises
experimental: {"codex/auth-change": {}}, so Proxyman's MCP server cannot be used
from Codex at all — the server fails before any tool becomes available.
Claude Code is unaffected because it does not send an experimental field.
Environment
| Proxyman | 26.0.1 (build 260001), direct download (non-Setapp) |
| macOS | 26.6.2 (25G83), Apple Silicon (arm64) |
| Server binary | /Applications/Proxyman.app/Contents/MacOS/mcp-server |
| Client | Codex CLI 0.158.0 |
| Protocol version | 2025-06-18 |
Reproduction
Minimal script — drives mcp-server over stdio and varies only the value type inside
capabilities.experimental:
#!/usr/bin/env python3
import json, subprocess, threading, time
SERVER = ['/Applications/Proxyman.app/Contents/MacOS/mcp-server']
def probe(label, caps):
p = subprocess.Popen(SERVER, stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.DEVNULL)
out = []
threading.Thread(target=lambda: [out.append(l) for l in p.stdout], daemon=True).start()
req = {"jsonrpc": "2.0", "id": 1, "method": "initialize",
"params": {"protocolVersion": "2025-06-18", "capabilities": caps,
"clientInfo": {"name": "probe", "version": "1"}}}
p.stdin.write((json.dumps(req) + "\n").encode()); p.stdin.flush()
time.sleep(2)
try: p.terminate(); p.wait(timeout=2)
except Exception: p.kill()
verdict = "no response"
if out:
d = json.loads(out[0].decode('utf-8', 'replace'))
verdict = "FAIL: " + d['error']['message'] if 'error' in d else "OK"
print(f"{label:46s} -> {verdict}")
probe('capabilities: {}', {})
probe('experimental: {}', {"experimental": {}})
probe('experimental: {"foo": "bar"} (string)', {"experimental": {"foo": "bar"}})
probe('experimental: {"foo": {}} (object)', {"experimental": {"foo": {}}})
probe('experimental: {"foo": 123} (number)', {"experimental": {"foo": 123}})
probe('experimental: {"foo": null} (null)', {"experimental": {"foo": None}})
probe('experimental: {"codex/auth-change": {}}', {"experimental": {"codex/auth-change": {}}})
Observed output
capabilities: {} -> OK
experimental: {} -> OK
experimental: {"foo": "bar"} (string) -> OK
experimental: {"foo": {}} (object) -> FAIL: Internal error: The data couldn't be read because it isn't in the correct format.
experimental: {"foo": 123} (number) -> FAIL: Internal error: The data couldn't be read because it isn't in the correct format.
experimental: {"foo": null} (null) -> FAIL: Internal error: The data couldn't be read because it isn't in the correct format.
experimental: {"codex/auth-change": {}} -> FAIL: Internal error: The data couldn't be read because it isn't in the correct format.
Only string values decode. The capability name is irrelevant — "foo" fails exactly
like "codex/auth-change", so this is not a key-format (slash) problem.
Root cause
This matches a known upstream defect in the official Swift MCP SDK, which models the
field as [String: String]? instead of a map to arbitrary JSON values:
- modelcontextprotocol/swift-sdk#287 —
ClientCapabilities.experimentalfails to decode object-valued capabilities (open, affects 0.12.1 and HEAD)
The same bug has hit several other Swift-based MCP servers, all of which fixed it on
their side while the SDK issue remains open:
- openclaw/Peekaboo#745 (fixed)
- repoprompt/repoprompt-ce#995 (fixed)
- MongLong0214/logic-pro-mcp#1051 (fix PR)
- openai/codex#45269, openai/codex#45889 (Codex-side reports)
Expected behavior
Per the MCP spec, experimental values are arbitrary objects. An unknown or
unparseable optional capability must not fail initialize — it should be ignored so
the handshake completes and tools become available.
Suggested fix
Decode experimental as [String: JSONValue]? (or equivalent), or decode it leniently
and drop entries the server does not understand. The workaround adopted by the other
affected servers is to keep string values and discard every other type rather than
failing the whole request; decoding to a permissive JSON value type is cleaner and
spec-correct.
Because the field is optional and Proxyman does not appear to consume it, simply
ignoring undecodable entries would be sufficient.
Current workaround (user side)
A stdio shim that strips the offending key from initialize before forwarding to
mcp-server restores full functionality — after it, tools/list returns all 72 tools
and tools/call works normally. This confirms the failure is isolated to decoding this
one optional field, and that nothing else in the server is affected.
- Dominant language
- No language data
- Stars
- 7.1k
- Forks
- 238
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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 ProxymanApp/Proxyman
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 52/100
ProxymanApp/Proxyman#2821 ·
-
Could not observe system extension changesPossibly taken @NghiaTranUIT claimed this 2 days ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 45/100
ProxymanApp/Proxyman#2819 · 2 comments · 1 assignee ·
-
启动后约 6 秒崩溃Possibly taken @NghiaTranUIT claimed this 8 days ago. Open✅ Done bug
ProxymanApp/Proxyman#2818 · 2 comments · 1 assignee ·
-
[iPadOS] Local VPN toggle does not turn on and VPN profile is not created in iPadOS SettingsPossibly taken @NghiaTranUIT claimed this 9 days ago. Openbug
ProxymanApp/Proxyman#2817 · 1 comment · 1 assignee ·
-
Factory Reset in proxyman-cliPossibly taken @NghiaTranUIT claimed this 8 days ago. Open✅ Done enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ProxymanApp/Proxyman#2816 · 1 comment · 1 assignee ·
All issues in ProxymanApp/Proxyman
Similar issues
-
area:print-dispatch
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
clawsweeper:fix-shape-clear clawsweeper:needs-maintainer-review clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:crash-loop issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openclaw/openclaw#211919 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
thisnick/agent-wechat#908 ·
Maintainers usually reply within 1 day
-
bug sweep
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bketelsen/truenas-mcp#120 ·
Maintainers usually reply within 1 day
-
新功能建议
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Mai-with-u/MaiBot#2583 ·
Maintainers usually reply within 1 day