Apache Doris MCP server

Integrates with Apache Doris analytical database system through MySQL protocol, enabling data querying and interaction for business intelligence and data analysis workflows.
Back to servers
Provider
morningman
Release date
Mar 07, 2025
Language
Python
Package
Stats
1.0K downloads
13 stars

The Apache Doris MCP Server provides a Model Context Protocol interface for Apache Doris, enabling seamless integration with compatible AI assistants and tools. It allows you to query your Doris database directly through natural language.

Installation

To use the MCP server for Apache Doris, you'll need to set up the environment with the required dependencies.

Prerequisites

  • Python 3.13
  • uv package manager
  • Apache Doris instance credentials

Setting Up in Cursor

Cursor is a code editor that can directly integrate with the MCP server. To set up:

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 Doris database credentials:

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

Running Standalone

If you want to run the MCP server directly:

  1. Install the package using uv:
uv install mcp-doris
  1. Start the server with your Doris credentials:
export DORIS_HOST=<doris-host>
export DORIS_PORT=<port>
export DORIS_USER=<doris-user>
export DORIS_PASSWORD=<doris-pwd>
python -m mcp_doris.mcp_server

Testing Connectivity

Once your server is running, you can verify it's working by connecting to it with any MCP-compatible client. The server provides:

  • Database schema information
  • Query execution capabilities
  • Natural language to SQL translation

Usage Examples

Example 1: Querying a Table

After connecting to the MCP server, you can use natural language to query your Doris database:

Show me the top 10 sales records from the sales_table

The MCP server will translate this to SQL and execute it against your Doris instance.

Example 2: Getting Schema Information

You can also ask about the database structure:

What tables are available in the database?
What columns does the customer_table have?

The server will provide structured information about your database schema.

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