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.
Headers
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.
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.
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.
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
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.