celp-mcp
OfficialEnables natural language querying and analysis of Databricks SQL warehouses, returning markdown reports with tables and charts.
Enables natural language querying and analysis of MongoDB databases, returning markdown reports with tables and charts.
Enables natural language querying and analysis of MySQL databases, returning markdown reports with tables and charts.
Enables natural language querying and analysis of PostgreSQL databases, returning markdown reports with tables and charts.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@celp-mcp What were the top 5 products by revenue last month?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Celp-MCP – Database & Analytics Server for the Model-Context-Protocol
TL;DR for LLMs
Connect via MCP stdio transport, callinitialize, then use one of the four tools described below.
Tools are idempotent and expect structured JSON arguments – never place credentials inside thepromptfield.
1 • What this server does
celp-mcp exposes natural-language analytics over SQL, MongoDB and Databricks warehouses to any MCP-compatible client.
Internally it hosts a light agent that
maps NL questions → multi-step SQL / Mongo / Spark plans,
executes those plans locally against the database (no data leaves the machine), and
streams back markdown reports with tables, charts and findings.
The server follows the Model-Context-Protocol (MCP) 2025-03-26 spec and ships with the standard stdio transport.
No network sockets are opened unless you start the optional remote streaming helper.
Related MCP server: nl2sql-mcp
2 • Exposed MCP tools
Name | Purpose | Speed vs Reasoning | Required params |
| High-fidelity multi-step analysis | ⭐ Accuracy |
|
| One-shot, single-query path | ⚡ Speed | same as above |
| Return schema map the agent would use | – | same as above (all optional) |
| Return index / key map for optimisation | – | same as above (all optional) |
2.1 Tool argument schemas (abridged)
3 • Plug-and-play usage
For most users no manual JSON-RPC calls are necessary. Any modern MCP client (Claude Desktop, Cursor, @modelcontextprotocol/sdk, etc.) will:
Spawn the server as a subprocess via the command provided in your config (see Section 5).
Negotiate the MCP handshake automatically.
Surface the four tools (
query-database,query-database-turbo,get-schema,get-index-map) to the language model.
All you have to supply are
the command & args (usually
npx -y celp-mcp), andthe environment variables for your database +
CELP_API_KEY.
If you are building a custom MCP client and need low-level details (e.g. raw initialize / call_tool payloads), see the annotated code in src/index.ts or the official protocol docs at https://modelcontextprotocol.io.
4 • Essential environment variables
At minimum the process needs:
Database | Required vars |
Postgres/MySQL |
|
MongoDB | Either the five above or a single |
Databricks |
|
And for every setup:
CELP_API_KEY– authorises the orchestration backend.
That's all an MCP client must supply.
See docs/ADVANCED.md if you want SSL flags, replica-set tuning, debug logging, etc.
5 • Claude / Cursor integration recipes
Place the JSON block below in:
Claude Desktop →
~/Library/Application Support/Claude/claude_desktop_config.jsonCursor (VS Code) → your Settings JSON or
.vscode/mcp.json
5.1 PostgreSQL
{
"mcpServers": {
"celp-postgres": {
"command": "npx",
"args": ["-y", "celp-mcp"],
"env": {
"DATABASE_TYPE": "postgres",
"DATABASE_HOST": "127.0.0.1",
"DATABASE_PORT": "5432",
"DATABASE_USER": "readonly",
"DATABASE_PASSWORD": "supersecret",
"DATABASE_NAME": "analytics",
"PG_DISABLE_SSL": "true",
"CELP_API_KEY": "sk-..."
}
}
}
}5.2 MySQL
{
"mcpServers": {
"celp-mysql": {
"command": "npx",
"args": ["-y", "celp-mcp"],
"env": {
"DATABASE_TYPE": "mysql",
"DATABASE_HOST": "db.internal",
"DATABASE_PORT": "3306",
"DATABASE_USER": "readonly",
"DATABASE_PASSWORD": "pw",
"DATABASE_NAME": "ecommerce",
"CELP_API_KEY": "sk-..."
}
}
}
}5.3 MongoDB (connection-string form)
{
"mcpServers": {
"celp-mongo": {
"command": "npx",
"args": ["-y", "celp-mcp"],
"env": {
"DATABASE_TYPE": "mongodb",
"MONGO_URL": "mongodb://analytics_user:pw@db1.example.com:27017/marketing?authSource=admin&ssl=true",
"CELP_API_KEY": "sk-..."
}
}
}
}5.4 Databricks SQL Warehouse
{
"mcpServers": {
"celp-dbx": {
"command": "npx",
"args": ["-y", "celp-mcp"],
"env": {
"DATABASE_TYPE": "databricks",
"DATABRICKS_HOST": "adb-1234567890.2.azuredatabricks.net",
"DATABRICKS_TOKEN": "dapiXXXXXXXXXXXXXXXX",
"DATABRICKS_HTTP_PATH": "/sql/1.0/warehouses/0123456789abcdef",
"DATABRICKS_CATALOG": "main",
"CELP_API_KEY": "sk-..."
}
}
}
}After saving, restart Claude / Cursor. The server will be launched on demand and the four tools will be advertised to the language model automatically.
6 • Advanced usage & orchestration API
query-database* tools ultimately send work to an LLM-driven orchestration service at
https://celp-celp-mcp.onrender.com.
To override (e.g., when self-hosting) set STREAMING_API_URL.
The path src/index.ts::orchestrate shows the full client–socket workflow, including
schema pre-upload and incremental chunk handling. Feel free to reuse it for custom front-ends.
7 • Security & privacy
All SQL / Mongo / Spark queries run locally.
The orchestration service only receives generated SQL, never raw data.
Credentials are kept in the process env, never serialized over MCP or sockets.
For production deployments we recommend:
Provision a read-only DB user.
Restrict network access to the DB port.
Rotate
CELP_API_KEYregularly.Audit agent prompts to avoid prompt-injection.
8 • Development
git clone https://github.com/CelpAI/celp-mcp.git
cd celp-mcp
pnpm install
pnpm build && pnpm start # runs built JS
pnpm dev # ts-node + watchThe main entry point is src/index.ts.
Tool definitions live in src/initTools.ts.
9 • License
Released under the MIT License – see LICENSE for full text.
Available Tools
4 toolsget-index-mapB
Returns the index map for the database. Only use this tool after previous attempts fail, or when specifically requested
Inputs: apiKey, databaseConfig, databaseConnectionId.
get-schemaB
Returns the schema map for the database. Only use this tool after previous attempts fail, or when specifically requested
Inputs: apiKey, databaseConfig, databaseConnectionId.
query-databaseB
Data Analyst Agent: Reasoning Analysis Mode
This tool translates natural language into multi-step SQL analysis plans and executes them against databases. Use this for complex analytical questions requiring more reasoning.
Capabilities
Performs multi-step analyses with each step building on previous results
Analyzes data across multiple tables with complex relationships
Handles complex queries requiring careful reasoning and planning
Produces comprehensive markdown reports with insights
When to Use
For complex analytical questions requiring deep reasoning
When accuracy and comprehensiveness is more important than speed
For queries involving multiple tables or complex relationships
When detailed insights and explanations are needed
Effective Prompts
Be specific about metrics, time periods, and entities of interest
Include relevant business context for interpretation
Specify desired output format (tables, charts, insights)
For complex analyses, break down into logical components
Restrictions:
Don't sent database credentials in the payload, it's handled by the server.
Don't sent API keys in the payload, it's handled by the server.
Inputs: prompt (required), celpApiKey, databaseConfig, databaseConnectionId.
query-database-turboC
When to Use (Natural-Language Heuristics)
Because the model sees only the user's question and minimal schema hints, Turbo Mode should activate automatically whenever the request exhibits every one of these surface-level cues. Each cue corresponds to a first-principles driver of SQL complexity that the model can infer without deep schema knowledge:
Signal in the User's Question | Why It Indicates Turbo Is Safe |
Single Factual Verb — verbs like "count," "list," "show," "sum," "average," or "max/min," used once. | One aggregate or projection keeps the SQL to a single |
At Most One Qualifier Clause — a lone filter such as a date range, status, or simple equality ("where status = 'active'"). | Few filters avoid nested logic or subqueries. |
No Comparative Language — absent words like "versus," "compare," "trend," "change over time," "prior year," "by each," etc. | Comparisons imply multiple groupings, time windows, or self-joins. |
No Multi-Dimensional Grouping Phrases — avoids "by region and product," "per user per month," "split across categories." | Multiple dimensions require complex |
Mentions One Table-Like Concept — either explicitly ("in | Referencing several entities hints at join logic the model can't verify quickly. |
Requests Raw IDs or a Small Top-N List — e.g., "give me the top 5 order IDs." | The result set will be tiny, so execution latency is dominated by query planning—not data transfer. |
No Need for Explanation or Visualization — the user asks only for the numbers or rows, not "explain why" or "graph this." | Generating narrative or charts costs tokens and time; Turbo avoids it. |
Quick mental check: Could you answer this with a single short sentence and a single-line SQL query template? If yes, Turbo Mode is appropriate.
Limitations
Unsuitable for multi-step or exploratory workflows
May miss domain nuances captured in the standard reasoning path
Provides limited explanation and simplistic visuals
Effective Prompts
"How many active users signed up last week?"
"List the five most expensive orders."
"Show the total revenue for March 2025."
"What is the average session length today?"
Inputs: prompt (required), celpApiKey, databaseConfig, databaseConnectionId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The two metadata tools (get-index-map, get-schema) are clearly distinct. The two query tools (query-database, query-database-turbo) serve different complexity levels, but their overlapping purpose could cause confusion if the agent misjudges the query difficulty.
All tool names follow a consistent hyphenated lowercase pattern: get for metadata retrieval and query for querying, with a suffix for the turbo variant. The naming is uniform and predictable.
With 4 tools covering metadata retrieval and two query modes, the count is well-scoped for a database server. No unnecessary tools, and each serves a distinct purpose.
The tool surface covers schema/index inspection and both simple and complex querying. However, it lacks write operations (insert, update, delete) and explicit table listing, which are notable gaps for a comprehensive database server.
Maintenance
Related MCP Connectors
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP (Model Context Protocol) server that exposes natural language to SQL functionality, allowing any MCP-compatible client to convert plain English questions into SQL queries for database interaction using AI.3MIT
- FlicenseNot gradedqualityFmaintenanceA production-ready MCP server that transforms natural language into safe, executable SQL queries with multi-database support and intelligent schema analysis.1-
- AlicenseAqualityDmaintenanceA database-agnostic MCP server that enables natural language queries to your database through Claude or Copilot, automatically writing and executing SQL.87 npmMIT
- AlicenseNot gradedqualityDmaintenanceMCP server for SQL analytics on DuckDB and MotherDuck databases, enabling AI assistants and IDEs to query data via natural language.1MIT