Skip to main content
Glama

Polarion MCP Server

A Model Context Protocol (MCP) server for interacting with Siemens Polarion requirements management system. No Docker required!

Features

  • 🔐 Authentication - Browser-based login with manual token generation

  • 📋 Projects - List and get detailed project information

  • 📝 Work Items - Query requirements, tasks, and other work items

  • 📄 Documents - Access Polarion documents and spaces

  • 🔍 Flexible queries - Filter work items with custom queries

  • ⚡ Lightweight - Optimized API calls with configurable field sets

  • 📦 Easy Installation - One command to get started

Quick Start (30 seconds)

Installation

Option A: Using pip (Recommended)

pip install polarion-mcp

Option B: Using uvx (No local Python needed) Just use directly in mcp.json (see setup below).

Setup

  1. Add to your Cursor mcp.json:

{
  "mcpServers": {
    "polarion": {
      "command": "polarion-mcp"
    }
  }
}
  1. Restart Cursor

  2. In Cursor chat, authenticate:

Open Polarion login
Set Polarion token: <your-token>

Done! 🎉

Configuration

Connect to Your Polarion Instance

By default connects to http://dev.polarion.atoms.tech/polarion. To use your own instance:

Option 1: Environment Variable

export POLARION_BASE_URL="https://your-polarion.com/polarion"
polarion-mcp

Option 2: In Cursor mcp.json

{
  "mcpServers": {
    "polarion": {
      "command": "polarion-mcp",
      "env": {
        "POLARION_BASE_URL": "https://your-polarion.com/polarion"
      }
    }
  }
}

Option 3: Using uvx with custom URL

{
  "mcpServers": {
    "polarion": {
      "command": "uvx",
      "args": ["polarion-mcp@latest"],
      "env": {
        "POLARION_BASE_URL": "https://your-polarion.com/polarion"
      }
    }
  }
}

Available Tools

Once authenticated, use these commands in Cursor:

Authentication

  • Open Polarion login - Opens browser to Polarion login

  • Set Polarion token: <token> - Saves authentication token

  • Check Polarion status - Verify authentication

Projects

  • Get Polarion projects - List all projects

  • Get Polarion project: PROJECT_ID - Get project details

Work Items

  • Get Polarion work items: PROJECT_ID - List work items

  • Get Polarion work items: PROJECT_ID (query: "HMI AND type:requirement") - Filter results

  • Get Polarion work item: PROJECT_ID ITEM_ID - Get item details

Documents

  • Get Polarion document: PROJECT_ID SPACE_ID DOCUMENT_NAME - Access documents

Analysis

  • polarion_github_requirements_coverage project_id="PROJECT" topic="HMI" - Requirements coverage

Local Development

Prerequisites

  • Python 3.10+

  • Access to Polarion instance

Installation

git clone https://github.com/Sdunga1/Polarion-MCP.git
cd Polarion-MCP
pip install -e .

Running

polarion-mcp

Troubleshooting

Can't connect?

  • Verify POLARION_BASE_URL is correct

  • Check if Polarion instance is accessible

  • Verify token hasn't expired

Authentication failed?

  • Regenerate token in Polarion

  • Use: Open Polarion login → Set Polarion token

  • Check: Check Polarion status

Not finding projects?

  • Verify user has access to projects in Polarion

  • Check authentication: Check Polarion status

Resources

License

MIT

Available Tools

9 tools
check_polarion_statusA
<purpose>Verify Polarion authentication and connection status</purpose>

<when_to_use>
- When experiencing authentication errors
- To verify setup before starting exploration
- When debugging connection issues
- As a diagnostic tool when other tools fail
</when_to_use>

<workflow_position>
DIAGNOSTIC: Use when authentication issues occur
VERIFICATION: Use after set_polarion_token() to confirm setup
TROUBLESHOOTING: Use when other tools return 401 errors
</workflow_position>

<output>
Authentication status and next steps if issues found
</output>

<next_steps>
If no token: Use open_polarion_login() then set_polarion_token()
If token exists: Try get_polarion_projects() to test connectivity
</next_steps>

Inputs: no named parameters. Returns: result

get_polarion_documentA
<purpose>Access specific structured documents within a Polarion space</purpose>

<when_to_use>
- When you need access to organized documents (specifications, manuals)
- When user provides specific space and document names
- When work items reference specific documents that need direct access
- For accessing curated requirement collections in document format
</when_to_use>

<workflow_position>
STEP 1: Use get_polarion_projects() to identify project
STEP 2: Use get_polarion_work_items() to explore and potentially discover space references
STEP 3: Use this tool when you have specific space_id and document_name
ALTERNATIVE: Often get_polarion_work_items() provides equivalent or better information
</workflow_position>

