MCP Server Integration
Pidima provides a Model Context Protocol (MCP) server that enables AI assistants like Claude, Cursor, GPT, and other LLM-based tools to interact directly with your Pidima instance. This allows AI assistants to manage requirements, test cases, architecture, and more through natural language conversations.
What is MCP?
The Model Context Protocol (MCP) is an open standard that enables AI applications to securely connect to external data sources and tools. By implementing an MCP server, Pidima allows AI assistants to:
- Query and search requirements, test cases, and documents
- Create and update engineering artifacts programmatically
- Leverage AI features like test generation and requirement analysis
- Maintain context across complex engineering workflows
Quick Start
Step 1: Create an API Key
API keys are long-lived credentials that don't expire (unless you set an expiration). This is the recommended approach for MCP integrations.
- Log in to Pidima
- Go to Settings → API Keys
- Click Create API Key
- Give it a descriptive name (e.g., "Cursor MCP Integration")
- Copy the key immediately — it won't be shown again!
Or use the API:
# Get a temporary token
TOKEN=$(curl -s -X POST "https://your-pidima-host/api/v1.0/auth/login" \
-H "Content-Type: application/json" \
-d '{"email":"your-email@example.com","password":"your-password"}' | jq -r '.token')
# Create an API key
curl -X POST "https://your-pidima-host/api/v1.0/api-keys" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "MCP Integration Key",
"expiresInDays": null
}'
Response:
{
"apiKey": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "MCP Integration Key",
"keyPrefix": "pdk_a1b2c3d4",
"createdAt": "2026-07-31T10:00:00Z"
},
"key": "pdk_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0"
}
The full API key is only shown once. Save it immediately — it cannot be retrieved later.
Step 2: Configure Your AI Client
Cursor IDE
- Open Cursor Settings (
Cmd+,on Mac,Ctrl+,on Windows/Linux) - Search for "MCP" or navigate to Features → MCP Servers
- Click Add MCP Server or edit
~/.cursor/mcp.jsondirectly:
{
"mcpServers": {
"pidima": {
"url": "https://your-pidima-host/mcp",
"transport": "streamable-http",
"headers": {
"X-API-Key": "pdk_your_api_key_here"
}
}
}
}
- Restart Cursor to load the configuration
- Open the MCP panel to verify connection
Configuration file locations:
- macOS:
~/.cursor/mcp.json - Linux:
~/.cursor/mcp.json - Windows:
%USERPROFILE%\.cursor\mcp.json
Claude Desktop
Add to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/config.json
Linux: ~/.config/claude/config.json
Windows: %APPDATA%\Claude\config.json
{
"mcpServers": {
"pidima": {
"url": "https://your-pidima-host/mcp",
"transport": "streamable-http",
"headers": {
"X-API-Key": "pdk_your_api_key_here"
}
}
}
}
Step 3: Verify Connection
Test the connection by listing available tools:
curl -X POST "https://your-pidima-host/mcp" \
-H "Content-Type: application/json" \
-H "Accept: text/event-stream, application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}'
The MCP endpoint requires Accept: text/event-stream, application/json header for proper response handling.
API Key Management
Create API Key
POST /api/v1.0/api-keys
Authorization: Bearer <jwt-token>
Content-Type: application/json
{
"name": "My Integration Key",
"expiresInDays": 365 // Optional: null for no expiration
}
List API Keys
GET /api/v1.0/api-keys
Authorization: Bearer <jwt-token>
Revoke API Key
POST /api/v1.0/api-keys/{id}/revoke
Authorization: Bearer <jwt-token>
Delete API Key
DELETE /api/v1.0/api-keys/{id}
Authorization: Bearer <jwt-token>
Available Tools (92 total)
The Pidima MCP server exposes 92 tools for comprehensive platform access:
Project Management (6 tools)
| Tool | Description |
|---|---|
list_projects | Lists all projects accessible to the authenticated user |
get_project | Get detailed information about a specific project including all its requirement levels |
get_project_overview | Get a comprehensive project overview including project details, requirement levels, and statistics |
create_project | Create a new project in an account |
update_project | Update an existing project |
delete_project | Delete a project |
list_project_levels | List all requirement levels in a project |
Requirements Management (10 tools)
| Tool | Description |
|---|---|
list_requirements | List requirements for a project with pagination and filtering |
get_requirement | Get a single requirement by its ID, including links to test cases |
create_requirement | Create a new requirement |
update_requirement | Update an existing requirement |
delete_requirement | Delete a requirement |
approve_requirement | Approve a requirement, changing its status to APPROVED |
reject_requirement | Reject a requirement, changing its status to REJECTED |
search_requirements | Search requirements by query text using semantic embedding search |
get_requirement_status_distribution | Get requirement status distribution for a project |
refine_requirement | Refine requirements using AI |
Test Case Management (8 tools)
| Tool | Description |
|---|---|
list_testcases | List test cases for a project with pagination |
get_testcase | Get detailed information about a specific test case |
create_testcase | Create a new test case |
update_testcase | Update an existing test case |
delete_testcase | Delete a test case |
mark_testcase_synced | Mark a test case as synced (ready for use) |
get_testcase_status_distribution | Get test case status distribution for a project |
Architecture Management (5 tools)
| Tool | Description |
|---|---|
list_architectures | List all architecture diagrams for a project |
get_architecture | Get detailed information about a specific architecture diagram |
create_architecture | Create a new architecture diagram with PlantUML code |
delete_architecture | Delete an architecture diagram |
get_architectures_by_requirement | Get architectures linked to a specific requirement |
Traceability (5 tools)
| Tool | Description |
|---|---|
create_trace_link | Create traceability links between a requirement and test cases |
get_traceability | Get traceability links for a requirement |
get_traceability_matrix | Get the traceability matrix showing links between requirements and test cases |
get_traceability_coverage | Get traceability coverage statistics for a project level |
AI Generation (6 tools)
| Tool | Description |
|---|---|
generate_requirements | Generate requirements using AI from project documents |
generate_testcases | Generate test cases using AI for requirements in a project |
generate_architecture | Generate architecture diagram using AI based on requirements |
generate_ai_links | Generate AI-powered link suggestions between requirements and test cases |
approve_ai_links | Approve and persist AI-generated link suggestions |
analyze_requirements | Analyze requirements using AI |
Gap Analysis (8 tools)
| Tool | Description |
|---|---|
create_gap_analysis | Start a comprehensive gap analysis job for a project level |
run_gap_analysis | Run gap analysis for a project level |
get_gap_analysis_job | Get the status and details of a gap analysis job |
get_gap_analysis_issues | Get issues found by a gap analysis job |
get_gap_analysis_metrics | Get computed metrics and scores for a gap analysis job |
get_latest_gap_analysis | Get the latest gap analysis for a project level |
resolve_gap_issue | Resolve a gap analysis issue using AI |
get_resolution_preview | Get a resolution preview for conflict/duplicate issues |
get_link_suggestions | Get AI-powered link suggestions for resolving orphan issues |
Compliance (5 tools)
| Tool | Description |
|---|---|
analyze_compliance | Start compliance analysis for requirements against regulatory documents |
get_compliance_results | Get the latest compliance analysis results for a requirement |
resolve_compliance_issue | Get AI suggestion to resolve a compliance clause conflict |
apply_compliance_suggestion | Apply a saved AI compliance suggestion to update the requirement |
mark_compliance_resolved | Mark a compliance issue as resolved without changing the requirement |
Impact Analysis (5 tools)
| Tool | Description |
|---|---|
run_impact_analysis | Run impact analysis for a requirement change |
trigger_impact_analysis | Trigger smart impact analysis for a requirement change |
get_impact_reports | Get impact analysis report summaries for a project |
get_impact_report | Get detailed impact analysis report by ID |
get_impacted_artifacts | Get impacted artifacts from an impact analysis report |
Search (5 tools)
| Tool | Description |
|---|---|
search_requirements | Search requirements by query text within a project |
search_requirements_semantic | Semantic search for requirements only |
search_testcases_semantic | Semantic search for test cases only |
search_documents_semantic | Semantic search for RAG documents only |
unified_search | Unified semantic search across all artifact types |
Import (5 tools)
| Tool | Description |
|---|---|
import_requirement | Import a single requirement from external data |
import_requirements_batch | Import multiple requirements in batch |
import_testcase | Import a single test case from external data |
import_testcases_batch | Import multiple test cases in batch |
import_architecture | Import a single architecture diagram |
ReqIF Import/Export (7 tools)
| Tool | Description |
|---|---|
export_requirements_reqif | Export requirements to ReqIF format. Creates an async job. Parameters: projectId (required), levelId (optional), packaging (REQIF or REQIFZ), includeRelations (optional) |
export_testcases_reqif | Export test cases to ReqIF format. Creates an async job with same parameters as requirements export |
get_reqif_job_status | Get the status of a ReqIF import/export job including progress, messages, and download availability |
get_reqif_job_items | Get preview items from a ReqIF import job awaiting confirmation. Supports pagination and filtering by action (CREATE, UPDATE, SKIP, ERROR) |
confirm_reqif_import | Confirm and commit a ReqIF import job. Supports conflict strategies: UPDATE_EXISTING, SKIP_EXISTING, CREATE_NEW |
cancel_reqif_import | Cancel a ReqIF import job that is awaiting confirmation. Discards all preview items |
download_reqif_artifact | Download the artifact from a completed ReqIF export job. Returns base64-encoded file content |
ALM Tickets (9 tools)
| Tool | Description |
|---|---|
create_ticket | Create a new ALM ticket (BUG, TASK, STORY, EPIC, FEATURE, IMPROVEMENT, SUBTASK). Requires linking to a requirement or test case |
get_ticket | Get a ticket by ID with full details including Pidima links and relationships |
get_ticket_by_key | Get a ticket by its display key (e.g., PROJ-CT-00045) |
update_ticket | Update ticket fields (title, description, priority, assignee, sprint, story points) |
change_ticket_status | Transition a ticket's status (OPEN, IN_PROGRESS, IN_REVIEW, BLOCKED, DONE, CLOSED, CANCELLED) |
delete_ticket | Delete a ticket (requires PROJECT_MANAGER role or higher) |
list_tickets | List tickets for a project with filtering by level, status, type, assignee, sprint, and search query |
search_tickets | Advanced ticket search with multiple filter criteria (comma-separated statuses, types, assignees) |
get_ticket_board | Get Kanban board view with tickets grouped by status columns |
Analytics & Jobs (3 tools)
| Tool | Description |
|---|---|
get_job_status | Get the status of an async job by its ID |
get_project_stats | Get project statistics including requirement and test case counts |
Review Workflow (7 tools)
| Tool | Description |
|---|---|
submit_for_review | Submit an item (requirement, testcase, or architecture) for review. Requires item type, item ID, and reviewer IDs |
submit_review_decision | Make a review decision (APPROVED, REJECTED, or CHANGES_REQUESTED) on an item under review |
get_current_review | Get the current active review request for an item, including reviewer assignments and status |
get_review_history | Get the complete review history for an item, showing all submissions, decisions, and status changes |
get_eligible_reviewers | Get a list of users who can review an item (project members excluding the submitter) |
get_review_queue | Get the pending review queue for the current user, showing items awaiting their review decision |
bulk_submit_for_review | Submit multiple items for review in a single operation. Returns success/skip status for each item |
Tool Usage Examples
List Projects
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_projects",
"arguments": {}
}
}
Search Requirements
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "search_requirements",
"arguments": {
"projectId": "your-project-uuid",
"query": "safety critical requirements",
"limit": 10
}
}
}
Create Requirement
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "create_requirement",
"arguments": {
"projectId": "your-project-uuid",
"levelId": "your-level-uuid",
"name": "REQ-001",
"description": "The system shall provide user authentication via OAuth 2.0",
"type": "FUNCTIONAL",
"priority": "HIGH"
}
}
}
Generate Test Cases with AI
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "generate_testcases",
"arguments": {
"projectId": "your-project-uuid",
"levelId": "your-level-uuid"
}
}
}
Run Gap Analysis
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "run_gap_analysis",
"arguments": {
"projectId": "your-project-uuid",
"levelId": "your-level-uuid"
}
}
}
Submit for Review
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "submit_for_review",
"arguments": {
"itemType": "requirements",
"itemId": "your-requirement-uuid",
"reviewerIds": "reviewer-uuid-1,reviewer-uuid-2",
"comment": "Ready for review - implemented all feedback from previous cycle"
}
}
}
Make Review Decision
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "submit_review_decision",
"arguments": {
"itemType": "requirements",
"itemId": "your-requirement-uuid",
"decision": "APPROVED",
"comment": "Meets all acceptance criteria"
}
}
}
Get Review Queue
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "get_review_queue",
"arguments": {
"itemType": "requirements"
}
}
}
Export Requirements to ReqIF
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "export_requirements_reqif",
"arguments": {
"projectId": "your-project-uuid",
"levelId": "your-level-uuid",
"packaging": "REQIFZ",
"includeRelations": true
}
}
}
Response:
{
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"message": "Export job started. Poll get_reqif_job_status to check progress."
}
Check ReqIF Job Status
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "get_reqif_job_status",
"arguments": {
"jobId": "550e8400-e29b-41d4-a716-446655440000"
}
}
}
Response:
{
"jobId": "550e8400-e29b-41d4-a716-446655440000",
"status": "COMPLETED",
"operation": "EXPORT",
"entityType": "REQUIREMENT",
"progressPercentage": 100,
"currentStep": "Completed",
"canDownload": true,
"artifactName": "requirements-export-2026-07-31.reqifz"
}
Create a Ticket
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "create_ticket",
"arguments": {
"projectId": "your-project-uuid",
"title": "Implement OAuth 2.0 authentication",
"description": "Add support for OAuth 2.0 authentication flow as per REQ-AUTH-001",
"ticketType": "TASK",
"priority": "HIGH",
"linkedRequirementId": "requirement-uuid"
}
}
}
Response:
{
"id": "ticket-uuid",
"ticketKey": "PROJ-CT-00001",
"title": "Implement OAuth 2.0 authentication",
"ticketType": "TASK",
"status": "OPEN",
"priority": "HIGH"
}
List Tickets with Filtering
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/call",
"params": {
"name": "list_tickets",
"arguments": {
"projectId": "your-project-uuid",
"status": "IN_PROGRESS",
"ticketType": "BUG",
"page": 0,
"size": 20
}
}
}
Get Ticket Board (Kanban View)
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "get_ticket_board",
"arguments": {
"projectId": "your-project-uuid",
"sprintId": "sprint-uuid"
}
}
}
Response:
{
"projectId": "your-project-uuid",
"sprintId": "sprint-uuid",
"columns": {
"OPEN": [{"id": "...", "ticketKey": "PROJ-CT-00001", "title": "..."}],
"IN_PROGRESS": [{"id": "...", "ticketKey": "PROJ-CT-00002", "title": "..."}],
"DONE": []
},
"columnTotals": {"OPEN": 5, "IN_PROGRESS": 3, "DONE": 12}
}
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/mcp/login | POST | Authenticate and obtain bearer token |
/mcp | POST | MCP protocol endpoint (JSON-RPC 2.0) |
/mcp-health | GET | Health check endpoint |
/api/v1.0/api-keys | POST | Create a new API key |
/api/v1.0/api-keys | GET | List all API keys |
/api/v1.0/api-keys/{id}/revoke | POST | Revoke an API key |
/api/v1.0/api-keys/{id} | DELETE | Delete an API key |
Authentication Methods
API Key (Recommended)
API keys are long-lived credentials perfect for MCP integrations:
{
"headers": {
"X-API-Key": "pdk_your_api_key_here"
}
}
Bearer Token
Bearer tokens expire after 24 hours. Use for testing or short-term access:
# Get token
curl -X POST "https://your-pidima-host/mcp/login" \
-H "Content-Type: application/json" \
-d '{"email":"your-email@example.com","password":"your-password"}'
{
"headers": {
"Authorization": "Bearer YOUR_TOKEN_HERE"
}
}
Custom Integration
For custom integrations, implement an MCP client that:
- Connects to the Pidima MCP endpoint via HTTP
- Sends JSON-RPC 2.0 messages
- Includes the appropriate authentication header
import requests
import json
class PidimaMCPClient:
def __init__(self, base_url: str, api_key: str):
self.url = f"{base_url}/mcp"
self.headers = {
"Content-Type": "application/json",
"Accept": "text/event-stream, application/json",
"X-API-Key": api_key
}
self.request_id = 0
def call_tool(self, tool_name: str, arguments: dict) -> dict:
self.request_id += 1
payload = {
"jsonrpc": "2.0",
"id": self.request_id,
"method": "tools/call",
"params": {
"name": tool_name,
"arguments": arguments
}
}
response = requests.post(self.url, headers=self.headers, json=payload)
return response.json()
# Usage
client = PidimaMCPClient("https://your-pidima-host", "pdk_your_api_key")
projects = client.call_tool("list_projects", {})
print(projects)
Error Handling
The MCP server returns standard JSON-RPC 2.0 error responses:
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32600,
"message": "Invalid request",
"data": "Additional error details"
}
}
Common Error Codes
| Code | Meaning | Resolution |
|---|---|---|
| -32700 | Parse error | Check JSON syntax |
| -32600 | Invalid request | Verify request structure |
| -32601 | Method not found | Check method name spelling |
| -32602 | Invalid params | Verify parameter types and required fields |
| -32603 | Internal error | Contact support if persistent |
| 401 | Unauthorized | API key invalid or expired—re-authenticate |
| 403 | Forbidden | User lacks permission for this operation |
| 404 | Not found | Resource ID does not exist |
Security Best Practices
- Never hardcode API keys in source control
- Use environment variables for key storage
- Rotate keys regularly for production integrations
- Use separate keys for different environments (dev, staging, prod)
- Limit key scope by using service accounts with minimal permissions
# Store API key in environment variable
export PIDIMA_API_KEY="pdk_your_api_key_here"
Health Check
Monitor MCP server availability:
curl "https://your-pidima-host/mcp-health"
Response:
{
"status": "healthy",
"timestamp": "2026-07-31T10:00:00Z",
"version": "1.0.0"
}
Troubleshooting
Connection Issues
- Verify the endpoint URL is correct and accessible
- Check the Accept header — must include
text/event-stream, application/json - Check firewall rules allow outbound HTTPS connections
- Confirm the API key is valid and not revoked
Authentication Failures
- Verify API key starts with
pdk_prefix - Check key status in Settings → API Keys
- Create a new key if the current one may be compromised
Tool Execution Errors
- Review parameter requirements for the tool
- Confirm resource IDs exist and are accessible
- Check user permissions for the requested operation
Cursor-Specific Issues
- Restart Cursor after changing
mcp.json - Check file permissions on the config file
- Verify JSON syntax — use a JSON validator
- Check Cursor logs for MCP connection errors
Related Resources
- Authentication Guide — JWT token authentication details
- Developer API Reference — Complete REST API documentation
- Programming Guide — SDK examples and code patterns
- Model Context Protocol Specification — Official MCP documentation