安全扫描交互服务器

ZeroPath MCP服务器通过MCP兼容工具直接调用ZeroPath tRPC V2程序,返回适合代理使用的结构化JSON响应。

  • by ZeroPathAI
  • Python
  • 本地部署
  • 10 星标
  • 更新于
在 GitHub 查看 ZeroPathAI/zeropath-mcp-server

使用说明

ZeroPath MCP服务器

通过MCP兼容工具与ZeroPath安全发现进行交互。

此MCP服务器直接调用ZeroPath tRPC V2过程(无REST包装器),并返回适合代理使用的结构化JSON响应。


博客文章

了解更多关于我们为什么构建这个以及它如何适应不断发展的人工智能开发生态系统的信息:

与您的AppSec扫描聊天:介绍ZeroPath MCP服务器

安装

快速安装(推荐)

直接从GitHub安装:

# Using pip
pip install git+https://github.com/ZeroPathAI/zeropath-mcp-server.git

# Using uvx (run without installing)
uvx --from git+https://github.com/ZeroPathAI/zeropath-mcp-server zeropath-mcp-server

您还可以固定到特定版本:

# Specific version tag
pip install git+https://github.com/ZeroPathAI/zeropath-mcp-server.git@v0.1.0

# Latest from main branch
uvx --from "git+https://github.com/ZeroPathAI/zeropath-mcp-server@main" zeropath-mcp-server

来源

git clone https://github.com/ZeroPathAI/zeropath-mcp-server.git
cd zeropath-mcp-server
uv sync

来自PyPI(可选)

如果软件包已发布到PyPI,您还可以通过以下方式安装:

pip install zeropath-mcp-server

设置

1.生成API密钥

从ZeroPath设置生成用户操作的或管理员API密钥。

2.配置环境变量

export ZEROPATH_BASE_URL="https://zeropath.com"  # optional (defaults to https://zeropath.com)
export ZEROPATH_TOKEN_ID=your_token_id
export ZEROPATH_TOKEN_SECRET=your_token_secret
export ZEROPATH_ORG_ID=your_org_id

使用 ZEROPATH_BASE_URL 例如:

export ZEROPATH_BASE_URL="https://staging.branch.zeropath.com"

配置

将以下内容添加到MCP配置文件中(Claude Desktop、Cursor等):

使用GitHub URL(推荐)

{
  "mcpServers": {
    "zeropath": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/ZeroPathAI/zeropath-mcp-server",
        "zeropath-mcp-server"
      ],
      "env": {
        "ZEROPATH_BASE_URL": "https://zeropath.com",
        "ZEROPATH_TOKEN_ID": "your_token_id",
        "ZEROPATH_TOKEN_SECRET": "your_token_secret",
        "ZEROPATH_ORG_ID": "your_org_id"
      }
    }
  }
}

使用源代码安装

{
  "mcpServers": {
    "zeropath": {
      "command": "uv",
      "args": [
        "run",
        "--project",
        "/path/to/zeropath-mcp-server",
        "python",
        "-m",
        "zeropath_mcp_server"
      ],
      "env": {
        "ZEROPATH_BASE_URL": "https://zeropath.com",
        "ZEROPATH_TOKEN_ID": "your_token_id",
        "ZEROPATH_TOKEN_SECRET": "your_token_secret",
        "ZEROPATH_ORG_ID": "your_org_id"
      }
    }
  }
}

使用PyPI安装(可选)

{
  "mcpServers": {
    "zeropath": {
      "command": "zeropath-mcp-server",
      "env": {
        "ZEROPATH_BASE_URL": "https://zeropath.com",
        "ZEROPATH_TOKEN_ID": "your_token_id",
        "ZEROPATH_TOKEN_SECRET": "your_token_secret",
        "ZEROPATH_ORG_ID": "your_org_id"
      }
    }
  }
}

刀具表面(tRPC V2)

工具在启动时从ZeroPath前端的MCP清单动态加载。

所有工具调用都使用tRPC V2过程,直接使用tRPC v10 HTTP约定:

  • 查询: GET /trpc/<procedure>?input=<url-encoded-json>
  • 突变: POST /trpc/<procedure> 将原始JSON输入对象作为主体(未包装)。

成功的响应以结构化JSON的形式返回,其中包含 { "result": { "data": ... } } 包装已拆下。错误返回tRPC error 对象直接。

服务器还使用每个工具执行尽力而为的客户端输入验证 inputSchema 从清单中提取并返回 BAD_REQUEST 输入无效时调用tRPC前出错。如果模式使用不受支持的JSON模式功能,则该调用将跳过客户端验证(服务器端验证仍然具有权威性)。


示例通话

列出问题:

{
  "tool": "issues.list",
  "input": {
    "page": 1,
    "pageSize": 25,
    "statuses": ["PENDING_REVIEW"],
    "sortBy": "score",
    "sortOrder": "desc"
  }
}

存档问题:

{
  "tool": "issues.archive",
  "input": {
    "issueIds": ["issue_123", "issue_456"],
    "reason": "Confirmed duplicate"
  }
}

创建规则:

{
  "tool": "rules.create",
  "input": {
    "name": "Detect unsafe eval",
    "rule": "Detect any use of eval() on user input",
    "globPattern": "**/*.js",
    "sourceTypes": ["FILE_HANDLER"],
    "repositoryIds": ["repo_123"]
  }
}

获取统计摘要:

{
  "tool": "stats.summary",
  "input": {
    "organizationId": "org_123"
  }
}

发展

运行测试

uv run pytest tests/ -v

构建包

uv build

发布到PyPI(可选)

uv publish

贡献

我们欢迎来自安全、人工智能和开发工具社区的贡献。


许可证

MIT许可证-请参阅 许可证 了解详情。