Log MCP Server

Reduces log files for AI consumption — 50-90% token reduction via 18 deterministic transforms.

Local serverstdioPython

What is the Log MCP server?

Log MCP server is a locally run integration for AI assistants that speak the Model Context Protocol. Reduces log files for AI consumption — 50-90% token reduction via 18 deterministic transforms.

What you get

Your AI coding agent is spending thousands of tokens reading raw logs — DEBUG spam, health checks, duplicate lines, framework stack frames, UUIDs. Those tokens are gone for the rest of the session. The agent has less room to think, generates worse code, and hits its context limit faster.

  • Noise filtered — — health checks, heartbeats, progress bars removed (DEBUG/TRACE lines kept — the AI chooses when to exclude them via level filter)
  • Stack traces folded — — 80 frames → your code frames + [... N framework frames omitted ...]
  • Repeated lines collapsed — — 6 similar lines → one template with varying values listed
  • Log prefixes factored — — 8 lines sharing timestamp - module - LEVEL → 1 header + indented messages
  • Repeating blocks detected — — 5 identical 3-line blocks → 1 block + count
  • IDs shortened — — UUIDs, hex strings, JWTs, tokens → $1, $2, ..

What the assistant can call

Once Log is connected, these are the calls the assistant has available:

  • Domain-specific — pip installs, Docker layers, HTTP access logs, retry blocks, log envelopes each have dedicated collapsers
  • Supports — Java, Python, Node.js, .NET, Go
  • File — path workflow** — the MCP tool accepts file paths so raw logs never enter the AI's context. Only reduced output crosses into the conversation

Setting it up

logreducer on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

Configuration and credentials

You will need one environment variable: ANTHROPIC_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Choosing this one

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Log's toolset — Domain-specific, Supports, File — is a fair guide to whether it matches your workflow. It is maintained by imankha; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the log mcp server does with a few real requests.

Available tools

ToolWhat it does
Domain-specificpip installs, Docker layers, HTTP access logs, retry blocks, log envelopes each have dedicated collapsers
SupportsJava, Python, Node.js, .NET, Go
Filepath workflow** — the MCP tool accepts file paths so raw logs never enter the AI's context. Only reduced output crosses into the conversation.

How to install the Log MCP server

{
  "mcpServers": {
    "log-reducer": {
      "command": "npx",
      "args": ["-y", "logreducer"],
      "env": {
        "ANTHROPIC_API_KEY": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
ANTHROPIC_API_KEYCredential the server authenticates with.Yes

Example prompts to try

  • Use Log to Domain-specific.
  • Use Log to Supports.
  • Use Log to File.

Frequently asked questions

It connects Log to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (Domain-specific, Supports, File) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Log directly.