Integrations
Provides support for capturing stdout logs from applications running on Unix/Linux systems through a named pipe at /tmp/stdout_pipe.
Enables monitoring of application output on macOS systems through a named pipe at /tmp/stdout_pipe, allowing real-time log capture and analysis.
Serves as a runtime requirement for the server with Node.js v18 or newer needed to run the MCP server.
标准输出 mcp 服务器
模型上下文协议 (MCP) 服务器,用于通过命名管道系统捕获和管理标准输出日志。此服务器尤其适用于:
- 从多个进程或应用程序捕获日志并使其可用于在 Cursor IDE 中进行调试。
- 实时监控应用程序输出,并提供MCP接口查询、过滤和分析日志
工作原理
- 服务器在特定位置创建命名管道(Unix/MacOS 上为
/tmp/stdout_pipe
,Windows 上为\\.\pipe\stdout_pipe
) - 任何应用程序都可以使用标准输出重定向将日志写入此管道。例如:
Copy
- 服务器监控管道,捕获所有传入的日志,并维护最近 100 条条目的历史记录
- 通过MCP工具,您可以查询、过滤和分析这些日志
系统要求
安装之前,请确保您已:
- Node.js v18 或更高版本
安装选项
选项 1:在 Cursor 中安装
- 打开 Cursor 并导航至
Cursor > Settings > MCP Servers
- 点击“添加新的 MCP 服务器”
- 使用以下配置更新您的 MCP 设置文件:
Copy
选项 2:在其他 MCP 客户端中安装
在其他 MCP 客户端中安装
对于 macOS/Linux:
Copy
对于 Windows:
Copy
使用示例
重定向应用程序日志
要将应用程序的输出发送到管道:
Copy
监控多个应用程序
您可以从多个来源重定向日志:
Copy
查询日志
您的 AI 将使用 MCP 客户端中的get-logs
工具来检索和过滤日志:
Copy
特征
- 命名管道创建和监控
- 实时日志捕获和存储
- 通过 MCP 工具进行日志过滤和检索
- 可配置的日志历史记录(默认值:100 条)
- 跨平台支持(基于 Windows 和 Unix 的系统)
命名管道位置
- Windows:
\\.\pipe\stdout_pipe
- Unix/MacOS:
/tmp/stdout_pipe
可用工具
获取日志
使用可选过滤从命名管道检索日志:
参数:
lines
(可选,默认值:50):要返回的日志行数filter
(可选):用于过滤日志的文本since
(可选):获取日志的时间戳
示例响应:
Copy
执照
MIT 许可证
This server cannot be installed
模型上下文协议服务器通过命名管道捕获和管理标准输出日志,使应用程序输出可用于在 Cursor IDE 等 AI 工具中查询和调试。