StdoutMCP MCP server

Lightweight server that captures and manages stdout logs from multiple processes through a named pipe system, maintaining a 100-entry log history and providing robust querying and filtering capabilities for debugging and real-time monitoring.
Back to servers
Provider
Amit Deshmukh
Release date
Mar 07, 2025
Language
TypeScript
Package
Stats
622 downloads
4 stars

The stdout-mcp-server captures and manages application logs through a named pipe system, making them available for debugging in environments like Cursor IDE. It lets you monitor multiple applications in real-time and provides an MCP interface to query, filter, and analyze logs.

How It Works

The server creates a named pipe and monitors it for incoming logs. Applications can write to this pipe using standard output redirection, and the server maintains a history of these logs. Through MCP tools, you can then query and analyze the captured output.

Named Pipe Locations

  • Windows: \\.\pipe\stdout_pipe
  • Unix/MacOS: /tmp/stdout_pipe

System Requirements

  • Node.js v18 or newer

Installation

Installing in Cursor

  1. Open Cursor and navigate to Cursor > Settings > MCP Servers
  2. Click on "Add new MCP Server"
  3. Update your MCP settings file with:
name: stdout-mcp-server
type: command
command: npx stdout-mcp-server

Installing in Other MCP Clients

For macOS/Linux:

{
  "mcpServers": {
    "stdio-mcp-server": {
      "command": "npx",
      "args": [
        "stdio-mcp-server"
      ]
    }
  }
}

For Windows:

{
  "mcpServers": {
    "mcp-installer": {
      "command": "cmd.exe",
      "args": ["/c", "npx", "stdio-mcp-server"]
    }
  }
}

Usage

Redirecting Application Logs

To send your application's output to the pipe:

# Unix/MacOS
your_application > /tmp/stdout_pipe

# Windows (PowerShell)
your_application > \\.\pipe\stdout_pipe

Monitoring Multiple Applications

You can redirect logs from multiple sources simultaneously:

# Application 1
app1 > /tmp/stdout_pipe &

# Application 2
app2 > /tmp/stdout_pipe &

Querying Logs

Your AI can use the get-logs tool to retrieve and filter logs:

// Get last 50 logs
get-logs()

// Get last 100 logs containing "error"
get-logs({ lines: 100, filter: "error" })

// Get logs since a specific timestamp
get-logs({ since: 1648675200000 }) // Unix timestamp in milliseconds

Available Tools

get-logs

Retrieve logs from the named pipe with optional filtering:

Parameters:

  • lines (optional, default: 50): Number of log lines to return
  • filter (optional): Text to filter logs by
  • since (optional): Timestamp to get logs after

Example response:

{
  content: [{
    type: "text",
    text: "[2024-03-20T10:15:30.123Z] Application started\n[2024-03-20T10:15:31.456Z] Connected to database"
  }]
}

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later