---
title: "Send an MCP JSON-RPC 2.0 request"
method: POST
path: "/mcp/v1"
tags: ["MCP"]
---

# Send an MCP JSON-RPC 2.0 request

`POST /mcp/v1`

Accepts a JSON-RPC 2.0 request implementing the Model Context Protocol. Supported methods are initialize, server/discover, ping, tools/list, tools/call, resources/list, resources/read, prompts/list, prompts/get, pgedge/listDatabases, and pgedge/selectDatabase. Bearer token authentication is required when auth is enabled. Two protocol revisions are served on this same endpoint: a request whose body carries _meta.io.modelcontextprotocol/protocolVersion (or, on HTTP, a present MCP-Protocol-Version header) is served under the current, stateless revision (2026-07-28), which requires the MCP-Protocol-Version, Mcp-Method, and (for tools/call, resources/read, prompts/get) Mcp-Name headers described below, and which also expects a conforming client to offer both application/json and text/event-stream in Accept; any other request is served under the original, handshake-based revision (2024-11-05), which sends none of those headers and negotiates via initialize instead. initialize itself exists only under that original revision: it is not a method the current revision recognizes.

## Headers

- `MCP-Protocol-Version` string
- `Mcp-Method` string
- `Mcp-Name` string
- `Accept` string

## Request body

- JSONRPCRequest — A JSON-RPC 2.0 request object for the MCP protocol.
  - `id` unknown, required
  - `jsonrpc` '2.0', required — The JSON-RPC protocol version. Must be "2.0".
  - `method` 'initialize' | 'server/discover' | 'ping' | 'tools/list' | 'tools/call' | 'resources/list' | 'resources/read' | 'prompts/list' | 'prompts/get' | 'pgedge/listDatabases' | 'pgedge/selectDatabase', required — The MCP method to invoke.
  - `params` object — Optional parameters for the method.

## Response `200`

JSON-RPC 2.0 response. This includes a JSON-RPC-level error (for example, a tool's own argument validation failure) that is not one of the two rejections documented below.

- JSONRPCResponse — A JSON-RPC 2.0 response object.
  - `error` RPCError — A JSON-RPC 2.0 error object.
    - `code` integer, required — A numeric error code.
    - `data` unknown
    - `message` string, required — A short description of the error.
  - `id` unknown, required
  - `jsonrpc` '2.0', required — The JSON-RPC protocol version.
  - `result` unknown

## Other responses

- `400` — The request identified itself as the current (2026-07-28) revision -- via body _meta or the MCP-Protocol-Version header -- and failed validation before dispatch: a required header is missing or does not match the request body (HeaderMismatch, -32020), a required _meta field is missing (-32602), or the requested protocol version is not supported (UnsupportedProtocolVersion, -32022).
- `401` — Missing or invalid authentication token.
- `403` — Insufficient permissions.
- `404` — The request identified itself as the current (2026-07-28) revision and named a method that revision does not recognize (-32601, Method not found). This includes initialize, which exists only under the original (2024-11-05) revision.

## Changes

- **2026-08-17** `ec8a028d6dca` — 10 info
  - added the new optional `header` request parameter `Accept`
  - added the new optional `header` request parameter `MCP-Protocol-Version`
  - added the new optional `header` request parameter `Mcp-Method`
  - added the new optional `header` request parameter `Mcp-Name`
  - …6 more

[Change history](https://skmtc.dev/pgedge/apis/pgedge-postgres-mcp-server-api/changes/mcp/v1/post.md)

---

[API](https://skmtc.dev/pgedge/apis/pgedge-postgres-mcp-server-api.md) · [All operations](https://skmtc.dev/pgedge/apis/pgedge-postgres-mcp-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pgedge/pgedge-postgres-mcp-server-api/revisions/6084bab46b1e/schema)
