Skip to content

Provide HTTP REST varient of the protocol #480

@kurtisvg

Description

@kurtisvg

Is your feature request related to a problem? Please describe.
It's a common practice in software development to put applications behind a reverse proxy such as Nginx, Envoy, or Traefik. This makes it easier to do things like add AuthZ/AuthN, Load Balance, route requests for sharding, compression, etc.

None of these common reverse proxies support JSON-RPC. This makes it difficult to leverage the most common tools for adding these features, which is often an important part of production and enterprise readiness.

Describe the solution you'd like
I'd like MCP to offer a more REST compatible variant. Ideally it should be straightforward and automated mapping.

For example, this JSON-RPC call:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "get_weather",
    "arguments": {
      "location": "New York"
    }
  }
}

Could translate to the following HTTP call:

POST tools/call/weather HTTP/1.1
Host: api.example.com
Content-Type: application/json
Accept: application/json

{
  "id": 2,
  "params": {
    "name": "get_weather",
    "arguments": {
      "location": "New York"
    }
}

Describe alternatives you've considered
N/A

Additional context
There is a similar problem for HTTP frameworks -- almost without exception, frameworks like Flask, Django, Spring are built around the concept of easily mapping endpoints to functions to handle the HTTP call. With JSON-RPC, I need to rely in less stable or optimized libraries compared to the most popular ones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions