Doris MCP Server
by Apache
Doris MCP Server is a backend service implementing the Model Control Panel protocol, designed to interact with Apache Doris databases. It leverages tools for tasks like converting natural language queries to SQL, executing queries, and managing metadata.
Last updated: N/A
What is Doris MCP Server?
The Doris MCP Server is a Python-based backend service that implements the Model Control Panel (MCP) protocol. It acts as an intermediary, allowing clients to interact with Apache Doris databases through defined tools, potentially utilizing Large Language Models (LLMs) for enhanced functionality.
How to use Doris MCP Server?
To use the Doris MCP Server, you need an MCP client. First, clone the repository, install dependencies, and configure environment variables. Then, start the server and connect the MCP client to the server's SSE or Streamable HTTP endpoints. The client can then send requests to invoke the server's tools, such as executing SQL queries or retrieving database metadata.
Key features of Doris MCP Server
MCP Protocol Implementation
Multiple Communication Modes (SSE, Streamable HTTP, Optional Stdio)
Tool-Based Interface for database interaction
Database Interaction with Apache Doris
Flexible Configuration via .env file
Metadata Extraction capabilities
Use cases of Doris MCP Server
Converting natural language queries to SQL (NL2SQL)
Executing SQL queries against Apache Doris
Retrieving database metadata (schemas, comments, indexes)
Auditing database activity through log retrieval
Integrating with tools like Cursor for enhanced database interaction
FAQ from Doris MCP Server
What is the MCP protocol?
What is the MCP protocol?
MCP (Model Control Panel) is a protocol that defines how clients can interact with a server to perform tasks, typically involving models or data processing.
What databases are supported?
What databases are supported?
The server is primarily designed to connect to Apache Doris databases, but it may be adaptable to other compatible databases.
How do I configure the database connection?
How do I configure the database connection?
Database connection details (host, port, user, password, database) are configured via environment variables in the .env
file.
What are the different communication modes?
What are the different communication modes?
The server supports SSE (Server-Sent Events), Streamable HTTP, and optionally Stdio for communication with clients.
How do I add a new MCP tool?
How do I add a new MCP tool?
Implement the tool logic in mcp_doris_tools.py
, then register it in both tool_initializer.py
(for SSE/Streamable) and mcp_core.py
(for Stdio).