Doris MCP Server
About
Doris MCP Server is a backend service built with Python and FastAPI that implements the Model Context Protocol (MCP). It connects to Apache Doris databases and can leverage Large Language Models (LLMs) for tasks like converting natural language queries to SQL (NL2SQL), executing…
Details
- Author
- FreeOnePlus
- Downloads
- 195
- Categories
- Other
Jump to
- MCP protocol implementation with tool calls, resources, and prompts
- Streamable HTTP and Stdio communication modes
- Enterprise authentication with Token, JWT, and OAuth support
- Web-based token management dashboard (localhost only)
- Catalog federation support for multi-catalog environments
- Enhanced SQL security validation and injection protection
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Doris MCP ServerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via pip install doris-mcp-server. Start the server in Streamable HTTP mode with database connection details (e.g., doris-mcp-server --transport http --db-host 127.0.0.1 --db-port 9030 --db-user root --db-password your_password) or in Stdio mode for direct integration with MCP clients like Cursor (doris-mcp-server --transport stdio). Configuration can also be set via environment variables.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"doris mcp server": {
"doris-mcp-server-freeoneplus": {
"command": "docker",
"args": [
"build",
"-t",
"doris-mcp-server",
"."
]
}
}
}
}
McpServers
{
"doris-mcp-server-freeoneplus": {
"command": "docker",
"args": [
"build",
"-t",
"doris-mcp-server",
"."
]
}
}
Doris MCP Server
Doris MCP (Model Context Protocol) Server is a backend service built with Python and FastAPI. It implements the MCP, allowing clients to interact with it through defined "Tools". It's primarily designed to connect to Apache Doris databases, potentially leveraging Large Language Models (LLMs) for tasks like converting natural language queries to SQL (NL2SQL), executing queries, and performing metadata management and analysis.
🚀 What's New in v0.6.0
- 🔐 Enterprise Authentication System: Revolutionary token-bound database configuration with comprehensive Token, JWT, and OAuth authentication support, enabling secure multi-tenant access with granular control switches and enterprise-grade security defaults
- ⚡ Immediate Database Validation: Real-time database configuration validation at connection time, eliminating query-time blocking and providing instant feedback for invalid configurations - achieving 100% elimination of late-stage connection failures
- 🔄 Hot Reload Configuration Management: Zero-downtime configuration updates with intelligent hot reloading of tokens.json, automatic token revalidation, and comprehensive error handling with rollback mechanisms
- 🏗️ Advanced Connection Architecture: Session caching and connection pool optimization with 60% reduction in connection overhead, intelligent pool recreation, and automatic resource management
- 🌐 Multi-Worker Scalability: True horizontal scaling with stateless multi-worker architecture, efficient load distribution, and enterprise-grade concurrent processing capabilities
- 🔒 Enhanced Security Framework: Comprehensive access control and SQL security validation with immediate validation, role-based permissions, and enhanced injection detection patterns
- 🛠️ Unified Configuration System: Streamlined configuration management with proper command-line precedence, Docker compatibility improvements, and cross-platform deployment support
- 📊 Token Management Dashboard: Complete token lifecycle management with creation, revocation, statistics, and comprehensive audit trails for enterprise token governance
- 🌐 Web-Based Management Interface: Secure localhost-only token administration with intuitive dashboard, database binding configuration, real-time operations, and enterprise-grade access controls
> 🚀 Major Milestone: v0.6.0 establishes the platform as a production-ready enterprise authentication and database management system with zero-downtime operations (hot reload + immediate validation + multi-worker scaling), advanced security controls, and comprehensive token-bound database configuration - representing a fundamental advancement in enterprise data platform capabilities.
What's Also Included from v0.5.1
- 🔥 Critical at_eof Connection Fix: Complete elimination of connection pool errors with intelligent health monitoring and self-healing recovery
- 🔧 Enterprise Logging System: Level-based file separation with automatic cleanup and millisecond precision timestamps
- 📊 Advanced Data Analytics Suite: 7 enterprise-grade data governance tools including quality analysis, lineage tracking, and performance monitoring
- 🏃♂️ High-Performance ADBC Integration: Apache Arrow Flight SQL support with 3-10x performance improvements for large datasets
- ⚙️ Enhanced Configuration Management: Complete ADBC configuration system with intelligent parameter validation
Core Features
MCP Protocol Implementation: Provides standard MCP interfaces, supporting tool calls, resource management, and prompt interactions.
Streamable HTTP Communication: Unified HTTP endpoint supporting both request/response and streaming communication for optimal performance and reliability.
Stdio Communication: Standard input/output mode for direct integration with MCP clients like Cursor.
Enterprise-Grade Architecture: Modular design with comprehensive functionality:
Tools Manager: Centralized tool registration and routing with unified interfaces (doris_mcp_server/tools/tools_manager.py)
Enhanced Monitoring Tools Module: Advanced memory tracking, metrics collection, and flexible BE node discovery with modular, extensible design
Query Information Tools: Enhanced SQL explain and profiling with configurable content truncation, file export for LLM attachments, and advanced query analytics
Resources Manager: Resource management and metadata exposure (doris_mcp_server/tools/resources_manager.py)
Prompts Manager: Intelligent prompt templates for data analysis (doris_mcp_server/tools/prompts_manager.py)
Advanced Database Features:
Query Execution: High-performance SQL execution with advanced caching and optimization, enhanced connection stability and automatic retry mechanisms (doris_mcp_server/utils/query_executor.py)
Security Management: Comprehensive SQL security validation with configurable blocked keywords, SQL injection protection, data masking, and unified security configuration management (doris_mcp_server/utils/security.py)
Metadata Extraction: Comprehensive database metadata with catalog federation support (doris_mcp_server/utils/schema_extractor.py)
Performance Analysis: Advanced column analysis, performance monitoring, and data analysis tools (doris_mcp_server/utils/analysis_tools.py)
Catalog Federation Support: Full support for multi-catalog environments (internal Doris tables and external data sources like Hive, MySQL, etc.)
Enterprise Security: Comprehensive security framework with authentication, authorization, SQL injection protection, and data masking capabilities with environment variable configuration support
Web-Based Token Management: Secure localhost-only interface for complete token lifecycle management with database binding, real-time statistics, and enterprise-grade access controls (doris_mcp_server/auth/token_handlers.py)
Unified Configuration Framework: Centralized configuration management through config.py with comprehensive validation, standardized parameter naming, and smart default database handling with automatic fallback to information_schema
System Requirements
Python: 3.12+
Database: Apache Doris connection details (Host, Port, User, Password, Database)
🚀 Quick Start
Installation from PyPI
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



