-
Notifications
You must be signed in to change notification settings - Fork 2
ProxySQL
Value Proposition Manage advanced traffic orchestration. Integrating ProxySQL empowers your AI agents to dynamically optimize connection pools, orchestrate query routing, and gain real-time insights into your database's critical routing layer. Read the full value proposition.
- ProxySQL with admin interface enabled
- Admin interface credentials (default: admin/admin on port 6032)
- Network access to ProxySQL admin port
The server provides a suite of tools for ProxySQL management. Leverage the native MCP discovery mechanism or the mysql_tool_index prompt to explore the dynamic list of ProxySQL tools.
Prominent Examples:
-
proxysql_status: Get ProxySQL version, uptime, and runtime stats. -
proxysql_query_rules: List query routing rules. -
proxysql_process_list: Get active sessions.
Tip
See Tools for global token optimization parameters.
Integrate and manage your database routing layer. ProxySQL's native administrative interface allows AI agents to optimize connection pools and query routing. Establish a connection using:
mysql -h127.0.0.1 -P6032 -uadmin -padminTip
We use 127.0.0.1 intentionally in the bash example. This forces a TCP connection. This differentiates it from MYSQL_HOST or the standard mysql client socket default, rather than implying it defaults to localhost.
| Variable | Default | Description |
|---|---|---|
PROXYSQL_HOST |
127.0.0.1 |
ProxySQL admin interface host (forces TCP) |
PROXYSQL_PORT |
6032 |
ProxySQL admin port |
PROXYSQL_USER |
admin |
Admin username (often radmin for remote admin) |
PROXYSQL_PASSWORD |
admin |
Admin password |
Caution
Change default ProxySQL admin credentials in production. Use environment variables or secure secrets management.
Tip
Use the mysql_setup_proxysql prompt as an integrated way to initialize configurations.
Note
Agent Routing: To dynamically route data traffic, agents should configure the MYSQL_PORT to use the ProxySQL data port (typically 6033).
{
"mcpServers": {
"mysql-mcp": {
"command": "npx",
"args": [
"-y",
"@neverinfamous/mysql-mcp",
"--transport",
"stdio"
],
"env": {
"MYSQL_HOST": "127.0.0.1",
"MYSQL_PORT": "6033",
"MYSQL_USER": "user",
"MYSQL_PASSWORD": "<YOUR_PASSWORD>",
"MYSQL_DATABASE": "database",
"PROXYSQL_HOST": "127.0.0.1",
"PROXYSQL_PORT": "6032",
"PROXYSQL_USER": "admin",
"PROXYSQL_PASSWORD": "<YOUR_ADMIN_PASSWORD>"
}
}
}
}Isolate administrative capabilities to streamline the agent's context window and ensure bounded workflows:
{
"args": [
"-y",
"@neverinfamous/mysql-mcp",
"--transport",
"stdio",
"--tool-filter",
"proxysql"
]
}This exposes only the ProxySQL tools, explicitly preserving access to standalone tools like proxysql_status within the filtered context.
Value Proposition Enforce strict execution boundaries and maximize LLM context efficiency for secure, autonomous database interactions. Read the full value proposition
- Installation
- Configuration
- Architecture
- HTTP Transport
- Tool Filtering
- Code Mode
- Tools
- Prompts
- Resources
- Observability & Telemetry