Apache Doris MCP server

Connects AI systems to Apache Doris databases using MySQL protocol, enabling data exploration, schema discovery, and secure query execution with built-in timeout protection.
Back to servers
Provider
gh-beat4ocean
Release date
Mar 13, 2025
Language
Python
Stats
1 star

The Apache Doris MCP Server provides a Model Context Protocol interface for Apache Doris, allowing seamless integration with tools that support the MCP standard. This server enables you to interact with your Doris database using natural language processing capabilities.

Installation

To use the MCP server for Apache Doris, you'll need to have uv installed on your system. This is a package manager and virtual environment tool that will handle the dependencies.

Requirements

  • Python 3.13 or compatible version
  • uv package manager
  • Apache Doris instance credentials

Configuration and Usage

Setting Up in Cursor

To use the MCP server with Cursor, add a new command with the following configuration:

Name: doris
Type: command
Command: DORIS_HOST=<doris-host> DORIS_PORT=<port> DORIS_USER=<doris-user> DORIS_PASSWORD=<doris-pwd> uv run --with mcp-doris --python 3.13 mcp-doris

Replace the placeholder values with your actual Apache Doris connection details:

  • <doris-host>: Your Doris server hostname or IP address
  • <port>: The port number for your Doris server
  • <doris-user>: Your Doris username
  • <doris-pwd>: Your Doris password

Running the Server Manually

If you prefer to run the server directly, you can use the MCP inspector mode:

# Set your Doris connection details
export DORIS_HOST=<doris-host>
export DORIS_PORT=<port>
export DORIS_USER=<doris-user>
export DORIS_PASSWORD=<doris-pwd>

# Run the MCP server
uv run --with mcp-doris --python 3.13 mcp-doris

Testing with MCP Inspector

After the server is running, you can interact with it through any MCP-compatible client, or use the built-in MCP inspector by visiting http://localhost:5173 in your web browser.

Troubleshooting

If you encounter connection issues:

  • Verify that your Doris server is running and accessible
  • Check that the credentials provided are correct
  • Ensure that the port specified is open and not blocked by a firewall
  • Confirm that you have the correct version of Python installed

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later