Skip to main content
Glama
CelpAI

celp-mcp

Official
by CelpAI

Celp-MCP – Database & Analytics Server for the Model-Context-Protocol

TL;DR for LLMs
Connect via MCP stdio transport, call initialize, then use one of the four tools described below.
Tools are idempotent and expect structured JSON arguments – never place credentials inside the prompt field.


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

  1. maps NL questions → multi-step SQL / Mongo / Spark plans,

  2. executes those plans locally against the database (no data leaves the machine), and

  3. 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

query-database

High-fidelity multi-step analysis

⭐ Accuracy

prompt (string), optional databaseConfig, databaseConnectionId, celpApiKey

query-database-turbo

One-shot, single-query path

⚡ Speed

same as above

get-schema

Return schema map the agent would use

same as above (all optional)

get-index-map

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:

  1. Spawn the server as a subprocess via the command provided in your config (see Section 5).

  2. Negotiate the MCP handshake automatically.

  3. 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), and

  • the 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

DATABASE_TYPE · DATABASE_HOST · DATABASE_USER · DATABASE_PASSWORD · DATABASE_NAME

MongoDB

Either the five above or a single MONGO_URL

Databricks

DATABASE_TYPE=databricks · DATABRICKS_HOST · DATABRICKS_TOKEN · DATABRICKS_HTTP_PATH · DATABRICKS_CATALOG

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.json

  • Cursor (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:

  1. Provision a read-only DB user.

  2. Restrict network access to the DB port.

  3. Rotate CELP_API_KEY regularly.

  4. 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 + watch

The 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 tools
get-index-mapB

Returns the index map for the database. Only use this tool after previous attempts fail, or when specifically requested

ParametersJSON Schema
NameRequiredDescriptionDefault
apiKeyNo
databaseConfigNo
databaseConnectionIdNo

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided. The description only says 'Returns' which implies a read operation, but does not explicitly state read-only nature, permissions required, or any side effects. It fails to disclose traits the agent needs to safely invoke the tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two succinct sentences that front-load purpose and usage. No unnecessary words; every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given three parameters with a complex nested object and no output schema, the description omits critical details on input construction and return value format. The tool is underspecified for an agent to use correctly without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description adds no information about the three parameters (apiKey, databaseConfig, databaseConnectionId). The agent has no guidance on what each parameter means or how to construct the nested object.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states 'Returns the index map for the database' which is a specific verb and resource. However, it does not elaborate on what an index map contains, leaving some ambiguity. It distinguishes from siblings only via usage context, not directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises to use only after previous attempts fail or when specifically requested, providing clear when-to-use and limiting scope. This is a standout feature.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-schemaB

Returns the schema map for the database. Only use this tool after previous attempts fail, or when specifically requested

ParametersJSON Schema
NameRequiredDescriptionDefault
apiKeyNo
databaseConfigNo
databaseConnectionIdNo

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It merely states the tool 'returns the schema map' with no details on side effects, authentication needs, rate limits, or error conditions. The behavioral insight is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two short, front-loaded sentences. The first states the purpose, the second provides usage guidelines. Every sentence is necessary and concise, with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of the input schema (nested databaseConfig object, three parameters, no output schema), the description is far from complete. It does not explain the return format, how parameters influence results, or common pitfalls, leaving significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and three parameters (apiKey, databaseConfig, databaseConnectionId), the description adds no meaning to any parameter. It fails to explain their purpose or usage, leaving the agent without guidance on how to invoke the tool correctly.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'returns the schema map for the database' with a clear verb and resource. However, it does not differentiate itself from sibling tools like 'get-index-map' or explain what a schema map is, missing the highest level of distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Only use this tool after previous attempts fail, or when specifically requested,' providing clear context on when to use it. It does not mention when not to use it or alternative tools, so it lacks exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
celpApiKeyNo
databaseConfigNo
databaseConnectionIdNo

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full transparency burden. It discloses capabilities (multi-step analysis, cross-table reasoning, markdown reports) and restrictions (credentials handled server-side). However, it omits behavioral traits like whether it modifies data (assumed read-only but not stated), performance characteristics, or rate limits. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections (Capabilities, When to Use, Effective Prompts, Restrictions) and a clear title. However, it is lengthy and includes redundant guidance (e.g., 'Be specific about metrics'). Some sentences could be condensed. It is front-loaded but not optimally concise for an MCP tool description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (nested objects, no output schema, 4 parameters), the description is incomplete. It lacks parameter documentation, does not specify return format beyond 'markdown reports', and omits error handling or output schema details. The 'When to Use' is helpful but does not compensate for missing parameter semantics and output context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description adds no information about parameters beyond the schema. It fails to explain what 'prompt', 'celpApiKey', 'databaseConfig', or 'databaseConnectionId' represent. The only hint is the restriction about credentials, which vaguely relates to 'celpApiKey' and 'databaseConfig.password'. This is insufficient for a tool with 4 parameters and complex nested objects.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'translates natural language into multi-step SQL analysis plans and executes them against databases.' It explicitly labels itself as for 'complex analytical questions requiring more reasoning,' distinguishing it from sibling 'query-database-turbo' which implies a faster, simpler variant. The verb 'translates and executes' plus the resource 'databases' is specific. Good differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'When to Use' section provides clear context: complex questions, multi-table analyses, accuracy over speed, detailed insights. It also includes 'Restrictions' warning against sending credentials. However, it does not explicitly name sibling alternatives or state when NOT to use (e.g., simple queries should use query-database-turbo). The guidance is solid but lacks explicit exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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 SELECT.

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 GROUP BY and often joins.

Mentions One Table-Like Concept — either explicitly ("in orders") or implicitly ("orders today," "users last week").

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?"

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYes
celpApiKeyNo
databaseConfigNo
databaseConnectionIdNo

TDQS

C2.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses limitations such as unsuitability for multi-step workflows, limited explanation, and simplistic visuals. However, it lacks information about security (e.g., SQL injection risks), authentication requirements, and whether the tool is read-only. Since no annotations are provided, these gaps are significant.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is excessively long, dominated by a table and detailed heuristics. It is not front-loaded with essential information; the actual purpose and parameters are missing. Every sentence does not earn its place, as many are redundant or tangential to defining the tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (nested objects, many parameters, no output schema), the description should explain the tool's function, input parameters, and return values. It only covers usage heuristics, leaving the agent without crucial context for invocation. The description is far from complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 4 parameters, with 0% schema description coverage. The description does not mention any parameter, leaving the agent without guidance on what 'prompt', 'celpApiKey', 'databaseConfig', or 'databaseConnectionId' mean or how to use them. This is a critical failure for parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description focuses on when to use 'Turbo Mode' rather than clearly stating what the tool does. It implies it executes database queries with optimizations, but the primary function is not explicitly defined. The verb 'query' is only in the name, not in the description.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a detailed table of heuristics for when to use Turbo Mode, along with a quick mental check and example prompts. It also lists limitations. However, it does not directly compare this tool to its sibling 'query-database' or specify when not to use it in favor of alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv1.0.50
    • First observedget-index-map
    • First observedget-schema
    • First observedquery-database
    • First observedquery-database-turbo

TDQS

B3.3/5.0
Disambiguation4/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness3/5

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

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    An 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.
    3
    MIT
  • F
    license
    Not graded
    quality
    F
    maintenance
    A production-ready MCP server that transforms natural language into safe, executable SQL queries with multi-database support and intelligent schema analysis.
    1
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A database-agnostic MCP server that enables natural language queries to your database through Claude or Copilot, automatically writing and executing SQL.
    16
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for SQL analytics on DuckDB and MotherDuck databases, enabling AI assistants and IDEs to query data via natural language.
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CelpAI/celp-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server