Skip to content

Commit 03751b8

Browse files
authored
Merge pull request #7 from John-Lin/fix/mcp-url-key
fix: use standard MCP config key "url" instead of "httpUrl"
2 parents d52fad4 + 1419d88 commit 03751b8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ Create a `servers_config.json` file to add your MCP servers. If this file is not
8181
}
8282
```
8383

84-
For HTTP-based MCP servers (Streamable HTTP), use `httpUrl`:
84+
For HTTP-based MCP servers (Streamable HTTP), use `url`:
8585

8686
```json
8787
{
8888
"mcpServers": {
8989
"my-server": {
90-
"httpUrl": "https://mcp.example.com/mcp",
90+
"url": "https://mcp.example.com/mcp",
9191
"headers": {
9292
"Accept": "application/json, text/event-stream"
9393
}

bot/agent.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ def truncate_history(self, chat_id: str) -> None:
104104
def from_dict(cls, name: str, config: dict[str, Any]) -> OpenAIAgent:
105105
mcp_servers: list[MCPServerStreamableHttp | MCPServerStdio] = []
106106
for mcp_srv in config.get("mcpServers", {}).values():
107-
if "httpUrl" in mcp_srv:
107+
if "url" in mcp_srv:
108108
mcp_servers.append(
109109
MCPServerStreamableHttp(
110110
client_session_timeout_seconds=MCP_SESSION_TIMEOUT_SECONDS,
111111
params={
112-
"url": mcp_srv["httpUrl"],
112+
"url": mcp_srv["url"],
113113
"headers": mcp_srv.get("headers", {}),
114114
},
115115
)

0 commit comments

Comments
 (0)