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_KEYTo 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:
| Tool | What it does |
|---|---|
search_traces | Search traces by free-text query (BM25 keyword by default, or semantic vector search) |
get_trace_context | Pull a trace's full context — metrics, span tree with inputs/outputs and code locations, and the detections that fired |
list_detections | List the active detections enabled on the project |
get_detection_trend | Get hourly / daily / weekly occurrence counts for a single detection |
triage_list | List the current triage fixes (proposed fixes) |
triage_get | Get the full detail of one fix — root cause and recommended action |
triage_get_investigation | Read the investigation that produced a fix — the root-cause reasoning trail |
triage_list_steps | List the steps of an investigation thread |
triage_accept / triage_dismiss / triage_update_status / triage_update | Act on a fix — accept, dismiss, move across the board, or update it |
log_trace | Push a trace from your coding agent into Neatlogs |
ping / whoami | Health 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.
Related
- Traces — the same data, viewed in the dashboard
- Detections — the rules
list_detectionsreports on - Triage — the suggestions the triage tools read and update