Getting started — Datablit MCP
This guide walks you through installing and connecting the Datablit MCP server, so you can query your event data from Cursor, Claude Desktop, or any other MCP client.
1. Create an agent in the Datablit console
- Open https://console.datablit.com.
- Go to Event → (Select a project) → + (Add agent).
- Create an agent and copy its API key. You will use this as the
apiKeyin your MCP configuration.
2. Add the MCP server to your client
Add the following JSON to your MCP server settings in Cursor, Claude Desktop, or another MCP client:
{
"mcpServers": {
"datablit": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.datablit.com/mcp",
"--header",
"apiKey: <your-api-key>"
]
}
}
}3. Replace the API key
Replace the value after apiKey: with your agent API key from step 1. The key in the example above is a placeholder and will not work for your project.
4. Confirm the connection
Restart or reload your MCP client. Once connected, your MCP client is talking to the Datablit server and you can use the Datablit tools.
5. Available tools
After connecting, you can use the following tools, grouped by purpose.
Analysis
Query and explore your event data in the Datablit warehouse.
get_schema— Returns Datablit warehouse table schemas (columns, types, keys). If you omit the table name, all tables are returned with their schemas.run_query— Validates and runs a read-only Datablit warehouseSELECTquery.
Experiments
Create and manage A/B experiments (variants, traffic percentage, static allotment).
list_experiments— List all experiments for the current project.get_experiment— Get a single experiment by ID.create_experiment— Create a new experiment. Requires name; optional description, status (active/disabled), percentage, variants, staticAllotment.update_experiment— Update an existing experiment by ID. All fields except id are optional.delete_experiment— Delete an experiment by ID.
Signals
Define and manage signals (realtime or batch) that compute metrics per entity. Use keys in rules or for analytics.
list_signals— List all signals for the current project.get_signal— Get a single signal by key.create_signal— Create a new signal. Requires key, type (realtime/batch); optional entityIdField (default user_id), status (default disabled; use update_signal to enable), description, realtime_signal_config or batch_signal_config.update_signal— Update an existing signal by key. All fields except key are optional.delete_signal— Delete a signal by key.get_signals_value— Get computed signal values for an entity. Requires entityId (e.g. user_id, device_id); optional keys (omit for all).
Rules
Define boolean rules over signal values and input params. Expressions use realtime signal keys directly; for batch signals use key_columnName (e.g. user_lifetime_orders). All signal values are float; the expression must return a bool.
list_rules— List all rules for the current project.get_rule— Get a single rule by key.create_rule— Create a new rule. Requires key (snake_case), expression (bool). Optional: entityIdField (default user_id), description, default_value, and_rules, or_rules.update_rule— Update an existing rule by key. All fields except key are optional.delete_rule— Delete a rule by key.evaluate_rule— Evaluate a rule for a given entity. Requires key, entityId; optional params (map of name to float). Returns{ key, entityId, result: bool }.
6. Sample prompts
Try these in your MCP client to explore data and manage experiments, signals, and rules:
Analysis
- "What tables do I have in my project? Show me the schema."
- "Run a query: count events by event name in the last 7 days."
- "Show me the top 10 events by volume from the events table."
Experiments
- "List all experiments in this project."
- "Create an experiment named 'Checkout button color' with two variants: control and test, 50/50."
- "Get the experiment with id … and then update its status to disabled."
Signals
- "List all signals for this project."
- "Create a realtime count signal for 'page_viewed' with key page_views and entityIdField user_id."
- "Get signal values for entityId user_123."
- "Update the signal with key page_views to set status to active."
Rules
- "List all rules."
- "Create a rule with key high_value_user where expression is orders > 10 (assuming you have an orders signal)."
- "Evaluate the rule high_value_user for entityId user_456 with params ."
Need support?
Questions or issues? Contact Datablit Support: contact@datablit.com