MCP Server

Let your coding agent query Neatlogs traces, detections, and triage suggestions.

Neatlogs exposes a Model Context Protocol (MCP) server so your coding agent can read your observability data directly — search traces, pull the full context of a failing run, check detections, and act on triage suggestions — without you copying anything out of the dashboard.


Connect

The easiest way is the wizard, which offers to wire the MCP server into Claude Code or Cursor at the end of its run, or on its own:

npx @neatlogs/wizard mcp --api-key YOUR_PROJECT_KEY

To connect manually, add a neatlogs entry to your client's MCP config. The server speaks Streamable HTTP and authenticates with your project API key as a bearer token:

{
  "mcpServers": {
    "neatlogs": {
      "type": "http",
      "url": "https://staging-cloud.neatlogs.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_PROJECT_KEY"
      }
    }
  }
}

The config file depends on your client — for example .mcp.json for Claude Code or .cursor/mcp.json for Cursor. The MCP server lives at /mcp on the same host as your SDK endpoint (the hosted default is https://staging-cloud.neatlogs.com/mcp; use your own host's /mcp if you self-host). Running npx @neatlogs/wizard wires this up for you.

The wizard merges this entry into your existing config without clobbering other MCP servers you've already set up.


What your agent can do

Once connected, the agent has tools to read and act on your Neatlogs data:

ToolWhat it does
search_tracesSearch traces by free-text query (BM25 keyword by default, or semantic vector search)
get_trace_contextPull a trace's full context — metrics, span tree with inputs/outputs and code locations, and the detections that fired
list_detectionsList the active detections enabled on the project
get_detection_trendGet hourly / daily / weekly occurrence counts for a single detection
triage_listList the current triage fixes (proposed fixes)
triage_getGet the full detail of one fix — root cause and recommended action
triage_get_investigationRead the investigation that produced a fix — the root-cause reasoning trail
triage_list_stepsList the steps of an investigation thread
triage_accept / triage_dismiss / triage_update_status / triage_updateAct on a fix — accept, dismiss, move across the board, or update it
log_tracePush a trace from your coding agent into Neatlogs
ping / whoamiHealth check and identify the project this MCP session is bound to

This turns a debugging loop into a conversation: ask your agent "what's failing in production?", have it search traces and inspect the worst one, then let it read the matching triage suggestion and apply the fix — all in the editor.


  • Traces — the same data, viewed in the dashboard
  • Detections — the rules list_detections reports on
  • Triage — the suggestions the triage tools read and update

On this page