MCP Directory

Apache Doris MCP Server

Query, explore, and govern Apache Doris databases via MCP — NL2SQL, metadata, and analytics tools.

Unverified
stdio (local)
No auth
Python

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
pip install doris-mcp-server

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "apache-doris-mcp-server": {
      "command": "doris-mcp-server",
      "args": [
        "--transport",
        "stdio"
      ],
      "env": {
        "DORIS_HOST": "127.0.0.1",
        "DORIS_PORT": "9030",
        "DORIS_USER": "root",
        "DORIS_PASSWORD": "your_db_password"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Python 3.12+
  • An Apache Doris database (host, port, user, password, database)
  • doris-mcp-server installed (pip install doris-mcp-server)

About Apache Doris MCP Server

Apache Doris MCP Server exposes an Apache Doris (real-time OLAP/lakehouse) database to MCP clients through a rich set of tools: SQL execution, metadata and schema discovery across multiple catalogs, SQL explain/profile, monitoring and memory statistics, data-quality and lineage analytics, and high-performance ADBC (Arrow Flight SQL) queries. It runs as a stdio process for direct client integration (Cursor, Kiro) or as a Streamable HTTP service at /mcp, and includes an enterprise security framework with multi-auth support, token-bound database config, SQL injection protection, and data masking.

Tools & capabilities (25)

exec_query

Execute a SQL query and return results (supports db_name, catalog_name, max_rows, timeout).

get_table_schema

Get detailed table structure information.

get_db_table_list

Get the list of all table names in a specified database.

get_db_list

Get the list of all database names.

get_table_comment

Get table comment information.

get_table_column_comments

Get comment information for all columns in a table.

get_table_indexes

Get index information for a specified table.

get_recent_audit_logs

Get audit log records for a recent period.

get_catalog_list

Get the list of all catalog names.

get_sql_explain

Get a SQL execution plan with configurable content truncation and file export for LLM analysis.

get_sql_profile

Get a SQL execution profile with content management and file export for LLM optimization workflows.

get_table_data_size

Get table data size information via the FE HTTP API.

get_monitoring_metrics_info

Get Doris monitoring metrics definitions and descriptions.

get_monitoring_metrics_data

Get actual Doris monitoring metrics data from nodes with flexible BE discovery.

get_realtime_memory_stats

Get real-time memory statistics via the BE Memory Tracker with auto/manual BE discovery.

get_historical_memory_stats

Get historical memory statistics via the BE Bvar interface with flexible BE configuration.

analyze_data_quality

Comprehensive data quality analysis combining completeness and distribution analysis.

trace_column_lineage

End-to-end column lineage tracking through SQL analysis and dependency mapping.

monitor_data_freshness

Real-time data staleness monitoring with configurable freshness thresholds.

analyze_data_access_patterns

User behavior analysis and security anomaly detection with access pattern monitoring.

analyze_data_flow_dependencies

Data flow impact analysis and dependency mapping between tables and views.

analyze_slow_queries_topn

Performance bottleneck identification with top-N slow query analysis and patterns.

analyze_resource_growth_curves

Capacity planning with resource growth analysis and trend forecasting.

exec_adbc_query

High-performance SQL execution using the ADBC (Arrow Flight SQL) protocol.

get_adbc_connection_info

ADBC connection diagnostics and status monitoring for Arrow Flight SQL.

What this server can do

Apache Doris MCP Server provides tools for these capabilities — tap one to see every MCP server that does the same:

When to use it

  • Let an AI assistant query Apache Doris with natural language (NL2SQL) and return results
  • Explore database/table schemas and metadata across internal and external catalogs (Hive, MySQL, etc.)
  • Analyze and optimize slow queries using SQL explain/profile output as LLM attachments
  • Run data-governance checks: data quality, column lineage, and freshness monitoring
  • Move large result sets efficiently via Arrow Flight SQL (ADBC) with 3-10x performance gains

Security notes

Connects to a live Apache Doris database with full credentials. SQL security validation is enabled by default (ENABLE_SECURITY_CHECK=true) and blocks DDL/DML/DCL and dangerous keywords (DROP, DELETE, TRUNCATE, ALTER, CREATE, INSERT, UPDATE, GRANT, REVOKE, EXEC, etc.), with SQL injection protection and data masking. For multi-tenant/HTTP deployments, enterprise Token/JWT/OAuth auth and token-bound database configuration are available; the web-based token management dashboard is localhost-only and requires TOKEN_MANAGEMENT_ADMIN_TOKEN. Doris-backed OAuth routes tool calls through per-user Doris connection pools so Doris RBAC is the final data authorization boundary.

Apache Doris MCP Server FAQ

Which transports are supported?

Stdio (recommended for clients like Cursor and Kiro) and Streamable HTTP. The HTTP service exposes a unified MCP endpoint at http://<host>:<port>/mcp and a health check at /health.

How do I configure the database connection?

Via env vars in the client config (DORIS_HOST, DORIS_PORT, DORIS_USER, DORIS_PASSWORD, DORIS_DATABASE), command-line flags (--db-host, --db-port, --db-user, --db-password), or a .env file.

Is it safe against destructive SQL?

Yes. SQL security validation is on by default and blocks DDL/DML/DCL operations and dangerous keywords, with SQL injection protection and configurable data masking. Blocked keywords are customizable via BLOCKED_KEYWORDS.

Does it support multiple catalogs?

Yes. All metadata tools accept an optional catalog_name, and SQL queries use three-part naming (catalog.database.table) to query internal Doris tables and external sources, including cross-catalog joins.

Alternatives to Apache Doris MCP Server

Compare all alternatives →

Google's official MCP server with prebuilt BigQuery tools, querying datasets via Application Default Credentials.

Verified
stdio (local)
OAuth
Go
10 tools
Updated 23 days agoRepo

Create, manage, and query your InstantDB apps, schemas, permissions, and data from your AI editor.

Unverified
HTTP (remote)
OAuth
TypeScript
7 tools
Updated 1 day agoRepo

Zero-dependency, token-efficient database MCP server for Postgres, MySQL, SQL Server, MariaDB, and SQLite.

Unverified
stdio (local)
No auth
TypeScript
3 tools
Updated 1 day agoRepo