MCP
The CrateDB MCP Server provides two families of tools.
The Text-to-SQL tools talk to a CrateDB database cluster to inquire database and table metadata, and table content.
Tool names are: get_cluster_health
, get_table_metadata
, query_sql
The documentation server tools looks up guidelines specific to CrateDB topics, to provide the most accurate information possible. Relevant information is pulled from https://cratedb.com/docs, curated per cratedb-outline.yaml through the cratedb-about package.
The two tool names are get_cratedb_documentation_index
and fetch_cratedb_docs
.
Clients
The CrateDB MCP Server is compatible with AI assistants that support the Model Context Protocol (MCP), either using standard input/output (stdio
), server-sent events (sse
), or HTTP Streams (http
, earlier streamable-http
).
Claude, Cline, Cursor, Roo Code, Windsurf
Add the following configuration to your AI assistant's settings to enable the CrateDB MCP Server.
Claude:
claude_desktop_config.json
Cline:
cline_mcp_settings.json
Cursor:
~/.cursor/mcp.json
or.cursor/mcp.json
Roo Code:
mcp_settings.json
or.roo/mcp.json
Windsurf:
~/.codeium/windsurf/mcp_config.json
{
"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
}
}
}
VS Code
Add an MCP server to your VS Code user settings to enable the MCP server across all workspaces in your settings.json
file.
{
"mcp": {
"servers": {
"cratedb-mcp": {
"command": "uvx",
"args": ["cratedb-mcp", "serve"],
"env": {
"CRATEDB_CLUSTER_URL": "http://localhost:4200/",
"CRATEDB_MCP_TRANSPORT": "stdio"
}
}
}
},
"chat.mcp.enabled": true
}
Add an MCP server to your VS Code workspace to configure an MCP server for a specific workspace per .vscode/mcp.json
file. In this case, omit the top-level mcp
element, and start from servers
instead.
Alternatively, VS Code can automatically detect and reuse MCP servers that you defined in other tools, such as Claude Desktop. See also Automatic discovery of MCP servers.
{
"chat.mcp.discovery.enabled": true
}
Goose
Configure extensions
in your ~/.config/goose/config.yaml
. See also using Goose extensions.
extensions:
cratedb-mcp:
name: CrateDB MCP
type: stdio
cmd: uvx
args:
- cratedb-mcp
- serve
enabled: true
envs:
CRATEDB_CLUSTER_URL: "http://localhost:4200/"
CRATEDB_MCP_TRANSPORT: "stdio"
timeout: 300
LibreChat
Configure mcpServers
in your librechat.yaml
. See also LibreChat and MCP and LibreChat MCP examples.
mcpServers:
cratedb-mcp:
type: stdio
command: uvx
args:
- cratedb-mcp
- serve
env:
CRATEDB_CLUSTER_URL: "http://localhost:4200/"
CRATEDB_MCP_TRANSPORT: "stdio"
Last updated