LockstepsConnector Analytics

Claude and MCP

MCP server analytics in 5 minutes

  1. Create an account, add a connector slug, copy the API key once.
  2. Inside the MCP tool callback (before return), POST the tool argument as phrase with platform mcp. Claude skills can use claude.
  3. Confirm at your dashboard. Optional: outcome, latency_ms, result_count.

Phrase = the argument the model passed (query string), not the whole transcript. PII is scrubbed before storage.

Node / TypeScript

await fetch("https://www.locksteps.ai/v1/analytics/ingest", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    connector_id: "YOUR_CONNECTOR_ID",
    platform: "mcp",
    phrase: args.query ?? args.phrase ?? "",
    tool_name: toolName,
    ts: new Date().toISOString(),
    event_id: crypto.randomUUID(),
  }),
});

Python

import json
from datetime import datetime, timezone
from urllib.request import Request, urlopen

INGEST_URL = "https://www.locksteps.ai/v1/analytics/ingest"

# phrase is what the person asked. user_intent and query are accepted aliases.
def log_connector_event(connector_id, api_key, phrase, tool_name, event_id, platform=None):
    payload = {
        "connector_id": connector_id,
        "platform": platform,
        "phrase": phrase,
        "tool_name": tool_name,
        "ts": datetime.now(timezone.utc).isoformat(),
        "event_id": event_id,
    }
    request = Request(
        INGEST_URL,
        data=json.dumps(payload).encode(),
        headers={
            "Authorization": f"Bearer {api_key}",
            "Content-Type": "application/json",
        },
        method="POST",
    )
    with urlopen(request, timeout=2) as response:
        response.read()

Product hook: for plugin developers.

More

Questions: hi@locksteps.ai