MCP: initialize fails with -32603 when a client sends object-valued experimental capabilities (breaks Codex CLI integration)
@NghiaTranUIT ci sta già lavorando.
Dal 30/9/2026.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 52/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 7.1k
- Fork
- 238
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ProxymanApp/Proxyman
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
ProxymanApp/Proxyman#2821 ·
-
Could not observe system extension changesForse già presa @NghiaTranUIT l’ha presa 2 giorni fa. Aperta
Difficoltà 4/5 1-2 giorni Idoneità per principianti 45/100
ProxymanApp/Proxyman#2819 · 2 commenti · 1 assegnatario ·
-
启动后约 6 秒崩溃Forse già presa @NghiaTranUIT l’ha presa 8 giorni fa. Aperta✅ Done bug
ProxymanApp/Proxyman#2818 · 2 commenti · 1 assegnatario ·
-
[iPadOS] Local VPN toggle does not turn on and VPN profile is not created in iPadOS SettingsForse già presa @NghiaTranUIT l’ha presa 9 giorni fa. Apertabug
ProxymanApp/Proxyman#2817 · 1 commento · 1 assegnatario ·
-
Factory Reset in proxyman-cliForse già presa @NghiaTranUIT l’ha presa 8 giorni fa. Aperta✅ Done enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ProxymanApp/Proxyman#2816 · 1 commento · 1 assegnatario ·
Tutte le issue di ProxymanApp/Proxyman
Issue simili
-
state:triage tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
agent8-cash/ethpayserver#731 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
jarvis2f/telegram-files#160 ·
-
area:print-dispatch
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
area: docs domain: technical-writing good first issue type: documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
Deepak3699/Ai_Mentor#919 ·
I maintainer di solito rispondono entro 2 giorni