by kurrent-io
Enables exploration of KurrentDB data by reading, writing, and creating projections through a simple MCP server interface.
KurrentDB MCP Server provides a lightweight MCP endpoint that exposes stream data from a KurrentDB instance. It lets clients query events, list streams, and manage AI‑assisted projections without writing low‑level database code.
--run-projections=all and --start-standard-projections enabled; the $streams stream is used for discovery.pip install -r requirements.txt (or use uv as shown in the README).KURRENTDB_CONNECTION_STRING with your credentials.uv run server.py (or python server.py).read_stream, write_events_to_stream, list_streams.build_projection (AI‑guided), create_projection, update_projection, test_projection, get_projections_status.Q: Do I need Node.js to run this server?
A: No. The server is a Python application; uv or python is used to execute server.py.
Q: How are projections created?
A: Use the build_projection tool with a natural‑language description; the server returns generated code, which you then confirm and create via create_projection.
Q: Which environment variable supplies the DB connection?
A: KURRENTDB_CONNECTION_STRING.
Q: Can I list all streams in a large database?
A: Yes, list_streams supports a limit parameter (default 100) and a read_backwards flag for pagination.
Q: Is authentication handled by the server?
A: Access control relies on the credentials embedded in the connection string; the server does not implement additional auth layers.
This is a simple MCP server to help you explore data and prototype projections faster on top of KurrentDB.
You need to enable --run-projections=all and --start-standard-projections on KurrentDB The $streams stream is used to look for available streams.
Ensure the packages in requirements.txt are installed using pip
Ensure the vu package is installed on your machine where you will be running the MCP Server
For Mac: brew install uv
{
"servers": {
"KurrentDB": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"path to mcp-server folder",
"run",
"server.py"
],
"env": {
"KURRENTDB_CONNECTION_STRING": "insert kurrentdb connection here"
}
}
}
}
This configuration file should work in VS Code (.vscode/mcp.json).
{
"mcpServers": {
"KurrentDB": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"path to mcp-server folder",
"run",
"server.py"
],
"env": {
"KURRENTDB_CONNECTION_STRING": "insert kurrentdb connection here"
}
}
}
}
This configuration file should work in Claude Desktop (https://modelcontextprotocol.io/quickstart/user).
{
"mcpServers": {
"kurrentdb": {
"command": "python",
"args": ["path to mcp-server folder\\server.py"],
"env": {
"KURRENTDB_CONNECTION_STRING": "insert kurrentdb connection here"
}
}
}
}
This configuration file should work in Cursor (.cursor\mcp.json) and Windsurf (.codeium\windsurf\mcp_config.json).
This MCP server is designed to make stream data available to the MCP client. It provides a simple interface for querying and retrieving stream data. It can also create, test and debug projections.
Access control is done using the KurrentDB connection string provided at configuration time as an environment variable.
The servers exposes 8 tool calls:
read_streamlist_streamsbuild_projectioncreate_projectionupdate_projectiontest_projectionwrite_events_to_streamget_projections_statusread_streamReads events from a specific stream in KurrentDB.
Parameters:
stream (required): Stream name to read frombackwards (optional, default: false): Read direction - true for newest first, false for oldest firstlimit (optional, default: 10): Number of events to returnSample Prompts:
Example Usage:
Tool: read_stream
Parameters:
- stream: "orders"
- backwards: true
- limit: 5
write_events_to_streamWrites new events to a stream in KurrentDB.
Parameters:
stream (required): Name of the stream to write todata (required): JSON object containing the event dataevent_type (required): Type/category of the eventmetadata (required): JSON object with additional event informationSample Prompts:
Example Usage:
Tool: write_events_to_stream
Parameters:
- stream: "orders"
- data: {"orderId": "ORD-001", "customerId": 123, "amount": 99.99}
- event_type: "OrderCreated"
- metadata: {"timestamp": "2025-05-19T10:00:00Z", "source": "web"}
list_streamsLists all available streams in the KurrentDB database.
Parameters:
limit (optional, default: 100): Number of streams to returnread_backwards (optional, default: true): Read direction for the $streams streamSample Prompts:
Example Usage:
Tool: list_streams
Parameters:
- limit: 20
- read_backwards: true
Projections in KurrentDB are computed views that process events from streams to create queryable data structures.
build_projectionUses AI assistance to build a projection based on your requirements.
Parameters:
user_prompt (required): Description of what the projection should doSample Prompts:
Example Usage:
Tool: build_projection
Parameters:
- user_prompt: "Create a projection that aggregates order totals by day and calculates running totals"
create_projectionCreates a projection in KurrentDB using provided code.
Parameters:
projection_name (required): Name for the projectioncode (required): Generated projection codeSample Prompts:
Note: Client normally always asks the user for confirmation before creating a projection.
update_projectionUpdates an existing projection with new code.
Parameters:
projection_name (required): Name of the projection to updatecode (required): Updated projection codeSample Prompts:
get_projections_statusRetrieves status and statistics for a specific projection.
Parameters:
projection_name (required): Name of the projectionSample Prompts:
test_projectionWrites test events to a projection to verify its functionality. Verification is done by reading the streams emitted or the state of the projection.
Sample Prompts:
Parameters:
projection_name (required): Name of the projection to testSample Prompts:
Modern LLMs can generate sample events for various use cases on their given enough information.
{
"data": {
"orderId": "ORD-12345",
"customerId": "CUST-789",
"items": [
{"productId": "PROD-001", "quantity": 2, "price": 29.99}
],
"total": 59.98
},
"event_type": "OrderCreated",
"metadata": {
"timestamp": "2025-05-19T14:30:00Z",
"source": "ecommerce-api",
"correlationId": "corr-123"
}
}
{
"data": {
"userId": "USER-456",
"action": "page_view",
"page": "/products/electronics",
"sessionId": "sess-789"
},
"event_type": "UserActivity",
"metadata": {
"timestamp": "2025-05-19T14:35:00Z",
"userAgent": "Mozilla/5.0...",
"ipAddress": "192.168.1.100"
}
}
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by googleapis
An MCP server that streamlines database tool development by handling connection pooling, authentication, observability, and secure access, allowing agents to interact with databases via natural language.
by bytebase
Provides a universal gateway that lets MCP‑compatible clients explore and query MySQL, PostgreSQL, SQL Server, MariaDB, and SQLite databases through a single standardized interface.
by designcomputer
Enables secure interaction with MySQL databases via the Model Context Protocol, allowing AI applications to list tables, read contents, and execute queries safely.
by benborla
Provides read‑only access to MySQL databases for large language models, allowing schema inspection and safe execution of SQL queries.
by neo4j-contrib
Enables natural‑language interaction with Neo4j databases, allowing large language models to query, modify, and manage graph data through multiple transport modes.
by mongodb-js
Provides a Model Context Protocol server that enables interaction with MongoDB databases and MongoDB Atlas clusters through a unified API.
by ClickHouse
Enables AI assistants to run read‑only ClickHouse queries, list databases and tables, and execute embedded chDB queries through an MCP interface.
by neondatabase
Interact with Neon Postgres databases using natural language commands through the Model Context Protocol, enabling conversational database creation, migration, and query execution.
by motherduckdb
Enables SQL analytics on DuckDB and MotherDuck databases via a Model Context Protocol server, allowing AI assistants and IDEs to query data directly.