<parameters>
- project_id: Required. From get_polarion_projects()
- space_id: Required. EXACT space name (user-provided or from work item references)
- document_name: Required. Document name (e.g., "HMI", "System Requirements Specification")
- fields: "@basic" for summary, "@all" for complete content
</parameters>

<examples>
- HMI specifications: project_id="AutoCar", space_id="Master Specifications", document_name="HMI"
- System requirements: project_id="AutoCar", space_id="Requirements", document_name="System"
</examples>

<critical_requirements>
- space_id must be EXACT name (case-sensitive)
- document_name is case-sensitive
- Use quotes around space names with spaces (e.g., "Master Specifications")
- Space names typically provided by user or discovered from work item exploration
</critical_requirements>

<output>
Structured document content including organized requirements and specifications
Often contains similar information to work items but in document format
</output>

<troubleshooting>
If 404 error: Verify space_id and document_name spelling
Common spaces: "Master Specifications", "Requirements", "Design Documents"
Try exploring with get_polarion_work_items() first for context
</troubleshooting>

<note>
Space names are not discoverable via API - they come from user knowledge or work item references
</note>

Inputs: document_name (required), project_id (required), space_id (required), fields. Returns: result

get_polarion_projectA
<purpose>Get detailed information about a specific Polarion project</purpose>

<when_to_use>
- When you need detailed project metadata (description, settings, etc.)
- After using get_polarion_projects() to identify the project_id
- When you need project configuration details
- RARELY needed for most exploration tasks
</when_to_use>

<workflow_position>
OPTIONAL: Use after get_polarion_projects() if project details are needed
USUALLY SKIP: Most tasks should go directly to get_polarion_work_items()
</workflow_position>

<parameters>
- project_id: Exact project ID from get_polarion_projects() results
- fields: "@basic" for essential info, "@all" for complete details
</parameters>

<note>Most users should skip this and go directly to exploring work items</note>

Inputs: project_id (required), fields. Returns: result

get_polarion_projectsA
<purpose>Discover available Polarion projects for exploration</purpose>

<when_to_use>
- ALWAYS use this FIRST when starting Polarion exploration
- When you need to find the correct project_id for other operations
- When user asks about projects without specifying project name
- To verify authentication is working
</when_to_use>

<workflow_position>
STEP 1: Use this tool first to discover available projects
STEP 2: Choose relevant project_id from results  
STEP 3: Use get_polarion_work_items() to explore project contents
STEP 4: Use get_polarion_work_item() for detailed information
</workflow_position>

<parameters>
- limit: Number of projects to retrieve (default 10, increase for comprehensive view)
</parameters>

<examples>
- Finding automotive projects: Look for "AutoCar", "Vehicle", "Car" in project names
- Comprehensive discovery: Use limit=50 to see all available projects
</examples>

<output>List of projects with basic info - use project 'id' field for subsequent calls</output>

Inputs: limit. Returns: result

get_polarion_work_itemA
<purpose>Get detailed information about a specific work item</purpose>

<when_to_use>
- AFTER using get_polarion_work_items() to identify specific work items of interest
- When you need complete details about a requirement, task, or specification
- When you need full content, relationships, and metadata
- For deep analysis of specific work items
</when_to_use>

<workflow_position>
STEP 1: Use get_polarion_work_items() to discover and filter work items
STEP 2: Identify specific work_item_id from the results
STEP 3: Use this tool to get complete details
STEP 4: Analyze relationships and linked items if needed
</workflow_position>

<parameters>
- project_id: Required. Must match project from previous search
- work_item_id: Required. Get from get_polarion_work_items() results
- fields: "@basic" for essential info, "@all" for complete details including relationships
</parameters>

<examples>
- Detailed requirement analysis: fields="@all"
- Quick verification: fields="@basic"
- Understanding relationships: fields="@all" (includes linked items)
</examples>

<output>
Complete work item details including:
- Full description and content
- Relationships to other work items
- Metadata and status information
- Approval and review information
</output>

<note>
Use this tool sparingly - only when you need detailed information about specific items
identified through get_polarion_work_items() searches
</note>

Inputs: project_id (required), work_item_id (required), fields. Returns: result

get_polarion_work_itemsA
<purpose>Discover and search work items (requirements, tasks, etc.) in a Polarion project</purpose>

<when_to_use>
- MAIN DISCOVERY TOOL: Use this to explore project contents
- When searching for specific topics (e.g., "HMI", "requirements")
- When you need to understand project scope and available work items
- BEFORE using get_polarion_work_item() for detailed info
</when_to_use>

<workflow_position>
STEP 1: After get_polarion_projects(), use this to explore project contents
STEP 2: Analyze results to identify relevant work items
STEP 3: Use get_polarion_work_item() for detailed information on specific items
OPTIONAL: Use get_polarion_document() if user provides specific space/document names
</workflow_position>

