设计MCP服务器
用于与Devici API交互的模型上下文协议(MCP)服务器。此服务器提供LLM工具,通过Devici平台管理用户、集合、威胁模型、组件、威胁、缓解措施、团队和仪表板数据。
  
特性
Devici MCP服务器提供以下工具:
用户管理
- 使用分页功能获取用户
- 按ID获取特定用户
- 按字段和文本搜索用户
- 邀请新用户
收集管理
- 获取带分页的集合
- 按ID获取特定收藏
- 创建新收藏
威胁模型管理
- 获取所有具有分页功能的威胁模型
- 按集合获取威胁模型
- 按ID获取特定威胁模型
- 创建新的威胁模型
组件管理
- 获取具有分页功能的组件
- 按ID获取特定组件
- 通过画布获取组件
- 创建新组件
威胁管理
- 通过分页获取威胁
- 通过ID获取特定威胁
- 按组件获取威胁
- 制造新的威胁
缓解措施管理
- 通过分页获得缓解措施
- 按ID获取特定缓解措施
- 通过威胁获得缓解措施
- 制定新的缓解措施
团队管理
- 获取具有分页功能的团队
- 按ID获取特定团队
- 获取团队用户
- 创建新团队
仪表板和报告
- 获取仪表板数据
- 获取报告数据
- 获取威胁模型统计信息
评论与审核
- 获取带有分页的评论
- 按ID获取具体评论
- 获取审核日志
食品法典整合
- 获取codex属性
- 获取codex缓解措施
- 获取codex威胁
快速开始
使用uvx(推荐)
选项1:来自GitHub(当前)
uvx git+https://github.com/geoffwhittington/devici-mcp.git选项2:来自PyPI(未来-发布时)
uvx devici-mcp-server使用紫外线
从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客户IDDEVICI_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凭据
- 登录您的Devici实例
- 首选 设置 > API访问
- 生成新的客户端ID和密钥
- 复制值以用作
DEVICI_CLIENT_ID和DEVICI_CLIENT_SECRET
MCP客户端配置
克劳德桌面
将此添加到您的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 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"
}
}
}
}继续
将此添加到“继续”配置中:
来自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配置文件中:
选项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"
}
}
}
}发展
先决条件
- 紫外线 安装
- Python 3.10或更高版本
设置
# Clone the repository
git clone
cd devici-mcp
# Create virtual environment and install dependencies
uv sync
# Run in development mode
uv run python -m devici_mcp_server测试
# Run the import test
uv run python test_basic.py
# Test with environment variables
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建筑
# Build the package
uv build
# Install locally for testing
uv pip install dist/*.whl特性
- API全面覆盖:支持所有主要的Devici API端点
- 认证:基于安全客户端ID/秘密的身份验证
- 错误处理:全面的错误处理和验证
- 环境配置:通过环境变量灵活配置
- 现代Python:使用现代Python打包(uv、pyproject.toml)构建
- 符合MCP标准:与模型上下文协议完全兼容
API覆盖范围
此服务器提供对以下内容的访问:
- 用户和团队
- 集合和威胁模型
- 组件和威胁
- 缓解措施和意见
- 仪表板数据和报告
- 审计日志和Codex集成
- 搜索和批量操作
许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
贡献
- 分叉存储库
- 创建要素分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add some amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
支持
对于问题和疑问:
- 检查 问题 页
- 查看Devici API文档
- 确保您的API凭据具有适当的权限
______________________________________________________________________
备注:这是Devici的非官方MCP服务器。如需Devici官方支持,请联系Devici团队。
