Skip to content

MCP Client uses REST endpoints instead of JSON-RPC as required by MCP spec #36

@bobtista

Description

@bobtista

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions