Align MCP setup with Codex JSON transport
This commit is contained in:
parent
526371014a
commit
6b3ecd6e1f
|
|
@ -119,7 +119,7 @@ Call MCP tools through the JSON-RPC endpoint:
|
|||
```bash
|
||||
curl -sS http://127.0.0.1:4100/mcp \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Accept: application/json, text/event-stream' \
|
||||
-H 'Accept: application/json' \
|
||||
-H 'MCP-Protocol-Version: 2025-06-18' \
|
||||
-H "Authorization: Bearer $TOKEN" \
|
||||
-d '{"jsonrpc":"2.0","id":"tools","method":"tools/list","params":{}}' | jq
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ Required request headers for authenticated tool calls:
|
|||
|
||||
```text
|
||||
Authorization: Bearer <agent-token>
|
||||
Accept: application/json, text/event-stream
|
||||
Accept: application/json
|
||||
MCP-Protocol-Version: 2025-06-18
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -733,7 +733,7 @@ function buildSetupPacket(session: AgentSessionRecord, publicUrl: string): Recor
|
|||
url: endpoint,
|
||||
headers: {
|
||||
Authorization: `Bearer ${tokenPlaceholder}`,
|
||||
Accept: "application/json, text/event-stream",
|
||||
Accept: "application/json",
|
||||
"MCP-Protocol-Version": "2025-06-18",
|
||||
},
|
||||
},
|
||||
|
|
@ -741,9 +741,13 @@ function buildSetupPacket(session: AgentSessionRecord, publicUrl: string): Recor
|
|||
mcp_servers: {
|
||||
nodedc_tasker: {
|
||||
url: endpoint,
|
||||
enabled: true,
|
||||
required: false,
|
||||
startup_timeout_sec: 20,
|
||||
tool_timeout_sec: 60,
|
||||
headers: {
|
||||
Authorization: `Bearer ${tokenPlaceholder}`,
|
||||
Accept: "application/json, text/event-stream",
|
||||
Accept: "application/json",
|
||||
"MCP-Protocol-Version": "2025-06-18",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ try {
|
|||
const token = await createToken(agentId);
|
||||
const headers = {
|
||||
Authorization: `Bearer ${token}`,
|
||||
Accept: "application/json, text/event-stream",
|
||||
Accept: "application/json",
|
||||
"MCP-Protocol-Version": "2025-06-18",
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ try {
|
|||
const token = await createToken(agentId);
|
||||
const headers = {
|
||||
Authorization: `Bearer ${token}`,
|
||||
Accept: "application/json, text/event-stream",
|
||||
Accept: "application/json",
|
||||
"MCP-Protocol-Version": "2025-06-18",
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue