MCP Log Analyzer
创宇盾云防御平台日志分析MCP服务器用于AI大模型调用分析被防护网站的日志文件。
MCP工具
该MCP服务器提供以下工具调用:
- get_file_info - 获取日志文件信息
- read_log_lines - 读取指定范围的日志行
- search_logs - 搜索包含关键词的日志条目
- analyze_attack_types - 分析攻击类型统计
- analyze_ip_stats - 分析IP访问统计
支持的 MCP 客户端
🔧 完全兼容领先的 MCP 环境:
- 爱派 Aipy
- Claude Desktop
- Cursor
- Windsurf
- Cline
- Continue
- Zed
- Cherry Studio
- Chatbox
如何使用
环境准备
你需要安装Python 3.10 或更高版本的 Python 环境
安装
使用 pip
pip install mcp-log-analyzer
安装后,您可以使用以下命令将其作为脚本运行
python -m mcp_log_analyzer.cli
使用 uv
uv 是一个用 Rust 编写的快速 Python 软件包安装程序和解析器。它是 pip 的现代替代品,性能显著提升。
安装 uv
# Install uv using curl (macOS/Linux)
curl -LsSf https://astral.sh/uv/install.sh | sh
# Or using PowerShell (Windows)
irm https://astral.sh/uv/install.ps1 | iex
# Or using Homebrew (macOS)
brew install uv
安装 mcp-log-analyzer
使用 uv 安装 mcp-log-analyzer:
uv pip install mcp-log-analyzer
配置使用
Cherry Studio 配置
- 打开 Cherry Studio,选择“设置”。
- 在左侧导航栏中,选择“MCP 服务器”。
- 点击 “添加服务器” 选择 “从 JSON”导入
- 粘贴下面配置后确定
{
"mcpServers": {
"日志分析": {
"command": "python3",
"args": [
"-m",
"mcp_log_analyzer.cli"
]
}
}
}
5. 在 MCP 服务器配置中启用 “日志分析” MCP服务器即可使用
Trae 配置
- 打开 Trae,选择“设置”。
- 在右侧导航栏中,选择“MCP”。
- 点击 “添加” 选择 “手动添加”
- 粘贴下面配置后确定
{
"mcpServers": {
"日志分析": {
"command": "python3",
"args": [
"-m",
"mcp_log_analyzer.cli"
]
}
}
}
- 在 Trae 中使用 “Builder with MCP” 即可使用
许可证
MIT License
贡献
欢迎提交Issue和Pull Request!
Metadata
Release files for mcp-log-analyzer 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_log_analyzer-0.1.2.tar.gz | 5.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_log_analyzer-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.6 kB
Release files / mcp_log_analyzer-0.1.2.tar.gz
| Download URL | mcp_log_analyzer-0.1.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f60d6b23a60da128c17a8f7f3fb85997651db1fdb34c6778ad73a7de84e41c74
|
|
BLAKE2b-256 checksum How to use checksums |
f5f52c8992f3b4cc316d821705eb67442327c26f3da8d47f342b9466f160c090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Release files / mcp_log_analyzer-0.1.2-py3-none-any.whl
| Download URL | mcp_log_analyzer-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
262ff5d39504f50631970cf8cebd9309bd0a01985c39e99d591e5a45b6f1153d
|
|
BLAKE2b-256 checksum How to use checksums |
9da45bddb65be1586758268c641ce56e00adca0696b7084958e0a21ad5f12ae7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.15
|
Security for mcp-log-analyzer 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.