Skip to main content
Glama
README.md
# 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)**

```bash
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:**

```json
{
  "mcpServers": {
    "polarion": {
      "command": "polarion-mcp"
    }
  }
}
```

2. **Restart Cursor**

3. **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**

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

**Option 2: In Cursor mcp.json**

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

**Option 3: Using uvx with custom URL**

```json
{
  "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

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

### Running

```bash
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

- **GitHub**: [Polarion-MCP](https://github.com/Sdunga1/Polarion-MCP)
- **PyPI**: [polarion-mcp](https://pypi.org/project/polarion-mcp)
- **Issues**: [Report a bug](https://github.com/Sdunga1/Polarion-MCP/issues)

## License

MIT

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.