MCP Server
TypeScript MCP server that exposes WireLog as native tools for AI agents. Uses stdio transport.
GitHub: github.com/wirelogai/wirelog-mcp
Package: @wirelogai/mcp on npm
Install
npm install -g @wirelogai/mcpOr run without installing:
npx @wirelogai/mcpConfiguration
| Variable | Required | Default | Description |
|---|---|---|---|
WIRELOG_API_KEY | Yes | — | sk_ or aat_ key with query + track scope |
WIRELOG_HOST | No | https://api.wirelog.ai | API base URL |
Claude Desktop setup
Add to claude_desktop_config.json:
{ "mcpServers": { "wirelog": { "command": "npx", "args": ["@wirelogai/mcp"], "env": { "WIRELOG_API_KEY": "sk_YOUR_SECRET_KEY" } } }}Restart Claude Desktop. The four WireLog tools appear in the tool list.
Tools
wirelog_query
Run a pipe DSL query. Returns Markdown by default.
| Parameter | Type | Required | Description |
|---|---|---|---|
q | string | Yes | Pipe DSL query string |
format | "llm" | "json" | "csv" | No | Output format. Default "llm" (Markdown). |
limit | number | No | Max rows. Default 100, max 10000. |
Example: {"q": "signup | last 30d | count by day", "format": "llm"}wirelog_track
Track an analytics event.
| Parameter | Type | Required | Description |
|---|---|---|---|
event_type | string | Yes | Event name |
user_id | string | No | User identifier |
device_id | string | No | Device identifier |
event_properties | object | No | Arbitrary event properties |
user_properties | object | No | User properties sent with the event |
wirelog_identify
Bind a device to a user and/or set profile properties.
| Parameter | Type | Required | Description |
|---|---|---|---|
user_id | string | Yes | User identifier |
device_id | string | No | Device to bind (recommended for stitching) |
user_properties | object | No | Flat key-value properties (behaves like $set) |
user_property_ops | object | No | Granular ops: $set, $set_once, $add, $unset |
wirelog_list_events
Discover tracked event types. Takes no parameters. Runs:
* | last 30d | count by event_type | top 50Returns a Markdown table of event names and counts.
Usage pattern
The agent should call wirelog_list_events first to discover what events exist, then write targeted queries with wirelog_query. Do not guess event names.
Agent: wirelog_list_events-> | event_type | count | |-------------|-------| | page_view | 12340 | | signup | 890 | | purchase | 210 |
Agent: wirelog_query {"q": "funnel signup -> purchase | last 30d"}-> | step | count | rate | |----------|-------|--------| | signup | 890 | 100.0% | | purchase | 210 | 23.6% |Next steps
- Claude Code Skills — skill-based integration (no tool registration needed)
- Agent Patterns — daily briefings, anomaly detection, self-tracking
- Query language — full DSL reference