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
| Endpoint | Released registration | Tool implementation | Purpose |
|---|---|---|---|
/mcp/config | Registered when the Config handler initializes | Mixed. 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/stats | Registered when the Stats handler initializes | Functional. 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/query | Registered when the Query handler and catalog initialize | Functional. 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/admin | Registered when the Admin handler initializes | Stub only. All five advertised tools return placeholder data and do not perform their described operation. | Reserved administrative surface. See Upcoming Tools. |
/mcp/cache | Registered when the Cache handler initializes | Stub 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/ai | Conditionally registered only when AI_Features_Manager and the AI handler initialize | No functional released tool. tools/list advertises ai_nl2sql_convert, but every call returns a deprecation error. | Deprecated NL2SQL bridge placeholder. |
/mcp/rag | Conditionally registered only when AI_Features_Manager is available and the RAG handler initializes | Functional. 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
POSTandContent-Type: application/json(ortext/json). - The released server supports
initialize,ping,tools/list,tools/describe,tools/call,prompts/list, andresources/list, plus initialized/cancelled notifications. prompts/listandresources/listreturn empty arrays. HTTP resource registration therefore does not imply that an endpoint publishes MCP resources.GETandDELETEreturn405 Method Not Allowed; SSE and session deletion are not implemented.OPTIONSis available for CORS preflight.- The released protocol version reported by
initializeis2025-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.