Hi! 👋 We are doing a big documentation refresh. Help us improve — what's missing or could be better? Let us know! Simply send an email or start a conversation in Google Groups!

MCP Endpoints

ProxySQL v4.0.10 registers MCP endpoints as HTTP resources under /mcp. A named handler class does not by itself mean that its tools work: the table below reflects the released registration and dispatch code.

Released Endpoint Registry

EndpointReleased registrationTool implementationPurpose
/mcp/configRegistered when the Config handler initializesMixed. get_config, set_config, list_variables, get_status, and constrained Admin-SQL query have implementations; reload_config is a success-returning stub.Inspect or change MCP runtime variables and query the Admin database. set_config and allowed INSERT, UPDATE, DELETE, or REPLACE statements mutate state.
/mcp/statsRegistered when the Stats handler initializesFunctional. The released handler dispatches all 20 tools in the Stats tool reference.Live and historical MySQL/PostgreSQL operational statistics, query logs, and digest snapshots.
/mcp/queryRegistered when the Query handler and catalog initializeFunctional. The tool families are introduced under Query Tools; the exact catalog subset is in MCP Catalog.Target discovery, schema discovery, read-only SQL, catalog, agent, and LLM metadata operations. Some catalog/agent/LLM tools write to mcp_catalog.db.
/mcp/adminRegistered when the Admin handler initializesStub only. All five advertised tools return placeholder data and do not perform their described operation.Reserved administrative surface. See Upcoming Tools.
/mcp/cacheRegistered when the Cache handler initializesStub only. All six advertised tools return placeholder data and do not inspect or change the query cache.Reserved cache-management surface. See Upcoming Tools.
/mcp/aiConditionally registered only when AI_Features_Manager and the AI handler initializeNo functional released tool. tools/list advertises ai_nl2sql_convert, but every call returns a deprecation error.Deprecated NL2SQL bridge placeholder.
/mcp/ragConditionally registered only when AI_Features_Manager is available and the RAG handler initializesFunctional. Seven tools are registered; see RAG Tools.FTS, vector and hybrid retrieval, document/chunk retrieval, source refresh, and RAG statistics.

If a required handler fails initialization, the server skips that endpoint. /mcp/ai and /mcp/rag are also absent when the GenAI/AI runtime is unavailable.

Transport and Protocol

  • Send JSON-RPC 2.0 requests with POST and Content-Type: application/json (or text/json).
  • The released server supports initialize, ping, tools/list, tools/describe, tools/call, prompts/list, and resources/list, plus initialized/cancelled notifications.
  • prompts/list and resources/list return empty arrays. HTTP resource registration therefore does not imply that an endpoint publishes MCP resources.
  • GET and DELETE return 405 Method Not Allowed; SSE and session deletion are not implemented. OPTIONS is available for CORS preflight.
  • The released protocol version reported by initialize is 2025-06-18.

Authentication

Every endpoint uses its own mcp-<endpoint>_endpoint_auth value. The value must be non-empty: when it is empty, the endpoint rejects every request with HTTP 401 and JSON-RPC error -32001. Send the matching value as an Authorization: Bearer ... header. A token query parameter is accepted as a fallback, but headers are safer because URLs are commonly retained in logs and browser history.

Configure all tokens and limits through MCP Variables.

Query endpoint example

POST /mcp/query HTTP/1.1
Host: localhost:6071
Authorization: Bearer <mcp-query_endpoint_auth>
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "list_targets",
    "arguments": {}
  },
  "id": 1
}

Stats endpoint example

POST /mcp/stats HTTP/1.1
Host: localhost:6071
Authorization: Bearer <mcp-stats_endpoint_auth>
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "show_status",
    "arguments": {
      "db_type": "mysql",
      "category": "connections"
    }
  },
  "id": 2
}

RAG endpoint example

POST /mcp/rag HTTP/1.1
Host: localhost:6071
Authorization: Bearer <mcp-rag_endpoint_auth>
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "rag.search_fts",
    "arguments": {
      "query": "connection pooling",
      "k": 10
    }
  },
  "id": 3
}

Security Boundaries

Bearer authentication is enforced for every endpoint, but MCP query rules are not a universal endpoint filter. In v4.0.10 the Query handler evaluates them for run_sql_readonly and explain_sql. Apply least-privilege backend profiles, network controls, TLS, and tool-specific restrictions in addition to query rules.