CrateDB MCP Server
» Documentation | Releases | Issues | Source code | License | CrateDB | Community Forum
About
Model Context Protocol MCP is a protocol that standardizes providing context to LLMs like Claude, ChatGPT and MistralAI.
CrateDB MCP server lets these LLMs operate directly on CrateDB enabling use cases like:
- Answer questions about your data and database state
- Help you debug and optimize queries directly on the database
To use a MCP server you need a client that supports the protocol, the most notable ones are: Claude Desktop, ChatGTP desktop, OPenAI agents SDK and Cursor.
Examples
For questions like optimizing queries and CrateDB specific syntax/capabilities, we encourage the
LLMs to fetch https://cratedb.com/docs to offer the most accurate possible information.
These are examples of questions that have been tested and validated by the team. Remember that LLMs can still hallucinate and give incorrect answers.
- Optimize this query: “SELECT * FROM movies WHERE release_date > ‘2012-12-1’ AND revenue”
- Tell me about the health of the cluster
- What is the storage consumption of my tables, give it in a graph.
- How can I format a timestamp column to ‘2019 Jan 21’.
Data integrity
We do not recommend letting the LLMs insert data or modify columns by itself, as such we tell the
LLMs to only allow ‘SELECT’ statements in the cratedb_sql tool, you can jailbreak this against
our recommendation.
Install
uv tool install --upgrade git+https://github.com/crate/cratedb-mcp
Note: We recommend to use uv tool install to install the program “user”-wide
into your environment so you can use it across your terminal or MCP client
sessions like Claude.
Configure
Configure the CRATEDB_MCP_HTTP_URL environment variable to match your CrateDB instance.
For example, when connecting to CrateDB Cloud, use a value like
https://admin:dZ...6LqB@testdrive.eks1.eu-west-1.aws.cratedb.net:4200/.
When connecting to CrateDB on localhost, use http://localhost:4200/.
export CRATEDB_MCP_HTTP_URL="http://localhost:4200/"
export CRATEDB_MCP_HTTP_URL="https://example.aks1.westeurope.azure.cratedb.net:4200"
The CRATEDB_MCP_DOCS_CACHE_TTL environment variable (default: 3600) defines
the cache lifetime for documentation resources.
Usage
Start MCP server with stdio transport (default).
CRATEDB_MCP_TRANSPORT=stdio cratedb-mcp
Start MCP server with sse transport.
CRATEDB_MCP_TRANSPORT=sse cratedb-mcp
Note: If you are unable to use uv tool install, please use
uv run cratedb-mcp to acquire and run the package ephemerally.
Simple Claude configuration
To use the MCP version within Claude Desktop, you can use the following configuration:
{
"mcpServers": {
"my_cratedb": {
"command": "uvx",
"args": ["--python", "3.13", "--from", "git+https://github.com/crate/cratedb-mcp", "cratedb-mcp"],
"env": {
"CRATEDB_MCP_HTTP_URL": "http://localhost:4200/",
"CRATEDB_MCP_TRANSPORT": "stdio"
}
}
}
}
Development
To learn how to set up a development sandbox, see the development documentation.
CrateDB MCP Server
Project Details
- crate/cratedb-mcp
- Apache License 2.0
- Last Updated: 5/10/2025
Recomended MCP Servers
MCP Server for Firefly III
This read-only MCP Server allows you to connect to WordPress data from Claude Desktop through CData JDBC Drivers....
Browse the web, directly from Cursor etc.
Query and Summarize your chat messages.
A Model Context Protocol server for the Codex API
MCP server to integrate AWS S3 and LLM
A Model Context Protocol (MCP) server that enables AI assistants to query and analyze Prometheus metrics through standardized...





