A Model Context Protocol server that captures and manages stdout logs through named pipes, making application output available for querying and debugging in AI tools like Cursor IDE.
A Model Context Protocol (MCP) server that captures and manages stdout logs through a named pipe system. This server is particularly useful for:
The server creates a named pipe at a specific location (/tmp/stdout_pipe
on Unix/MacOS or \\.\pipe\stdout_pipe
on Windows)
Any application can write logs to this pipe using standard output redirection. For example:
your_application | tee /tmp/stdout_pipe # or your_application > /tmp/stdout_pipe
The server monitors the pipe, captures all incoming logs, and maintains a history of the last 100 entries
Through MCP tools, you can query, filter, and analyze these logs
Before installing, please ensure you have:
Cursor > Settings > MCP Servers
name: stdout-mcp-server type: command command: npx stdout-mcp-server
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"] } } }
To send your application's output to the pipe:
# Unix/MacOS your_application > /tmp/stdout_pipe # Windows (PowerShell) your_application > \\.\pipe\stdout_pipe
You can redirect logs from multiple sources:
# Application 1 app1 > /tmp/stdout_pipe & # Application 2 app2 > /tmp/stdout_pipe &
Your AI will use the get-logs
tool in your MCP client 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
\\.\pipe\stdout_pipe
/tmp/stdout_pipe
Retrieve logs from the named pipe with optional filtering:
Parameters:
lines
(optional, default: 50): Number of log lines to returnfilter
(optional): Text to filter logs bysince
(optional): Timestamp to get logs afterExample responses:
// Response format { content: [{ type: "text", text: "[2024-03-20T10:15:30.123Z] Application started [2024-03-20T10:15:31.456Z] Connected to database" }] }
MIT License
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!