I noticed that the current MCPClient implementation uses RESTful endpoints (e.g., GET /tools, POST /tools/{tool_name}) to interact with the MCP server. However, according to the MCP specification, MCP is designed to use JSON-RPC over HTTP/SSE, not REST.
eg to list tools, something like
{
"jsonrpc": "2.0",
"method": "tools/list",
"params": {},
"id": 1
}
to call a tool, something like
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "git_status",
"arguments": {}
},
"id": 2
}
This results in 404 errors when connecting to MCP servers that support SSE.
Steps to reproduce:
Run an MCP server that implements the JSON-RPC protocol
Attempt to use the current MCPClient to list tools or call a tool - eg set
Observe 404 errors and no JSON-RPC traffic.