I’m implementing an MCP server for a custom tool (MJT).
The tool is registered and discovered correctly.
When ChatGPT invokes list_templates, my MCP server DOES receive the request
and produces a valid JSON response (verified independently using another client).
However, ChatGPT reports this error:
424: unhandled errors in a TaskGroup (1 sub-exception)
This 424 is NOT coming from my server — my MCP server never returns 4xx.
It appears to be thrown inside the OpenAI Tool Runtime layer.
Key points:
- MCP server receives the request normally.
- MCP server returns valid JSON-RPC response.
- ChatGPT Tool Runtime does not receive or parse the response.
- ChatGPT UI shows
424: unhandled errors in a TaskGroup.
This strongly suggests a bug or parsing failure inside the Tool Runtime.
Please advise how to diagnose further, or confirm if this is a known issue.
(Optional)
Here is the exact response my MCP server returns:
{
“content”: [
{
“type”: “text”,
“text”: “可用樣板清單(共 2 個):\n- aurora: Aurora Glow\n- noir: Noir Print”
},
{
“type”: “json”,
“data”: {
“templates”: [
{
“id”: “[Max Depth Reached]”,
“name”: “[Max Depth Reached]”,
“description”: “[Max Depth Reached]”,
“palette”: “[Max Depth Reached]”,
“font_stack”: “[Max Depth Reached]”,
“pages”: “[Max Depth Reached]”
},
{
“id”: “[Max Depth Reached]”,
“name”: “[Max Depth Reached]”,
“description”: “[Max Depth Reached]”,
“palette”: “[Max Depth Reached]”,
“font_stack”: “[Max Depth Reached]”,
“pages”: “[Max Depth Reached]”
}
]
}
}
]
}
Here is the console log showing the MCP server received and responded:
═══════════════════════════════════════════════════════════════════════════
HTTP REQUEST RECEIVED [2025-11-29T12:18:58.133Z]
═══════════════════════════════════════════════════════════════════════════
Method: POST
URL: /mcp
Body:
{
“method”: “initialize”,
“params”: {
“protocolVersion”: “2025-06-18”,
“capabilities”: {
“experimental”: {
“openai/visibility”: {
“enabled”: true
}
}
},
“clientInfo”: {
“name”: “openai-mcp”,
“version”: “1.0.0”
}
},
“jsonrpc”: “2.0”,
“id”: 0
}
───────────────────────────────────────────────────────────────────────────
═══════════════════════════════════════════════════════════════════════════
HTTP REQUEST RECEIVED [2025-11-29T12:18:58.290Z]
═══════════════════════════════════════════════════════════════════════════
Method: POST
URL: /mcp
Body:
{
“method”: “notifications/initialized”,
“jsonrpc”: “2.0”
}
───────────────────────────────────────────────────────────────────────────
═══════════════════════════════════════════════════════════════════════════
HTTP REQUEST RECEIVED [2025-11-29T12:18:58.464Z]
═══════════════════════════════════════════════════════════════════════════
Method: POST
URL: /mcp
Body:
{
“method”: “tools/call”,
“params”: {
“_meta”: {
“openai/userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36”,
“openai/locale”: “zh-TW”,
“openai/userLocation”: {
“city”: “Taipei”,
“region”: “Taiwan”,
“country”: “TW”,
“timezone”: “Asia/Taipei”,
“latitude”: “25.05306”,
“longitude”: “121.52639”
},
“openai/subject”: “v1/rFVk7Yzwfq6gftKEKLDw053ZvCyNiN6UCQhXjFIuiqciczLhj5TEXu”
},
“name”: “list_templates”,
“arguments”: {}
},
“jsonrpc”: “2.0”,
“id”: 1
}
───────────────────────────────────────────────────────────────────────────
═══════════════════════════════════════════════════════════════════════════
MCP REQUEST RECEIVED [2025-11-29T12:18:58.467Z]
═══════════════════════════════════════════════════════════════════════════
Tool: list_templates
Method: tools/call
Params:
{
“_meta”: {
“openai/userAgent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36”,
“openai/locale”: “zh-TW”,
“openai/userLocation”: {
“city”: “Taipei”,
“region”: “Taiwan”,
“country”: “TW”,
“timezone”: “Asia/Taipei”,
“latitude”: “25.05306”,
“longitude”: “121.52639”
},
“openai/subject”: “v1/rFVk7Yzwfq6gftKEKLDw053ZvCyNiN6UCQhXjFIuiqciczLhj5TEXu”
},
“name”: “list_templates”,
“arguments”: {}
}
───────────────────────────────────────────────────────────────────────────
═══════════════════════════════════════════════════════════════════════════
API REQUEST SENT [2025-11-29T12:18:58.468Z]
═══════════════════════════════════════════════════════════════════════════
Tool: list_templates
Method: GET
URL: http://127.0.0.1:3000/api/v1/templates
Headers:
{
“Authorization”: “ApiKey bQ4…o9Sa”,
“X-Tenant-Id”: “6f1e1f83-7d1b-4c27-8f7c-74a22a7d1f5a”,
“Content-Type”: “application/json”
}
───────────────────────────────────────────────────────────────────────────
═══════════════════════════════════════════════════════════════════════════
API RESPONSE RECEIVED [2025-11-29T12:18:58.491Z]
═══════════════════════════════════════════════════════════════════════════
Tool: list_templates
Status: 200 OK
Headers:
{
“connection”: “keep-alive”,
“content-length”: “2311”,
“content-type”: “application/json; charset=utf-8”,
“date”: “Sat, 29 Nov 2025 12:18:58 GMT”,
“keep-alive”: “timeout=72”
}
Body:
{
“data”: [
{
“id”: “aurora”,
“name”: “Aurora Glow”,
“description”: “Light, airy gradients with warm accents”,
“palette”: {
“background”: “#0b1021”,
“surface”: “rgba(255,255,255,0.06)”,
“text”: “#f5f7ff”,
“accent”: “#9ef0f0”,
“muted”: “#9ba0b5”
},
“font_stack”: ““Inter”, “Helvetica Neue”, Arial, sans-serif”,
“pages”: [
{
“kind”: “home”,
“templates”: [
“[Max Depth Reached]”,
“[Max Depth Reached]”
]
},
{
“kind”: “about”,
“templates”: [
“[Max Depth Reached]”,
“[Max Depth Reached]”
]
},
{
“kind”: “news”,
“templates”: [
“[Max Depth Reached]”,
“[Max Depth Reached]”
]
}
]
},
{
“id”: “noir”,
“name”: “Noir Print”,
“description”: “High-contrast, editorial-inspired layout”,
“palette”: {
“background”: “#0d0f14”,
“surface”: “#161a24”,
“text”: “#f5f5f5”,
“accent”: “#ffcc66”,
“muted”: “#9aa0ae”
},
“font_stack”: ““DM Sans”, “Helvetica Neue”, Arial, sans-serif”,
“pages”: [
{
“kind”: “home”,
“templates”: [
“[Max Depth Reached]”,
“[Max Depth Reached]”
]
},
{
“kind”: “about”,
“templates”: [
“[Max Depth Reached]”,
“[Max Depth Reached]”
]
},
{
“kind”: “news”,
“templates”: [
“[Max Depth Reached]”,
“[Max Depth Reached]”
]
}
]
}
],
“meta”: {
“request_id”: “eacce0c9-3096-494f-b3f4-952df702b690”,
“tenant_id”: “6f1e1f83-7d1b-4c27-8f7c-74a22a7d1f5a”
}
}
───────────────────────────────────────────────────────────────────────────
[list_templates] | GET /api/v1/templates | status: 200 | tenant_id: 6f1e1f83…1f5a | request_id: eacce0c9-3096-494f-b3f4-952df702b690 | time: 21ms
═══════════════════════════════════════════════════════════════════════════
MCP RESPONSE SENT [2025-11-29T12:18:58.492Z]
═══════════════════════════════════════════════════════════════════════════
Tool: list_templates
Response:
{
“content”: [
{
“type”: “text”,
“text”: “可用樣板清單(共 2 個):\n- aurora: Aurora Glow\n- noir: Noir Print”
},
{
“type”: “json”,
“data”: {
“templates”: [
{
“id”: “[Max Depth Reached]”,
“name”: “[Max Depth Reached]”,
“description”: “[Max Depth Reached]”,
“palette”: “[Max Depth Reached]”,
“font_stack”: “[Max Depth Reached]”,
“pages”: “[Max Depth Reached]”
},
{
“id”: “[Max Depth Reached]”,
“name”: “[Max Depth Reached]”,
“description”: “[Max Depth Reached]”,
“palette”: “[Max Depth Reached]”,
“font_stack”: “[Max Depth Reached]”,
“pages”: “[Max Depth Reached]”
}
]
}
}
]
}