Devici Mcp

Devici Mcp

🚀 Devici MCP 服务器

Devici MCP 服务器是一个用于与 Devici API 交互的模型上下文协议(MCP)服务器。该服务器通过 Devici 平台提供大语言模型(LLM)工具,用于管理用户、集合、威胁模型、组件、威胁、缓解措施、团队和仪表盘数据。

License: MIT Python 3.10+ uv

✨ 主要特性

用户管理

  • 支持分页获取用户列表
  • 通过 ID 获取特定用户信息
  • 根据字段和文本搜索用户
  • 邀请新用户

集合管理

  • 支持分页获取集合列表
  • 通过 ID 获取特定集合信息
  • 创建新的集合

威胁模型管理

  • 支持分页获取所有威胁模型
  • 根据集合获取威胁模型
  • 通过 ID 获取特定威胁模型信息
  • 创建新的威胁模型

组件管理

  • 支持分页获取组件列表
  • 通过 ID 获取特定组件信息
  • 根据画布获取组件
  • 创建新的组件

威胁管理

  • 支持分页获取威胁列表
  • 通过 ID 获取特定威胁信息
  • 根据组件获取威胁
  • 创建新的威胁

缓解措施管理

  • 支持分页获取缓解措施列表
  • 通过 ID 获取特定缓解措施信息
  • 根据威胁获取缓解措施
  • 创建新的缓解措施

团队管理

  • 支持分页获取团队列表
  • 通过 ID 获取特定团队信息
  • 获取团队成员列表
  • 创建新的团队

仪表盘与报告

  • 获取仪表盘数据
  • 获取报告数据
  • 获取威胁模型统计信息

评论与审计

  • 支持分页获取评论列表
  • 通过 ID 获取特定评论信息
  • 获取审计日志

Codex 集成

  • 获取 Codex 属性
  • 获取 Codex 缓解措施
  • 获取 Codex 威胁

🚀 快速开始

使用 uvx(推荐)

选项 1:从 GitHub 安装(当前可用)

uvx git+https://github.com/geoffwhittington/devici-mcp.git

选项 2:从 PyPI 安装(未来发布后可用)

uvx devici-mcp-server

使用 uv

从 GitHub 安装

uv pip install git+https://github.com/geoffwhittington/devici-mcp.git
devici-mcp-server

从 PyPI 安装(可用时)

uv pip install devici-mcp-server
devici-mcp-server

使用 pip

从 GitHub 安装

pip install git+https://github.com/geoffwhittington/devici-mcp.git
devici-mcp-server

从 PyPI 安装(可用时)

pip install devici-mcp-server
devici-mcp-server

📦 安装指南

配置环境变量