<parameters>
- project_id: Required. Get from get_polarion_projects() results
- limit: Number of items (default 10). Use 30-50 for comprehensive searches
- query: POWERFUL filter. Examples:
  * "HMI" - finds HMI-related items
  * "type:requirement" - only requirements
  * "HMI AND type:requirement" - HMI requirements
  * "title:system" - items with "system" in title
</parameters>

<examples>
- Finding HMI requirements: query="HMI AND type:requirement", limit=30
- Project overview: query="", limit=50
- Security items: query="security OR safety", limit=20
- All requirements: query="type:requirement", limit=100
</examples>

<output>
Minimal fields (id, title, type, description) - use get_polarion_work_item() for full details
Contains rich information including work item relationships and metadata
</output>

<critical_note>
This tool often contains all the information you need. Work items include:
- Requirements, specifications, tasks
- Relationships between items
- Project structure and organization
Check results thoroughly before seeking additional tools
</critical_note>

Inputs: project_id (required), limit, query. Returns: result

open_polarion_loginA
<purpose>Open Polarion login page in browser for manual authentication</purpose>

<when_to_use>
- When you need to authenticate with Polarion for the first time
- When existing token has expired (401 errors)
- When check_polarion_status() shows no valid token
</when_to_use>

<workflow_position>
STEP 1: Use this tool first if you don't have authentication
STEP 2: Complete login in browser and generate token
STEP 3: Use set_polarion_token() with the generated token
STEP 4: Use check_polarion_status() to verify authentication
STEP 5: Begin exploring with get_polarion_projects()
</workflow_position>

<output>Instructions for manual authentication process</output>

Inputs: no named parameters. Returns: result

polarion_github_requirements_coverageA
<purpose>Smart requirements coverage analysis between Polarion and connected GitHub repository</purpose>

<when_to_use>
- When you need to verify if requirements are implemented in the current codebase
- For gap analysis between Polarion specifications and actual code implementation  
- When user asks "check if requirements are implemented" or "find missing implementations"
- For requirements traceability and coverage validation
- When you need to identify what's missing from the current code
</when_to_use>

<workflow_position>
INTELLIGENT COVERAGE ANALYSIS TOOL: Use this for end-to-end requirements verification
STEP 1: Automatically detects connected GitHub repository from context
STEP 2: Fetches FRESH requirements from Polarion for specified topic
STEP 3: Analyzes actual code files in GitHub repository 
STEP 4: Identifies implemented vs missing requirements based on code examination
</workflow_position>

<parameters>
- project_id: Required. Polarion project ID (e.g., "AutoCar", "drivepilot")
- topic: Required. Requirements topic to analyze (e.g., "HMI", "braking", "perception", "safety")
- github_folder: Optional. Specific folder to focus analysis (e.g., "hmi", "braking"). Empty means analyze entire repository
</parameters>

<output>
Comprehensive requirements coverage analysis
</output>

Inputs: project_id (required), topic (required), github_folder. Returns: result

set_polarion_tokenA
<purpose>Set Polarion access token after generating it in browser</purpose>

<when_to_use>
- After using open_polarion_login() and generating token manually
- When you have a valid Polarion token to configure
- When replacing an expired token
</when_to_use>

<workflow_position>
STEP 2: Use this after open_polarion_login() and manual token generation
NEXT: Use check_polarion_status() to verify token is working
THEN: Begin data exploration with get_polarion_projects()
</workflow_position>

<parameters>
- token: The bearer token generated from Polarion's user token page
</parameters>

<output>Confirmation of token storage and next steps</output>

Inputs: token (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 9 tools

    Disambiguation4/5

    Most tools have distinct purposes with clear boundaries, such as authentication tools (check_polarion_status, open_polarion_login, set_polarion_token), project exploration tools (get_polarion_projects, get_polarion_project), and work item/document tools (get_polarion_work_items, get_polarion_work_item, get_polarion_document). However, polarion_github_requirements_coverage overlaps somewhat with get_polarion_work_items in analyzing requirements, which could cause mild confusion about when to use each.

    Naming Consistency5/5

    All tool names follow a consistent snake_case pattern with clear verb_noun structure (e.g., get_polarion_projects, set_polarion_token, check_polarion_status). The naming is highly predictable and readable, making it easy for agents to understand the action and target resource without ambiguity.

    Tool Count5/5

    With 9 tools, the count is well-scoped for a Polarion integration server. It covers authentication, project discovery, work item/document access, and a specialized cross-platform analysis tool, with each tool serving a clear purpose. This is neither too sparse nor bloated for the domain.

    Completeness4/5

    The toolset provides strong coverage for Polarion exploration, including authentication, project listing, work item search/details, and document access, with a unique cross-tool for GitHub integration. Minor gaps exist, such as no explicit update, delete, or creation tools for Polarion entities, but the server's focus on read-only exploration and analysis makes this reasonable for most agent workflows.

    Related MCP Connectors