MCP 日志阅读器是一个专用的 MCP 服务器,可帮助您分析和调试 Model Context Protocol 日志。它能让 Claude 直接访问日志文件,便于排查 MCP 集成问题,理解 Claude 与您工具的交互方式。
直接从 GitHub 安装:
# 克隆仓库
git clone https://github.com/klara-research/MCP-Analyzer.git
cd MCP-Analyzer
# 安装依赖项
npm i
构建并运行:
# 编译 TypeScript
npx tsc
直接从 GitHub 安装:
# 克隆仓库
git clone https://github.com/klara-research/MCP-Analyzer.git
cd MCP-Analyzer
# 安装依赖项
npm i
构建并运行:
# 编译 TypeScript
npx tsc
让 Claude 使用日志阅读工具:
你能检查我在过去一天中的 MCP 日志中是否有连接错误吗?
结合具体参数:
你能使用 filter="error" 和 lines=50 查找初始化问题吗?
将服务器添加到您的 Claude Desktop 配置中:
{
"mcpServers": {
"log-reader": {
"command": "node",
"args": [
"/absolute/path/MCP-Analyzer/build"
]
}
}
}
然后重启 Claude Desktop。
日志阅读器支持以下参数:
| 参数 | 描述 | 默认值 |
|---|---|---|
lines |
每个日志文件要读取的行数 | 100 |
filter |
过滤日志条目的文本(不区分大小写) | "" |
customPath |
日志目录的自定义路径 | 操作系统特定值 |
fileLimit |
每页读取的最大文件数 | 5 |
page |
分页器的当前页码 | 1 |
MIT License