MCP

Send an MCP JSON-RPC 2.0 request

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.

post/mcp/v1

Headers

MCP-Protocol-Versionstring
Example:2026-07-28

Required on a modern (2026-07-28) request; omit entirely for a legacy request. Must equal the request body's _meta.io.modelcontextprotocol/protocolVersion field, or the request is rejected with 400 and a HeaderMismatch (-32020) JSON-RPC error.

Mcp-Methodstring

Required alongside MCP-Protocol-Version on a modern request. Must equal the JSON-RPC request body's method field, or the request is rejected with 400 and a HeaderMismatch (-32020) JSON-RPC error.

Mcp-Namestring

Required on a modern tools/call, resources/read, or prompts/get request; not sent for any other method. Must equal the body's params.name (tools/call, prompts/get) or params.uri (resources/read), Base64-sentinel-encoded ("=?base64?<value>?=") if the raw value is not safely representable as a plain ASCII header.

Acceptstring
Example:application/json, text/event-stream

The Streamable HTTP transport requires a modern (2026-07-28) client to list both application/json and text/event-stream here, because a conforming server may answer any request with either a single JSON object or a request-scoped SSE stream. This server always answers with application/json -- it implements no streaming method -- and does not inspect this header, so a request that omits it is not rejected; it is documented because a client that talks to other MCP servers must send it to remain conforming.

Request body

{"stackTrail":"components:schemas:JSONRPCRequest:properties:id","oasType":"schema","type":"unknown","description":"A unique request identifier. Can be a string or integer."}
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.

paramsobject

Optional parameters for the method.

Response

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.

{"stackTrail":"components:schemas:JSONRPCResponse:properties:id","oasType":"schema","type":"unknown","description":"The request identifier that this response corresponds to."}
jsonrpc'2.0' required

The JSON-RPC protocol version.

{"stackTrail":"components:schemas:JSONRPCResponse:properties:result","oasType":"schema","type":"unknown","description":"The result of the method invocation. Present on success."}

Changes