MCP 日志阅读器是专业的 MCP 服务器,可助力分析和调试模型上下文协议日志。它能让 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 日志中是否有任何连接错误吗?
使用特定参数:
你能过滤“error”并设置 lines=50 来查找初始化问题吗?
将服务器添加到您的 Claude 桌面配置中:
{
"mcpServers": {
"log-reader": {
"command": "node",
"args": [
"/absolute/path/MCP-Analyzer/build"
]
}
}
}
然后重新启动 Claude 桌面。
日志阅读器支持以下参数:
| 参数 | 描述 | 默认值 |
|---|---|---|
lines |
每个日志文件读取的行数 | 100 |
filter |
过滤日志条目的文本(不区分大小写) | "" |
customPath |
日志目录的自定义路径 | 操作系统特定值 |
fileLimit |
每页读取的最大文件数 | 5 |
page |
分页器的当前页码 | 1 |
MIT License