Back to MCP directory
publicPublicdnsLocal runtime

sde-mcp

SD Elements MCP服务器是一个提供SD Elements API集成的模型上下文协议服务,使LLM能够与SD Elements安全开发生命周期平台交互。

article

README

🚀 SD Elements MCP 服务器

SD Elements MCP 服务器是一个模型上下文协议(MCP)服务器,提供 SD Elements API 集成。该服务器使大语言模型(LLMs)能够与 SD Elements 安全开发生命周期平台进行交互。

License: MIT Python 3.10+ uv

🚀 快速开始

使用 uvx(推荐)

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

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

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

uvx sde-mcp-server

使用 uv

从 GitHub 安装

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

从 PyPI 安装(可用时)

uv pip install sde-mcp-server
sde-mcp-server

使用 pip

从 GitHub 安装

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

从 PyPI 安装(可用时)

pip install sde-mcp-server
sde-mcp-server

✨ 主要特性

  • 完整的 API 覆盖:支持所有主要的 SD Elements API 端点。
  • 身份验证:基于安全 API 密钥的身份验证。
  • 错误处理:全面的错误处理和验证。
  • 环境配置:通过环境变量进行灵活配置。
  • 现代 Python 构建:使用现代 Python 打包工具(uv、pyproject.toml)构建。
  • MCP 兼容:完全符合模型上下文协议。

📦 安装指南

配置环境变量

服务器需要两个环境变量:

  • SDE_HOST:你的 SD Elements 实例 URL(例如,https://your-sdelements-instance.com
  • SDE_API_KEY:你的 SD Elements API 密钥

选项 1:设置环境变量

export SDE_HOST="https://your-sdelements-instance.com"
export SDE_API_KEY="your-api-key-here"

选项 2:使用 .env 文件

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

SDE_HOST=https://your-sdelements-instance.com
SDE_API_KEY=your-api-key-here

获取 API 密钥

  1. 登录到你的 SD Elements 实例。
  2. 转到 设置 > API 令牌
  3. 生成一个新的 API 令牌。
  4. 复制令牌值,用作 SDE_API_KEY

💻 使用示例

可用工具

项目管理

  • list_projects - 列出所有项目,可选择过滤条件
  • get_project - 获取项目详细信息
  • create_project - 创建新项目
  • update_project - 更新项目详细信息
  • delete_project - 删除项目

应用程序管理

  • list_applications - 列出所有应用程序
  • get_application - 获取应用程序详细信息
  • create_application - 创建新应用程序
  • update_application - 更新应用程序信息

对策管理

  • list_countermeasures - 列出项目的对策
  • get_countermeasure - 获取对策详细信息
  • update_countermeasure - 更新对策状态

任务与调查

  • list_tasks - 列出项目的任务
  • get_task - 获取任务详细信息
  • list_surveys - 列出调查
  • get_survey - 获取调查详细信息

阶段与里程碑

  • list_phases - 列出项目阶段
  • get_phase - 获取阶段详细信息
  • list_milestones - 列出项目里程碑

📚 详细文档

MCP 客户端配置

Claude Desktop

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

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

{
  "mcpServers": {
    "sde-elements": {
      "command": "uvx",
      "args": ["git+https://github.com/geoffwhittington/sde-mcp.git"],
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

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

{
  "mcpServers": {
    "sde-elements": {
      "command": "uvx",
      "args": ["sde-mcp-server"],
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cline

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

从 GitHub 安装(当前可用)

{
  "mcpServers": {
    "sde-elements": {
      "command": "uvx",
      "args": ["git+https://github.com/geoffwhittington/sde-mcp.git"],
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Continue

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

从 GitHub 安装(当前可用)

{
  "mcpServers": {
    "sde-elements": {
      "command": "uvx",
      "args": ["git+https://github.com/geoffwhittington/sde-mcp.git"],
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

Cursor

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

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

{
  "mcpServers": {
    "sde-elements": {
      "command": "uvx",
      "args": ["git+https://github.com/geoffwhittington/sde-mcp.git"],
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

选项 2:使用本地安装

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

{
  "mcpServers": {
    "sde-elements": {
      "command": "sde-mcp-server",
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

选项 3:直接使用 Python 模块

{
  "mcpServers": {
    "sde-elements": {
      "command": "python",
      "args": ["-m", "sde_mcp_server"],
      "env": {
        "SDE_HOST": "https://your-sdelements-instance.com",
        "SDE_API_KEY": "your-api-key-here"
      }
    }
  }
}

🔧 技术细节

开发

前提条件

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

环境搭建

# 克隆仓库
git clone <repository-url>
cd sde-mcp-server

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

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

测试

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

# 使用环境变量进行测试
SDE_HOST=https://demo.sdelements.com SDE_API_KEY=test uv run python -m sde_mcp_server

构建

# 构建软件包
uv build

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

API 覆盖范围

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

  • 项目和应用程序
  • 对策和任务
  • 调查和阶段
  • 里程碑和需求
  • 用户和团队
  • 合规性和报告

📄 许可证

本项目采用 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. 打开拉取请求。

支持

对于问题和疑问:

  1. 查看 问题 页面。
  2. 查看 SD Elements API 文档。
  3. 确保你的 API 密钥具有适当的权限。

⚠️ 重要提示

这是一个非官方的 SD Elements MCP 服务器。如需官方 SD Elements 支持,请联系 Security Compass。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client