Skip to main content

XVI MCP Server

A Model Context Protocol (MCP) server for XVI vulnerability platform integration.

简介

XVI MCP Server 是一个基于 Model Context Protocol (MCP) 的服务器,用于与 XVI 漏洞平台集成。它提供了一系列工具函数,可以通过 MCP 协议调用 XVI 平台的各种功能。

功能特性

  • 漏洞查询: 支持通过关键词、CVE编号、时间范围等条件查询漏洞信息
  • 漏洞类型过滤: 支持按漏洞类型进行筛选
  • 风险等级筛选: 支持按严重程度筛选漏洞
  • 结果数量控制: 可自定义返回结果数量
  • 详细漏洞信息: 返回包括漏洞描述、危害、修复建议等详细信息

安装

使用 uvx (推荐)

uvx xvi-mcp

使用 pip

pip install xvi-mcp

使用方法

作为 MCP 服务器运行

# 使用 uvx
uvx xvi-mcp

# 或使用 pip 安装后
xvi-mcp

在 MCP 客户端中配置

在你的 MCP 客户端配置文件中添加:

{
  "mcpServers": {
    "xvi-mcp": {
      "command": "uvx",
      "args": ["xvi-mcp"]
    }
  }
}

可用工具函数

get_vulns

查询漏洞信息的主要函数。

参数:

  • keyword (str, 可选): 模糊查询关键词
  • cve (str, 可选): CVE编号
  • publishTimeStart (str, 可选): 起始时间,格式为 yyyy-MM-dd HH:mm:ss
  • publishTimeEnd (str, 可选): 截止时间,格式为 yyyy-MM-dd HH:mm:ss
  • vulnType (str, 可选): 漏洞类型
  • riskLevels (list, 可选): 风险等级列表,可选值:"serious", "high_risk", "medium_risk", "low_risk", "unknown"
  • resultSize (int, 可选): 返回结果数量,范围 1-100,默认为 1

返回值: 返回包含漏洞详细信息的字符串,包括:

  • 漏洞链接
  • 漏洞ID
  • 漏洞名称
  • 风险等级
  • CVE/CNVD/CNNVD编号
  • CVSS3评分和字符串
  • 漏洞描述
  • 漏洞危害
  • CWE类型
  • 修复建议

配置要求

本服务器需要访问 XVI 平台的 API,使用了预配置的客户端凭据。如果需要使用自己的凭据,请修改源代码中的相关配置。

开发

本地开发安装

git clone https://github.com/WACHI/xvi-mcp.git
cd xvi-mcp
pip install -e .

运行测试

python -m pytest

构建包

python -m build

发布到 PyPI

twine upload dist/*

许可证

MIT License

贡献

欢迎提交 Issue 和 Pull Request!

安全注意事项

  • 本工具包含硬编码的 API 凭据,仅用于演示目的
  • 在生产环境中使用时,请确保使用环境变量或安全的配置管理方式
  • 请遵守 XVI 平台的使用条款和 API 限制

联系方式

Metadata

Release files for xvi-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xvi-mcp 0.1.3
File Size Uploaded Provenance
xvi_mcp-0.1.3.tar.gz 12.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xvi-mcp 0.1.3
File Interpreter ABI Platform
xvi_mcp-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 22.7 kB

Release files / xvi_mcp-0.1.3.tar.gz

Download URL xvi_mcp-0.1.3.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
88f96db40372a94c44cdc59f3d7b5859f915b0c5421ebf50f5a0e6e0ec236bcb
BLAKE2b-256 checksum
How to use checksums
549d7666cc347ea574b2da33d6aae85959acf9168c5914467b86c3534e0e659f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / xvi_mcp-0.1.3-py3-none-any.whl

Download URL xvi_mcp-0.1.3-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a533096e8bd88c9420562d09e5836a3e9eccac5de0810e1bf24236d18f31146b
BLAKE2b-256 checksum
How to use checksums
15d56271d1ba927c52f6061c74a7a958a2eec5bb5b628e1d8d57753c9aeaba5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Security for xvi-mcp 0.1.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page