Docs/MCP Server

MCP Server

Connect your AI coding tools to LogClaw incidents, logs, and anomalies via the Model Context Protocol. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.

Quick start

terminal
npx logclaw-mcp-server

The server communicates over stdio using the Model Context Protocol. Your AI tool launches it automatically — you just need to add the config once.

Setup

Claude Code

Add to ~/.claude.json:

json
{
  "mcpServers": {
    "logclaw": {
      "command": "npx",
      "args": ["-y", "logclaw-mcp-server"],
      "env": {
        "LOGCLAW_ENDPOINT": "https://ticket.logclaw.ai",
        "LOGCLAW_API_KEY": "lc_proj_..."
      }
    }
  }
}

Cursor / Windsurf

Add to .cursor/mcp.json or .windsurf/mcp.json:

json
{
  "mcpServers": {
    "logclaw": {
      "command": "npx",
      "args": ["-y", "logclaw-mcp-server"],
      "env": {
        "LOGCLAW_ENDPOINT": "https://ticket.logclaw.ai",
        "LOGCLAW_API_KEY": "lc_proj_..."
      }
    }
  }
}

Environment variables

VariableRequiredDescription
LOGCLAW_API_KEYYesYour LogClaw project API key
LOGCLAW_ENDPOINTNoAuth proxy endpoint (default: https://ticket.logclaw.ai)

Available tools

The MCP server exposes 6 tools that your AI assistant can call:

logclaw_list_incidents

List and filter incidents by severity, state, service, or search query

logclaw_get_incident

Full incident details — root cause, causal chain, evidence logs, traces, timeline, blast radius

logclaw_update_incident

Transition incident state (acknowledge, investigate, mitigate, resolve) or add a note

logclaw_search_logs

Search raw logs by service, level, time range, and query

logclaw_get_anomalies

Get recent anomaly detections (Z-score analysis on error rates)

logclaw_service_health

Check LogClaw pipeline health status and latency

Example prompts

Once connected, try asking your AI assistant:

What incidents are open right now?
Show me the root cause for TICK-0037
Search for ERROR logs from auth-service in the last 30 minutes
Are there any critical anomalies?
Acknowledge TICK-0042 and add a note that I’m looking into it
Is the LogClaw pipeline healthy?

Self-hosted

Running LogClaw on your own infrastructure? Point LOGCLAW_ENDPOINT to your auth proxy:

terminal
LOGCLAW_ENDPOINT=https://logclaw.internal.company.com \
  LOGCLAW_API_KEY=lc_proj_... \
  npx logclaw-mcp-server

Air-gapped? Install the package from a private registry or copy the dist/ folder directly. The MCP server has zero runtime network dependencies beyond reaching your auth proxy.