Skip to main content

MCP Endpoints

The ProxySQL MCP server exposes several HTTP/HTTPS endpoints, each serving a specific set of Model Context Protocol capabilities. All endpoints are prefixed with /mcp.

List of Endpoints

EndpointStatusHandlerPurpose
/mcp/querySupportedQuery Tool HandlerSchema discovery, search, and data retrieval.
/mcp/ragSupportedRAG Tool HandlerRetrieval Augmented Generation utilities.
/mcp/configUnder DevelopmentConfig Tool HandlerManage ProxySQL configuration via AI.
/mcp/adminUnder DevelopmentAdmin Tool HandlerAdministrative tasks and node management.
/mcp/cacheUnder DevelopmentCache Tool HandlerQuery cache inspection and management.
/mcp/observeUnder DevelopmentObserve Tool HandlerReal-time monitoring and metrics.
/mcp/aiUnder DevelopmentAI Tool HandlerLLM bridge and anomaly detection.

Supported Endpoints

The Query Endpoint (/mcp/query)

The /mcp/query endpoint is the primary interface for AI agents. It implements the standard MCP tools/call method, allowing agents to execute database-related tools. For a full list of tools available here, see Query Tools.

The RAG Endpoint (/mcp/rag)

The /mcp/rag endpoint provides specialized tools for Retrieval Augmented Generation, including full-text and vector search capabilities. For a full list of tools available here, see RAG Tools.

Connectivity & Authentication

Protocol Details

  • Method: POST
  • Content-Type: application/json
  • Request Format: JSON-RPC 2.0

Authentication

Authentication is enforced via Bearer tokens configured in the MCP Variables.

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_tables",
"arguments": {
"schema": "main"
}
},
"id": 1
}

Security & Rules

All requests to any endpoint are filtered through the MCP Query Rules. This ensures that even if an agent has a valid token, it can only perform actions permitted by the ProxySQL administrator.