This guide provides step-by-step instructions on how to integrate the doris-mcp-server with the Cursor IDE. This integration allows you to interact with your Apache Doris database using natural language queries directly within Cursor's AI chat.
Before you begin, ensure you have the following installed and configured:
You can install uv with one of the following commands:
# For macOS (recommended) brew install uv # For other systems using pipx pipx install uv
First, clone the doris-mcp-server repository to your local machine:
git clone https://github.com/apache/doris-mcp-server.git cd doris-mcp-server
The necessary dependencies are listed in requirements.txt and will be managed automatically by uv in the next step.
doris-mcp-server directory in Cursor.{ "mcpServers": { "doris-mcp": { "command": "uv", "args": [ "run", "--project", "/path/to/your/doris-mcp-server", "doris-mcp-server" ], "env": { "DORIS_HOST": "your_doris_fe_host", "DORIS_PORT": "9030", "DORIS_USER": "your_username", "DORIS_PASSWORD": "your_password", "DORIS_DATABASE": "ssb" } } } }
⚠️ Important:
- Replace
"/path/to/your/doris-mcp-server"with the absolute path to your local project directory.- Fill in your actual Doris FE host, username, password, and database name.
Once saved, go back to the Settings panel. If everything is configured correctly, you’ll see a green status dot next to doris-mcp-server, together with the eight domain tools such as doris_catalog and doris_query.
You can now chat with Cursor Agent to run SQL queries against your Doris database.
Cmd + K (macOS) or Ctrl + K (Windows/Linux), or click the chat icon in the top-right.Prompt: What tables are in the
ssbdatabase?
The agent will discover doris_catalog, then call its exact list_tables child and return the results.
Prompt: What has been the sales trend over the past ten years in the
ssbdatabase, and which year had the fastest growth?
The agent will generate an appropriate SQL query, send it to the MCP server, and interpret the results to give you growth trends and highlights.