PgBeam Docs
Mcp

MCP server (Streamable HTTP)

POST
/v1/mcp

Model Context Protocol endpoint using the Streamable HTTP transport. Accepts JSON-RPC 2.0 requests and exposes every public API operation as an MCP tool. Use this with any MCP-compatible client (Claude Code, Cursor, Windsurf, custom agents) to let AI assistants manage PgBeam resources.

Transport: Streamable HTTP (MCP spec 2025-03-26) Protocol: JSON-RPC 2.0 Methods: initialize, tools/list, tools/call, ping

Prefer the CLI (pgbeam mcp) for local stdio transport. Use this endpoint for remote or server-to-server MCP integration.

Authorization

AuthorizationBearer <token>

JWT issued by Better Auth. Verified via JWKS.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

JSON-RPC 2.0 request envelope for MCP over Streamable HTTP.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/mcp" \  -H "Content-Type: application/json" \  -d '{    "jsonrpc": "2.0",    "id": "1",    "method": "initialize",    "params": {      "protocolVersion": "2025-03-26",      "capabilities": {},      "clientInfo": {        "name": "my-agent",        "version": "1.0.0"      }    }  }'
{  "jsonrpc": "2.0",  "id": "string",  "result": {},  "error": {    "code": 0,    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}
{  "error": {    "code": "string",    "message": "string"  }}