Claude + SignalQL
MCP setup
- Configure Claude Desktop (or your MCP host) to launch the published stdio server:
bash
npx @signalql/mcp- If you are running from a local checkout, build and launch the workspace binary instead:
bash
npm install
npm run build
npm exec -w @signalql/mcp -- signalql-mcp- Confirm tools appear:
run_signalql,get_schema,list_events,describe_event.
Prompt patterns
- Paste the grammar pack once per project; it covers the current surface (v0.3 aggregates/metrics, v0.4 graph/lineage) plus the basic
COUNT/FUNNELforms. - Start sessions with: “Emit SignalQL only (never raw SQL); use the simplest surface that answers the question.”
First successful query path
- Call
get_schemato retrieve portable model metadata. - Call
list_eventsto avoid hallucinated event names. - Ask Claude to author SignalQL for a concrete question, then
run_signalqlto compile (and optionally execute whenDATABASE_URLis set on the server host).
Ask for SignalQL plus interpretation, not only SQL, so analytics semantics stay explicit.
Run this query now
signalql
COUNT events FROM events WHERE event_name = "signup" DURING LAST 7 DAYSExpected output shape (from run_signalql): SQL string plus params array, where the literal filters are represented in params.
Validation check: verify the compiled SQL uses placeholders and values appear in params, not inline SQL.