SD Elements MCP Server
A Model Context Protocol server that provides SD Elements API integration. This server enables LLMs to interact with SD Elements security development lifecycle platform.
Available Tools
Project Management
list_projects- List all projects with optional filteringget_project- Get detailed project informationcreate_project- Create a new projectcreate_project_from_code- Create application and project in SD Elements. Returns the project survey structure with all available questions and answers. IMPORTANT: The AI client must review the survey structure, determine appropriate answers based on the project context, set them usingadd_survey_answers_by_textorset_project_survey_by_text, and then commit the survey draft usingcommit_survey_draftto publish the survey and generate countermeasures.update_project- Update project details (name, description, status, risk_policy)delete_project- Delete a projectlist_profiles- List all available profileslist_risk_policies- List all available risk policiesget_risk_policy- Get details of a specific risk policy
Application Management
list_applications- List all applicationsget_application- Get application detailscreate_application- Create a new applicationupdate_application- Update application information
Countermeasures
list_countermeasures- List countermeasures for a projectget_countermeasure- Get countermeasure detailsupdate_countermeasure- Update countermeasure status or detailsadd_countermeasure_note- Add a note to an existing countermeasure (convenience tool for adding notes only)
Important Note on Adding Notes:
update_countermeasurewith thenotesparameter sets astatus_note, which is only saved when the status actually changesIf a countermeasure already has the target status, use
add_countermeasure_noteinstead to ensure the note is savedAlternatively, you can change the status to a different value first, then back to the target status to trigger saving the
status_note
Project Surveys
get_project_survey- Get the complete survey structure for a projectget_survey_answers_for_project- Get the survey answers that are currently selected/assigned for a project in readable formatupdate_project_survey- Update project survey answers with answer IDsfind_survey_answers- Find answer IDs by searching for answer text (e.g., "Java", "Web Application")set_project_survey_by_text- Set survey using answer text directly instead of IDsadd_survey_answers_by_text- Add answers to survey without removing existing ones (e.g., add "Python")remove_survey_answers_by_text- Remove specific answers from survey (e.g., remove "Java")
Repository Scanning
list_scan_connections- List available repository scan connections (GitHub/GitLab)scan_repository- Scan a repository to automatically populate project surveyget_scan_status- Get status and results of a repository scanlist_scans- List all repository scans for a project
Project Diagrams
list_project_diagrams- List diagrams for a projectget_diagram- Get a specific diagram with its datacreate_diagram- Create a new project diagramupdate_diagram- Update an existing diagramdelete_diagram- Delete a project diagram
Note: The Project Diagrams feature requires enablement by your Customer Success Manager. Contact your CSM if this feature is not available on your instance.
Advanced Reports
list_advanced_reports- List all advanced reportsget_advanced_report- Get report configurationrun_advanced_report- Execute a report and get the data (JSON/CSV)create_advanced_report- Create a new advanced reportexecute_cube_query- Execute Cube API queries directly for advanced analytics
Quick Start
Using uvx (recommended)
Option 1: From GitHub (Current)
Option 2: From PyPI (Future - when published)
Using uv
Install from GitHub
Install from PyPI (when available)
Using pip
Install from GitHub
Install from PyPI (when available)
Configuration
The server requires two environment variables:
SDE_HOST: Your SD Elements instance URL (e.g.,https://your-sdelements-instance.com)SDE_API_KEY: Your SD Elements API key
Setting Environment Variables
Option 1: Environment Variables
Option 2: .env File
Create a .env file in your working directory:
Getting Your API Key
Log into your SD Elements instance
Go to Settings > API Tokens
Generate a new API token
Copy the token value for use as
SDE_API_KEY
MCP Client Configuration
Claude Desktop
Add this to your Claude Desktop configuration file:
Option 1: From GitHub (Current)
Option 2: From PyPI (Future)
Cline
Add this to your Cline MCP settings:
From GitHub (Current)
Continue
Add this to your Continue configuration:
From GitHub (Current)
Cursor
Add this to your Cursor configuration file:
Option 1: From GitHub (Current)
Option 2: Using local installation
If you have the package installed locally:
Option 3: Using Python module directly
Development
Prerequisites
uv installed
Python 3.10 or higher
Setup
Testing Locally
Testing
Setup (one-time):
Run tests (always from project root):
Test with MCP Inspector:
Important:
Always run tests from the project root directory (not from
tests/)The project must be installed first (
pip install -e .oruv sync)Test dependencies are isolated - they don't pollute the server installation
See tests/README.md for full testing guide.
Building
Key Features & Use Cases
1. Project & Application Management
Create and manage projects:
Create project from code context:
Note: After creating the project, you must:
Review the survey structure returned by the tool
Set appropriate survey answers using
add_survey_answers_by_textorset_project_survey_by_textCommit the survey draft using
commit_survey_draftto generate countermeasures
The create_project_from_code tool:
Creates or uses an existing application
Creates a new project in that application
Returns the complete survey structure with all available questions and answers
IMPORTANT: This tool does NOT automatically set survey answers or commit the draft. The AI client MUST:
Review the returned survey structure (all available questions and answers)
Use its AI knowledge to determine appropriate survey answers based on the project context
Call
add_survey_answers_by_textorset_project_survey_by_textto set the answersCall
commit_survey_draftto publish the survey and generate countermeasures
The survey draft is NOT committed automatically. The AI client must commit it after setting the answers to ensure countermeasures are generated.
Manage applications:
2. Natural Language Survey Management
Set surveys using plain English instead of answer IDs:
Add/remove specific technologies:
Query current configuration:
Commit survey changes:
No need to know answer IDs - just use technology names like "Java", "Python", "AWS", etc.
3. Automated Repository Scanning
Scan repositories to auto-populate surveys:
The system will:
Detect programming languages, frameworks, databases
Identify cloud technologies and dependencies
Automatically update the project survey
Lock the project during scan for data integrity
Check scan progress:
4. Threat Model Diagrams
Manage diagrams:
Note: The Project Diagrams feature must be enabled on your SD Elements instance. Contact your Customer Success Manager to enable this feature.
5. Countermeasure Management
Track and manage security countermeasures:
Important: When adding notes to countermeasures:
Use
add_countermeasure_notewhen the countermeasure already has the target statusupdate_countermeasurewithnotesonly saves the note when the status actually changesIf you need to add a note without changing status, always use
add_countermeasure_note
6. Advanced Reporting
Work with reports:
Execute custom Cube queries:
Use the Advanced Reports and Cube API to generate custom analytics and insights from your SD Elements data.
7. User & Team Management
Manage users and teams:
8. Connection Testing & Generic API Access
Test API connectivity:
Make custom API requests:
Features
Natural Language Control: Manage SD Elements using plain English
Full API Coverage: Supports all major SD Elements API endpoints
Authentication: Secure API key-based authentication
Error Handling: Comprehensive error handling and validation
Environment Configuration: Flexible configuration via environment variables
Modern Python: Built with modern Python packaging (uv, pyproject.toml)
MCP Compliant: Fully compatible with the Model Context Protocol
Complete Example Workflows
Project Setup Workflow
Survey Management Workflow
Repository Scanning Workflow
Diagram Management Workflow
Note: Diagrams must be created/edited through the SD Elements UI or API with proper JSON schema. The feature requires CSM enablement.
Countermeasure Management Workflow
Reporting Workflow
User & Team Management Workflow
Full Project Lifecycle Example
API Coverage
This server provides comprehensive access to SD Elements functionality:
Core Resources
Projects: Full CRUD (Create, Read, Update, Delete) operations
Applications: Create, list, view, and update applications
Business Units: List and view organizational structure
Security Management
Countermeasures: List, view, update status, and add notes
Use
update_countermeasureto change status (notes are saved as status_note when status changes)Use
add_countermeasure_noteto add notes to countermeasures that already have the target statusNote:
update_countermeasure'snotesparameter only saves when status actually changes
Project Surveys: Full survey management with natural language support
Set answers using technology names (no ID lookup needed)
Add/remove specific answers incrementally
View current configuration in multiple formats
Commit survey drafts
Auto-resolve dependencies
Automation & Integration
Repository Scanning: Automated technology detection
GitHub and GitLab integration
Automatic survey population
Scan status tracking
Historical scan management
Threat Model Diagrams: Complete diagram lifecycle (requires CSM enablement)
Full CRUD operations
List, view, create, update, and delete diagrams
Work with diagram data via API
Analytics & Reporting
Advanced Reports: Flexible reporting and analytics
List available reports
Execute existing reports (JSON/CSV output)
Create custom reports with Cube API
Execute Cube queries directly for advanced analytics
User & Team Management
Users: List users, view profiles, get current user
Authentication: Test API connectivity and credentials
Advanced Features
Generic API Access: Make custom API calls to any SD Elements endpoint
Flexible Configuration: Environment-based setup with
.envsupportNatural Language Interface: Control everything through plain English commands
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
Support
For issues and questions:
Check the Issues page
Review the SD Elements API documentation
Ensure your API key has proper permissions
Note: This is an unofficial MCP server for SD Elements. For official SD Elements support, please contact Security Compass.
This server cannot be installed