{
"mcpServers": {
"mcp-log-server": {
"command": "<see-readme>",
"args": []
}
}
}No install config available. Check the server's README for setup instructions.
Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Is it safe?
No package registry to scan.
No authentication — any process on your machine can connect.
License not specified.
Is it maintained?
Last commit 257 days ago.
Will it work with my client?
Transport: stdio. Works with Claude Desktop, Cursor, Claude Code, and most MCP clients.
No automated test available for this server. Check the GitHub README for setup instructions.
No known vulnerabilities.
This server is missing a description. Tools and install config are also missing.If you've used it, help the community.
Add informationHave you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Persistent memory using a knowledge graph
Privacy-first. MCP is the protocol for tool access. We're the virtualization layer for context.
Pre-build reality check. Scans GitHub, HN, npm, PyPI, Product Hunt — returns 0-100 signal.
Monitor browser logs directly from Cursor and other MCP compatible IDEs.
MCP Security Weekly
Get CVE alerts and security updates for Mcp Log Server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
基于 mcp-go SDK 构建的智能日志分析服务,支持多环境日志查询、时间范围过滤和AI智能分析。
mcp-log-server/
├── main.go # 主程序入口
├── internal/
│ ├── config/
│ │ └── config.go # 多环境配置管理
│ ├── handlers/
│ │ └── log_commands.go # 日志命令处理器
│ └── ollama/
│ └── client.go # Ollama AI客户端
├── logs/ # 日志文件存储
│ ├── dev/ # 开发环境日志
│ │ ├── oms.log
│ │ └── blackhole.log
│ ├── test/ # 测试环境日志
│ │ ├── oms.log
│ │ └── blackhole.log
│ ├── staging/ # 预发布环境日志
│ │ ├── oms.log
│ │ └── blackhole.log
│ └── prod/ # 生产环境日志
│ ├── oms.log
│ └── blackhole.log
├── go.mod
├── go.sum
└── README.md
# macOS
brew install ollama
# 启动服务
ollama serve
# 下载推荐模型
ollama pull gemma3:27b
git clone <your-repo-url>
cd mcp-log-server
go mod tidy
go build -o mcp-server .
~/.cursor/mcp.json){
"mcpServers": {
"mcp-log-server": {
"command": "/path/to/mcp-log-server/mcp-server"
}
}
}
{
"mcpServers": {
"mcp-log-server": {
"command": "/path/to/mcp-log-server/mcp-server"
}
}
}
query_device_logs_by_time - 主要功能按设备ID和时间范围查询日志,并提供AI智能分析。
参数:
environment (必需): 环境名称 (dev/test/staging/prod)log_type (必需): 日志类型 (oms/blackhole)device_id (必需): 设备IDstart_time (可选): 开始时间 (格式: 2025-07-24 11:59:38.369)end_time (可选): 结束时间 (格式: 2025-07-24 11:59:38.369)keyword (可选): 搜索关键词lines (可选): 查询行数 (默认: 2000)model (可选): AI分析模型用户: "查看设备1234在开发环境的日志"
AI会调用工具查询 dev 环境中设备 1234 的最新日志,并提供智能分析。
用户: "查看设备1234在7月25日的OMS日志"
AI会查询指定日期范围内的日志记录。
用户: "对比设备1234在测试环境和生产环境的表现"
AI会分别查询两个环境的日志并进行对比分析。
每次查询都会生成结构化的分析报告:
## 🔍 异常识别与分类
- 错误日志统计和分类
- 警告信息汇总
- 异常模式识别
## 📈 系统状态评估
- 设备运行状态
- 性能指标分析
- 通信状态评估
## ⚠️ 风险评估
- 紧急程度分级
- 影响范围评估
- 具体建议措施
## 📋 日志统计摘要
- 时间范围
- 日志级别统计
- 涉及设备清单
| 环境 | 说明 | 主机配置 |
|------|------|----------|
| dev | 开发环境 | localhost |
| test | 测试环境 | test.example.com |
| staging | 预发布环境 | staging.example.com |
| prod | 生产环境 | prod.example.com |
| 类型 | 描述 | 文件路径 |
|------|------|----------|
| oms | OMS系统日志 | /logs/{env}/oms.log |
| blackhole | 黑洞服务日志 | /logs/{env}/blackhole.log |
修改 internal/config/config.go 添加新环境或日志类型:
// 添加新环境
"staging": {
Name: "预发布环境",
Host: "staging.example.com",
User: "staginguser",
Port: "22",
},
// 添加新日志类型
"api": {
Name: "api",
Path: "", // 动态路径
Description: "API服务日志",
Aliases: []string{"接口"},
},
日志文件不存在
AI分析失败
时间范围查询无结果
2025-07-24 11:59:38.369)# 启动时查看详细日志
./mcp-server --debug
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)MIT License -