
How to add Apache Doris MCP Server to Cursor
Query, explore, and govern Apache Doris databases via MCP — NL2SQL, metadata, and analytics tools. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 306★ · stdio · no auth
Cursor config for Apache Doris MCP Server
pip install doris-mcp-server{
"mcpServers": {
"apache-doris-mcp-server": {
"command": "doris-mcp-server",
"args": [
"--transport",
"stdio"
],
"env": {
"DORIS_HOST": "127.0.0.1",
"DORIS_PORT": "9030",
"DORIS_USER": "root",
"DORIS_PASSWORD": "your_db_password"
}
}
}
}Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Apache Doris MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Apache Doris MCP Server's tools to confirm it's connected.
Before you start
- Python 3.12+
- An Apache Doris database (host, port, user, password, database)
- doris-mcp-server installed (pip install doris-mcp-server)
What Apache Doris MCP Server can do in Cursor
exec_queryExecute a SQL query and return results (supports db_name, catalog_name, max_rows, timeout).
get_table_schemaGet detailed table structure information.
get_db_table_listGet the list of all table names in a specified database.
get_db_listGet the list of all database names.
get_table_commentGet table comment information.
get_table_column_commentsGet comment information for all columns in a table.
get_table_indexesGet index information for a specified table.
get_recent_audit_logsGet audit log records for a recent period.
Security
Connects to a live Apache Doris database with full credentials. SQL security validation is enabled by default (ENABLE_SECURITY_CHECK=true) and blocks DDL/DML/DCL and dangerous keywords (DROP, DELETE, TRUNCATE, ALTER, CREATE, INSERT, UPDATE, GRANT, REVOKE, EXEC, etc.), with SQL injection protection and data masking. For multi-tenant/HTTP deployments, enterprise Token/JWT/OAuth auth and token-bound database configuration are available; the web-based token management dashboard is localhost-only and requires TOKEN_MANAGEMENT_ADMIN_TOKEN. Doris-backed OAuth routes tool calls through per-user Doris connection pools so Doris RBAC is the final data authorization boundary.
Apache Doris MCP Server + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Apache Doris MCP Server config there under the "mcpServers" key and restart the client.
Is Apache Doris MCP Server safe to use with Cursor?
Connects to a live Apache Doris database with full credentials. SQL security validation is enabled by default (ENABLE_SECURITY_CHECK=true) and blocks DDL/DML/DCL and dangerous keywords (DROP, DELETE, TRUNCATE, ALTER, CREATE, INSERT, UPDATE, GRANT, REVOKE, EXEC, etc.), with SQL injection protection and data masking. For multi-tenant/HTTP deployments, enterprise Token/JWT/OAuth auth and token-bound database configuration are available; the web-based token management dashboard is localhost-only and requires TOKEN_MANAGEMENT_ADMIN_TOKEN. Doris-backed OAuth routes tool calls through per-user Doris connection pools so Doris RBAC is the final data authorization boundary.
Which transports are supported?
Stdio (recommended for clients like Cursor and Kiro) and Streamable HTTP. The HTTP service exposes a unified MCP endpoint at http://<host>:<port>/mcp and a health check at /health.
How do I configure the database connection?
Via env vars in the client config (DORIS_HOST, DORIS_PORT, DORIS_USER, DORIS_PASSWORD, DORIS_DATABASE), command-line flags (--db-host, --db-port, --db-user, --db-password), or a .env file.
Is it safe against destructive SQL?
Yes. SQL security validation is on by default and blocks DDL/DML/DCL operations and dangerous keywords, with SQL injection protection and configurable data masking. Blocked keywords are customizable via BLOCKED_KEYWORDS.