Your AI client starts the server on your computer and talks to it over stdio (standard input and output: the client launches the program and exchanges messages through its pipes). Nothing is hosted and no network port opens.
You need three things: Node.js 22 or newer, a Polarion address that has REST enabled, and a Polarion token. The only thing assumed is that your AI client (for example Claude Desktop, Cursor or VS Code) is installed.
Authorization header, as in Authorization: Bearer YOUR_PAT. Type it as shown.YOUR-POLARION is the host (and port) of your Polarion address, for example polarion.mycompany.com, without https:// and without a path.YOUR-POLARION, YOUR_USERNAME and YOUR_PAT are placeholders. Replace them with your own values, without quotes or brackets.Node.js runs the server. npx (installed with Node.js) downloads and starts it.
node -v
Expected: v22. or higher.
If not: an older version prints, or command not found. Reinstall from nodejs.org and open a new terminal.
Write down your Polarion address, the one you open in the browser. The REST URL is that address plus /polarion/rest/v1. Keep the port if there is one.
Example: https://polarion.mycompany.com/polarion/rest/v1
A PAT is a password-like token that lets the server act as you in Polarion. Polarion enforces your permissions.
https://YOUR-POLARION/polarion/#/user_tokens?id=YOUR_USERNAME in the browser. YOUR_USERNAME is the name you log in with. The page is your Personal Access Token section.Expected: the token appears on screen. If Create Token is missing, see the note below.
If not: the page says “X-Rest-Token generation is not allowed”. Ask your Polarion administrator to add these lines to polarion.properties (Polarion’s server configuration file) and restart Polarion:
com.siemens.polarion.rest.enabled=true
com.siemens.polarion.rest.security.restApiToken.enabled=true
Replace YOUR-POLARION and YOUR_PAT. macOS and Linux (on Windows PowerShell write curl.exe instead of curl):
curl -i -H "Authorization: Bearer YOUR_PAT" "https://YOUR-POLARION/polarion/rest/v1/metadata"
Expected: HTTP/1.1 200 and JSON that contains metadata. This needs Polarion 2512 or newer. On 2506 it returns 404; request /projects?page[size]=1 instead (needs global REST GET).
If not:
| Result | Meaning and fix |
|---|---|
| 401 | The token is wrong, cut off or expired. Create a new one. |
| 403 | Polarion denies access. Check your license and REST permissions. |
| 404 | Wrong URL, or Polarion 2506 (no /metadata). Check the URL; on 2506 test /projects?page[size]=1 instead. |
| Timeout or certificate error | Wrong address, VPN needed, or a company certificate. See Troubleshooting. |
If your network reaches Polarion only through a proxy, add HTTPS_PROXY (and NO_PROXY for hosts that must skip it) to the env block of the server entry, next to API_BASE_URL:
"HTTPS_PROXY": "http://proxy.company.example:3128",
"NO_PROXY": ".company.example,localhost"
Only https:// Polarion URLs go through the proxy. A proxy that needs a login takes it as http://user:[email protected]:3128. A 407 error means those credentials are wrong; the password never appears in the error.
This shows that npx can download and start the server. Your client normally does this for you.
macOS and Linux:
API_BASE_URL=https://YOUR-POLARION/polarion/rest/v1 BEARER_TOKEN=YOUR_PAT npx -y polarion-mcp
Windows PowerShell (the command above for macOS and Linux does not work in cmd.exe):
$env:API_BASE_URL='https://YOUR-POLARION/polarion/rest/v1'; $env:BEARER_TOKEN='YOUR_PAT'; npx -y polarion-mcp
Expected: the terminal stays silent and waits for input. This is normal. Press Ctrl+C to stop it.
If not: an Unsupported engine message means Node.js is older than 22. Go back to Step 1.
{
"mcpServers": {
"polarion": {
"command": "npx",
"args": ["-y", "polarion-mcp"],
"env": {
"API_BASE_URL": "https://YOUR-POLARION/polarion/rest/v1",
"BEARER_TOKEN": "YOUR_PAT"
}
}
}
}
Expected: the client lists a polarion server without errors. If not: the JSON is invalid (a missing comma or brace is the usual cause).
Keep the token out of Git. Use polarion-mcp@latest in the client config to receive updates, or [email protected] to pin a version.
Read-only check, in your client: ask Which Polarion user am I? Use getCurrentUser.
Expected: the client calls a Polarion tool and shows your user.
If not: no tool call appears. Restart the client fully and check that the configuration was saved.
| Symptom | Fix |
|---|---|
| Client says Disconnected or Failed to connect | Run the smoke test above in a terminal with the same values. The error it prints is the real one. |
npx: command not found |
Node.js is missing, or the client was started before the install. Install Node.js and restart the client. |
Windows: client cannot start npx (or PowerShell blocks npx.ps1) |
Use npx.cmd as the command, or cmd with args ["/c", "npx", "-y", "polarion-mcp"]. |
| 401 or 403 from tools | Repeat Step 4 with the same token. |
More: Troubleshooting.