Skip to main content
Glama
ivan23kor

logpiper-mcp

by ivan23kor

logpiper

npm

Logpiper is an MCP server and client for streaming terminal command logs with proactive error notifications

Features

πŸš€ Multi-Session Support: Run multiple logpiper instances simultaneously across different terminals
πŸ“Š Real-time Streaming: Only delivers new, unfetched logs via cursor-based streaming
πŸ“’ Proactive Notifications: Automatic alerts to Claude Code

Related MCP server: log-mcp

Installation

Install npm package logpiper-mcp to access both components:

npm install -g logpiper-mcp

This provides:

  • CLI tool: logpiper command for log collection

  • MCP server: logpiper-mcp for IDE integration

  • Claude Code agent: Install the monitoring agent with logpiper --install-agent

Agent Installation

To install the Claude Code monitoring agent:

logpiper --install-agent

This will interactively guide you through installing the logpiper-monitor agent to your Claude Code agents directory.

MCP Server Configuration

Add logpiper to your IDE configuration, e.g. ~/.claude/settings.json:

{
  "mcpServers": {
    "logpiper": {
      "command": "logpiper-mcp"
    }
  }
}

Usage

1. Start monitoring any command by prefixing it with logpiper:

Testing and CI/CD

# Monitor test suites
logpiper npm test
logpiper npm run test:watch
logpiper npm run test:e2e

# Monitor build processes
logpiper npm run build
logpiper npm run build:prod

Docker and Container Monitoring

# Monitor Docker Compose services
logpiper docker-compose up
logpiper docker-compose logs -f backend

# Monitor individual containers
logpiper docker logs -f container_name

Database and Backend Services

# Monitor Python applications
logpiper python app.py
logpiper uvicorn main:app --reload

# Monitor Node.js servers
logpiper node server.js
logpiper nodemon app.js

3. MCP Tools Available

Tool

Description

Usage

get_new_logs

Get new logs since cursor position (streaming)

Real-time log monitoring

list_sessions

List all logging sessions with metadata

Session management

search_logs

Search through logs with query string

Error investigation

get_logs_paginated

Get logs with cursor-based pagination and automatic chunking

Large log file navigation

cleanup_sessions

Cleanup sessions: smart cleanup based on criteria or complete reset

Session management (mode: "smart" or "all")

Additional Features

πŸ”’ Token Limiting: MCP responses automatically limited to 25,000 tokens to prevent overwhelming Claude Code

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Add your improvements

  4. Test with multiple command types

  5. Submit a pull request

License

MIT License - feel free to use and modify for your needs!

Available Tools

5 tools
cleanup_sessionsC

Cleanup sessions: intelligent cleanup based on criteria or complete reset of all data

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNoCleanup mode: "smart" for intelligent cleanup, "all" for complete resetsmart
forceNoUse aggressive cleanup criteria (smart mode) or skip confirmation (all mode)
dryRunNoShow what would be cleaned up without actually deleting (smart mode only)
confirmNoMust be true for "all" mode to confirm destructive operation

TDQS

C2.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It signals destructiveness via 'complete reset of all data' but does not explain irreversibility, confirmation requirements, whether sessions are actively terminated, or what happens on failure. The schema later mentions confirm/dryRun, but the top-level description does not orient the agent to these safeguards.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and avoids extraneous words, but 'Cleanup sessions:' merely restates the tool name. The phrase 'intelligent cleanup based on criteria' is a placeholder rather than a precise, front-loaded explanation, so the conciseness is achieved at the cost of substance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The definition is insufficiently complete for a destructive, mode-dependent tool. It does not explain return behavior, mode-specific guardrails such as confirm being required for 'all', or the consequences of a complete reset. The absence of an output schema and annotations makes this gap more significant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters, including the mode enum, force semantics, dryRun behavior, and confirm requirement for 'all' mode. The description adds only a high-level 'criteria vs reset' framing and no additional meaning beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action (cleanup) and the resource (sessions), and outlines two distinct modes: intelligent cleanup and complete reset. While 'intelligent cleanup based on criteria' is vague about what those criteria are, the tool is still distinguishable from the read-oriented sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives, nor any exclusions. The two modes are named but the conditions for choosing 'smart' versus 'all' are left entirely to the agent's interpretation, and no workflow context is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_logs_paginatedC

Get logs with cursor-based pagination and automatic chunking

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of log entries to return
cursorNoStarting cursor position (line number). Defaults to 0.
reverseNoRead in reverse order (latest first)
sessionIdYesSession ID to get logs from
consumeLogsNoWhether to remove logs after fetching them (default: true)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It fails to mention the significant side effect that consumeLogs defaults to true, meaning logs are removed after fetching. Only 'automatic chunking' is disclosed, leaving destructive behavior hidden from the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence with no filler and front-loads the core action and resource. It is concise and readable, though the brevity contributes to missing behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 5 parameters, no annotations, and no output schema, this description is too thin. It omits important use-case differentiation, the destructive consume behavior, and details about pagination/chunking behavior that an agent would need to call it safely.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all five parameters are already documented in the schema. The description adds little parameter-level meaning beyond the pagination theme, which matches the baseline of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly identifies the action ('Get logs') and the distinguishing mechanism (cursor-based pagination, automatic chunking). It is clear about what the tool does, though it does not explicitly differentiate it from siblings like get_new_logs or search_logs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives such as get_new_logs or search_logs. The pagination wording weakly implies it is for iterating logs, but there is no explicit when-to-use or when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_new_logsC

