ANALYTICS DATABASES / CrateDB engineering
CrateDB MCP Server
Python MCP server from the crate organisation that runs SQL against a CrateDB cluster over its HTTP endpoint behind a SELECT-only check, reads table columns, table metadata and cluster health, lists a curated CrateDB documentation index, and fetches documentation pages by link under three permitted URL prefixes.
“The CrateDB MCP Server for natural-language Text-to-SQL and documentation retrieval specializes in CrateDB database clusters. The Model Context Protocol (MCP) is a protocol that standardizes providing context to language models and AI assistants.”
01 / THE REASONING
Why this made the selection.
- The crate organisation publishes it in crate/cratedb-mcp; pyproject.toml names the package cratedb-mcp, the author CrateDB engineering, the licence Apache-2.0, requires Python >=3.10, classifies it Development Status :: 4 - Beta, and installs the script cratedb-mcp.
- core.py registers six tools: query_sql, get_table_columns and get_table_metadata for Text-to-SQL, get_cratedb_documentation_index and fetch_cratedb_docs for documentation, and get_cluster_health. tool.py sends every query to the cluster's /_sql endpoint.
- query_sql runs a statement only when util/sql.py classifies it as one SELECT with no INTO keyword, unless CRATEDB_MCP_PERMIT_ALL_STATEMENTS is set to a truthy value, and the configuration page recommends a read-only database user created with GRANT DQL in addition.
02 / THE REVIEW RECORD
What we actually inspected.
Source review has boundaries.
A clear record is more useful than a “safe” badge.
Material inspected
- README.md at 4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c: About, the Releases link and Status.
- LICENSE at the same revision: Apache License 2.0 through END OF TERMS AND CONDITIONS, with no copyright appendix.
- pyproject.toml: name, description, licence, author, requires-python, Beta classifier, script.
- docs/install/package.md: the uv tool install line and the uvx alternative.
- docs/install/integrate.md: every client configuration, including the OCI snippet.
- docs/configure/index.md: cluster URL, timeouts, transports, security considerations and prompt customisation.
- cratedb_mcp/core.py: tool registration.
- cratedb_mcp/tool.py: query_cratedb, every tool function, the documentation URL check.
- cratedb_mcp/util/sql.py: sql_is_permitted and SqlStatementClassifier.
- cratedb_mcp/settings.py: CRATEDB_CLUSTER_URL, CRATEDB_MCP_HTTP_TIMEOUT, CRATEDB_MCP_PERMIT_ALL_STATEMENTS and CRATEDB_MCP_DOCS_CACHE_TTL.
- cratedb_mcp/knowledge.py: the query constants, the permitted documentation URL prefixes and the cached HTTP client.
- cratedb_mcp/cli.py: the serve options and their defaults.
- cratedb_mcp/prompt/__init__.py: how instruction and convention fragments are loaded.
- docs/backlog.md: the open item on the Hishel cache location.
Our findings
- Every SQL path posts to {CRATEDB_CLUSTER_URL}/_sql with httpx. Only query_sql applies sql_is_permitted, and get_table_columns calls query_sql; the metadata and health tools use fixed constants.
- cli.py lowers httpx logging to WARNING with the comment "Tame logging of HTTPX to not reveal credentials", because the cluster URL may carry them.
- The documentation tools read an outline from the cratedb-about package and fetch pages through a hishel cache client with a SQLite store; the cache lifetime comes from CRATEDB_MCP_DOCS_CACHE_TTL (default 3600 s).
- The configuration page names transports stdio, http, sse and streamable-http and says http "was called `streamable-http` in earlier spec iterations"; this record lists them as stdio, SSE and Streamable HTTP.
- The client JSON in docs/install/integrate.md is the configExample, unchanged and in source key order.
Not established by this review
- Not executed: it was not installed or run.
- No CrateDB cluster or documentation URL was contacted, and the SQL classifier was not run against any statement.
- The cratedb-about package that supplies the documentation outline, the OCI images, docs/install/oci.md and cratedb_mcp/prompt/instructions.md were not read.
The review applies to the material and revision named here. A newer upstream release can change its behavior.
03 / PUT IT TO WORK
Connect a server deliberately.
DOCUMENTED COMMAND
uv tool install --upgrade cratedb-mcp Copying does not execute this command. It may retrieve a newer version than the reviewed source.
- docs/install/package.md prints `uv tool install --upgrade cratedb-mcp` to install the program user-wide; it pins no version, and the README recommends pinning one.
- The same page says that without `uv tool install`, `uvx cratedb-mcp` acquires the package and runs it ephemerally, and gives `{apt,brew,pipx,zypper} install uv` for uv itself.
- Add a client block from docs/install/integrate.md, which starts `uvx` with `["cratedb-mcp", "serve"]` and sets CRATEDB_CLUSTER_URL and CRATEDB_MCP_TRANSPORT.
Before you start
- uv, as docs/install/package.md recommends.
- Python 3.10 or later.
- A CrateDB cluster URL, with credentials for a read-only user as the configuration page recommends.
Documented configuration example
Use the client and authentication context described in the setup guidance. Configuration formats vary between hosts.
{
"mcpServers": {
"cratedb-mcp": {
"command": "uvx",
"args": [
"cratedb-mcp",
"serve"
],
"env": {
"CRATEDB_CLUSTER_URL": "http://localhost:4200/",
"CRATEDB_MCP_TRANSPORT": "stdio"
},
"alwaysAllow": [
"get_cluster_health",
"get_table_metadata",
"query_sql",
"get_cratedb_documentation_index",
"fetch_cratedb_docs"
],
"disabled": false
}
}
} 04 / FOLLOW THE EVIDENCE
The source trail.
Our notes are separate from the original resource.
Check upstream before adopting a new version.
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/README.md
Supports: upstreamDescription, install.steps, limitations[1], limitations[9]
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/LICENSE
Supports: license, limitations[9]
- pyproject.toml at 4e52d26e ↗Checked
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/pyproject.toml
Supports: publisher, whySelected, language, compatibility, limitations[0]
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/docs/install/package.md
Supports: install
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/docs/install/integrate.md
Supports: configExample, compatibility, install.steps, limitations[8], review.findings
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/docs/configure/index.md
Supports: access.permissions, limitations, transports, bestFor, review.findings
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/core.py
Supports: summary, whySelected, limitations[7]
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/tool.py
Supports: summary, whySelected, bestFor, access.permissions, limitations, review.findings
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/util/sql.py
Supports: limitations, access.permissions, review.findings
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/settings.py
Supports: access.permissions, limitations
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/knowledge.py
Supports: access.permissions, limitations, review.findings
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/cli.py
Supports: transports, access.permissions, limitations
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/cratedb_mcp/prompt/__init__.py
Supports: access.permissions, limitations[7]
https://github.com/crate/cratedb-mcp/blob/4e52d26e3bb6f3fe5fa1b597b4de4d1853bd6d1c/docs/backlog.md
Supports: access.permissions