服务器需要以下三个环境变量:

  • DEVICI_API_BASE_URL:你的 Devici 实例 URL(例如:https://api.devici.com/v1
  • DEVICI_CLIENT_ID:你的 Devici 客户端 ID
  • DEVICI_CLIENT_SECRET:你的 Devici 客户端密钥

选项 1:设置环境变量

export DEVICI_API_BASE_URL="https://api.devici.com/v1"
export DEVICI_CLIENT_ID="your-client-id-here"
export DEVICI_CLIENT_SECRET="your-client-secret-here"

选项 2:使用 .env 文件

在工作目录中创建一个 .env 文件:

DEVICI_API_BASE_URL=https://api.devici.com/v1
DEVICI_CLIENT_ID=your-client-id-here
DEVICI_CLIENT_SECRET=your-client-secret-here

获取 API 凭证

  1. 登录到你的 Devici 实例。
  2. 转到 设置 > API 访问
  3. 生成新的客户端 ID 和密钥。
  4. 复制这些值,用作 DEVICI_CLIENT_IDDEVICI_CLIENT_SECRET

MCP 客户端配置

Claude Desktop

将以下内容添加到你的 Claude Desktop 配置文件中:

选项 1:从 GitHub 安装(当前可用)
{
"mcpServers": {
"devici": {
"command": "uvx",
"args": ["git+https://github.com/geoffwhittington/devici-mcp.git"],
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
选项 2:从 PyPI 安装(未来可用)
{
"mcpServers": {
"devici": {
"command": "uvx",
"args": ["devici-mcp-server"],
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}

Cline

将以下内容添加到你的 Cline MCP 设置中:

从 GitHub 安装(当前可用)
{
"mcpServers": {
"devici": {
"command": "uvx",
"args": ["git+https://github.com/geoffwhittington/devici-mcp.git"],
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}

Continue

将以下内容添加到你的 Continue 配置中:

从 GitHub 安装(当前可用)
{
"mcpServers": {
"devici": {
"command": "uvx",
"args": ["git+https://github.com/geoffwhittington/devici-mcp.git"],
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/api/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}

Cursor

将以下内容添加到你的 Cursor 配置文件中:

选项 1:从 GitHub 安装(当前可用)
{
"mcpServers": {
"devici": {
"command": "uvx",
"args": ["git+https://github.com/geoffwhittington/devici-mcp.git"],
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/api/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
选项 2:使用本地安装

如果你已经在本地安装了该包:

{
"mcpServers": {
"devici": {
"command": "devici-mcp-server",
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/api/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}
选项 3:直接使用 Python 模块
{
"mcpServers": {
"devici": {
"command": "python",
"args": ["-m", "devici_mcp_server"],
"env": {
"DEVICI_API_BASE_URL": "https://api.devici.com/api/v1",
"DEVICI_CLIENT_ID": "your-client-id-here",
"DEVICI_CLIENT_SECRET": "your-client-secret-here"
}
}
}
}

🔧 开发

前提条件

  • 安装 uv
  • Python 3.10 或更高版本

环境搭建

# 克隆仓库
git clone 
cd devici-mcp

# 创建虚拟环境并安装依赖
uv sync

# 以开发模式运行
uv run python -m devici_mcp_server

测试

# 运行导入测试
uv run python test_basic.py

# 使用环境变量进行测试
DEVICI_API_BASE_URL=https://api.devici.com/api/v1 DEVICI_CLIENT_ID=test DEVICI_CLIENT_SECRET=test uv run python -m devici_mcp_server

打包

# 打包项目
uv build

# 本地安装以进行测试
uv pip install dist/*.whl

📚 详细文档

API 覆盖范围

该服务器提供对以下内容的访问:

  • 用户和团队
  • 集合和威胁模型
  • 组件和威胁
  • 缓解措施和评论
  • 仪表盘数据和报告
  • 审计日志和 Codex 集成
  • 搜索和批量操作

特性总结

  • 全面的 API 覆盖:支持所有主要的 Devici API 端点
  • 认证机制:基于客户端 ID/密钥的安全认证
  • 错误处理:全面的错误处理和验证机制
  • 环境配置:通过环境变量实现灵活的配置
  • 现代 Python 技术栈:采用现代 Python 打包工具(uv, pyproject.toml)构建
  • MCP 兼容:完全符合模型上下文协议

📄 许可证

本项目采用 MIT 许可证 - 详情请参阅 LICENSE 文件。

贡献指南

  1. 分叉仓库
  2. 创建功能分支 (git checkout -b feature/amazing-feature)
  3. 提交更改 (git commit -m 'Add some amazing feature')
  4. 推送至分支 (git push origin feature/amazing-feature)
  5. 发起拉取请求

支持

如果遇到问题或有疑问:

  • 查看 问题 页面
  • 查阅 Devici API 文档
  • 确保你的 API 凭证具有适当的权限

⚠️ 重要提示

这是一个非官方的 Devici MCP 服务器。如需官方 Devici 支持,请联系 Devici 团队。

  • 0 关注
  • 0 收藏,41 浏览
  • system 提出于 2025-09-30 00:39

相似服务问题

相关AI产品