What is Apache Doris MCP Server?
Apache Doris MCP Server is a backend service built with Python and FastAPI that implements the Model Control Panel (MCP) protocol, allowing clients to interact with it through defined tools. It is primarily designed to connect to Apache Doris databases and can leverage Large Language Models (LLMs) for tasks such as converting natural language queries to SQL (NL2SQL), executing queries, and performing metadata management and analysis.
How to use Apache Doris MCP Server?
To use the Apache Doris MCP Server, clone the repository, install the dependencies, configure the environment variables, and run the service. Clients can connect to the server's SSE or Streamable HTTP endpoints to send requests and invoke the server's tools.
Key features of Apache Doris MCP Server?
- Implements the MCP protocol with standard interfaces for tool calls and resource management.
- Supports multiple communication modes: SSE, Streamable HTTP, and optional Stdio.
- Provides a tool-based interface for database interaction, including SQL execution and metadata retrieval.
- Flexible configuration via a .env file for database connections and server settings.
- Capable of extracting database metadata information.
Use cases of Apache Doris MCP Server?
- Executing SQL queries directly against Apache Doris databases.
- Retrieving metadata about databases and tables.
- Managing and analyzing database resources through a standardized interface.
FAQ from Apache Doris MCP Server?
-
Can the MCP Server connect to other databases?
Yes, it is designed to connect primarily to Apache Doris but can be adapted for other compatible databases. -
Is there a graphical interface for the MCP Server?
No, the MCP Server is designed for programmatic access through its API endpoints. -
How do I configure the server?
Configuration is done through a .env file where you can set database connection details and server parameters.
Server Config
{
"mcpServers": {
"doris-mcp": {
"command": "uv",
"args": [
"--project",
"/path/to/your/doris-mcp-server",
"run",
"doris-mcp-server"
],
"env": {
"DB_HOST": "FE_HOST",
"DB_PORT": "9030",
"DB_USER": "root",
"DB_PASSWORD": ""
}
},
"doris-http": {
"url": "http://127.0.0.1:3000/mcp"
}
}
}