Get new logs since a specific cursor position (streaming)

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of log entries to return
sinceNoLine number cursor to get logs after. Defaults to 0.
sessionIdNoSession ID to get logs from. If not provided, returns from all active sessions.
consumeLogsNoWhether to remove logs after fetching them (default: true)

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of disclosing behavior. It fails to mention that consumeLogs defaults to true, meaning logs are removed by default after fetching. The word 'Get' misleadingly suggests a purely read-only operation despite a destructive default.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It is concise and readable, though it leaves important behavioral details unstated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has several parameters, no annotations, and no output schema, so the description needs to provide more operational context. It omits the default log-consumption behavior and fails to clarify how this streaming tool relates to the paginated variant, making the definition incomplete for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the parameters are already well documented. The description adds minimal value by hinting at the 'since' cursor concept, but it does not elaborate on limit, sessionId, or consumeLogs semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'get', the resource 'logs', and the key mechanism 'since a specific cursor position (streaming)'. It distinguishes itself from typical list/search tools, though it does not explicitly compare itself to sibling tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is given about when to use this tool versus get_logs_paginated, search_logs, or other siblings. The 'streaming' hint implies a use case, but the agent is left to infer when this tool is the right choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_sessionsB

List all logging sessions with metadata

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of sessions to return
offsetNoNumber of sessions to skip (for pagination)
statusNoFilter sessions by statusall

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only restates the basic listing behavior and does not mention that the operation is read-only, how pagination behaves, what 'metadata' includes, or any ordering guarantees. For a simple list call this is not severely risky, but the description adds little beyond a tautological summary.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, concise sentence that front-loads the core purpose. There is no filler, and the phrasing is directly actionable for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with fully documented parameters, the description is mostly adequate. However, there is no output schema and no note about return structure, ordering, or how 'all' interacts with the status filter and pagination. A short sentence about paginated listing or filtering behavior would make it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents all three parameters with clear descriptions and defaults, achieving 100% schema description coverage. The description adds no additional parameter semantics, which is acceptable because the schema carries the full burden. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('List'), resource ('logging sessions'), and the type of output ('with metadata'). It is clear that this tool is about session lists rather than log entries, which helps distinguish it from sibling tools like get_new_logs and search_logs. However, it does not explicitly contrast itself with siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives such as get_logs_paginated or search_logs. It does not mention whether this is the preferred tool for browsing sessions, paginating through all sessions, or when a status filter should be applied. This leaves the agent to infer usage from the tool name.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_logsC

Search through logs with a query string

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of results to return
queryYesSearch query string
offsetNoNumber of results to skip (for pagination)
sessionIdNoSession ID to search in. If not provided, searches all sessions.

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states a generic search action without mentioning whether it is read-only, any authentication requirements, performance characteristics, or the nature of results (e.g., does it return matching lines or log metadata?). The description does not go beyond a verb phrase, leaving the agent to guess at side effects or constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no fluff. It conveys the essential action efficiently. It is appropriately sized for the tool's simplicity, though it could be slightly more informative while remaining concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the schema fully covers parameters and there is no output schema, the description provides a high-level purpose. However, for a search tool, it lacks context on what constitutes a search (e.g., full-text, regex, field-specific) and how it interacts with sessions. The sibling tools suggest more specific use cases, but the description alone is insufficient for an agent to fully understand the tool's position in the toolset. It is adequate but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters (query, limit, offset, sessionId) are documented in the schema with descriptions. The description adds no additional meaning beyond what the schema already provides. Per calibration, a baseline of 3 is appropriate when the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a clear verb ('search') and resource ('logs') with a mention of a query string. It distinguishes from siblings like get_new_logs (which implies retrieval without search semantics) and get_logs_paginated (which is likely a non-search paginated fetch), though it does not explicitly name alternatives. The core purpose is evident.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus its siblings (get_new_logs, get_logs_paginated, etc.). The description simply says 'search through logs' without elaborating on scenarios, such as needing full-text search versus simple retrieval, or when to prefer this over pagination-based tools. An agent would have to infer usage from the schema and sibling names.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv1.0.2
    • First observedcleanup_sessions
    • First observedget_logs_paginated
    • First observedget_new_logs
    • First observedlist_sessions
    • First observedsearch_logs

TDQS

B3.3/5.0

Scored across 5 tools

Disambiguation4/5

Most tools have clearly distinct roles, but get_new_logs and get_logs_paginated both retrieve logs and could be confused by an agent skimming descriptions. The streaming vs. pagination distinction is present but requires careful reading.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern (get_, list_, search_, cleanup_), with no mixed conventions or vague verbs. The naming is predictable and easy to extrapolate.

Tool Count5/5

Five tools is a well-scoped size for a log management server, covering retrieval, search, session listing, and cleanup without unnecessary bloat or feeling thin.

Completeness3/5

The read and lifecycle side is reasonably covered with search, pagination, streaming, and cleanup, but there is no ingestion or write capability for logs/sessions. This is a notable gap if the server is meant to manage logs end-to-end.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server for streaming and searching macOS Console.app and iOS device logs, enabling real-time log access and debugging through natural language.
    14
    2 npm
    2
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for log file analysis. Gives LLMs the ability to efficiently analyze large log files without loading them into context.
    7
    100
    MIT
  • F
    license
    B
    quality
    D
    maintenance
    A log analysis MCP server that enables tailing, searching, filtering, and summarizing logs from local files and Docker containers.
    7
    -