HP ALM MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@HP ALM MCP Server list test cases in folder 'Login'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
HP ALM MCP Server
An MCP (Model Context Protocol) server that exposes HP ALM / Quality Center as tools for AI agents — GitHub Copilot, Claude Desktop, and any other MCP-compatible client.
It covers all day-to-day QA workflows: creating and managing test cases, pulling tests into test sets, recording execution results, filing defects, and managing requirements — all callable by an AI agent through natural language.
Table of Contents
Related MCP server: Autotest AI MCP Server
Features
Category | Count | What you can do |
Session | 1 | Refresh / reconnect the ALM session |
Test Plan — Folders | 2 | Create nested folder trees in Test Plan and Test Lab |
Test Plan — Test Cases | 5 | List, get, find, create, bulk-create, update test cases |
Test Plan — Version Control | 3 | Check out, check in, get VC status |
Test Plan — Design Steps | 1 | Add / replace design steps |
Test Lab — Test Sets | 2 | Find and create test sets |
Test Lab — Test Instances | 3 | Add tests to sets, list instances, find by name |
Test Execution | 5 | Create runs, update run/step status, full end-to-end execute |
Defects | 4 | List, get, create, update defects |
Requirements | 3 | List, get, create requirements |
Attachments | 1 | Attach any file to any ALM entity |
Search & Discovery | 2 | Generic HPQL search, list domains/projects |
Total | 32 |
Available Tools
Tool | Description |
| Refresh or reconnect the ALM session |
| Create nested Test Plan folder path |
| Create nested Test Lab folder path |
| List test cases in a folder |
| Get full details of a test case |
| Find a test case ID by exact name |
| Create a test case with optional design steps |
| Update any field(s) on a test case |
| Create many test cases in one call |
| Get VC status (Checked_In / Checked_Out) |
| Check out a test case for editing |
| Check in a test case after editing |
| Add / replace design steps on a test case |
| Find a test set by name |
| Create a test set in a Test Lab folder |
| Pull a test from Test Plan into a test set |
| List all instances in a test set |
| Find a test instance by test case name |
| Get test configuration ID for a test case |
| Create a manual test run record |
| Update the pass/fail status of a run |
| Get all run steps for a run |
| Update status and actual result of a run step |
| Full end-to-end execution in one call |
| List defects with optional HPQL filter |
| Get full details of a defect |
| Create a new defect |
| Update any field(s) on a defect |
| List requirements with optional HPQL filter |
| Get full details of a requirement |
| Create a new requirement |
| Attach a local file to any ALM entity |
| Generic HPQL search across any entity collection |
| Discover all accessible domains and projects |
Prerequisites
Python 3.11+
An accessible HP ALM / Quality Center server (12.x, 15.x, 16.x tested)
Network access from the machine running this server to your ALM instance
Installation
Option A — Install directly from GitHub (recommended for users)
pip install git+https://github.com/UditMahaldar/alm-mcp.gitOption B — Clone and install locally (recommended for contributors)
git clone https://github.com/UditMahaldar/alm-mcp.git
cd alm-mcp
pip install -e ".[dev]"Configuration
All configuration is via environment variables or a .env file in the working directory.
# Copy the example and edit it
cp .env.example .envVariable | Required | Default | Description |
| ✅ | — | Base URL of your ALM server, e.g. |
| ✅ | — | ALM login username |
| ✅ | — | ALM login password |
| ✅ | — | ALM domain name |
| ✅ | — | ALM project name |
| ❌ |
| Seconds between API calls — increase if ALM throttles requests |
Security: Never commit your
.envfile. It is listed in.gitignoreby default.
Running the Server
Claude Desktop
Add this block to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"hp-alm": {
"command": "python",
"args": ["-m", "alm_mcp.server"],
"env": {
"ALM_BASE_URL": "https://your-alm-server.example.com/qcbin",
"ALM_USERNAME": "your_username",
"ALM_PASSWORD": "your_password",
"ALM_DOMAIN": "YOUR_DOMAIN",
"ALM_PROJECT": "YOUR_PROJECT"
}
}
}
}Restart Claude Desktop. You should see HP ALM MCP Server in the tools list.
VS Code / GitHub Copilot
Add this to your VS Code settings.json (or .vscode/mcp.json in the workspace):
{
"mcp": {
"servers": {
"hp-alm": {
"type": "stdio",
"command": "python",
"args": ["-m", "alm_mcp.server"],
"env": {
"ALM_BASE_URL": "https://your-alm-server.example.com/qcbin",
"ALM_USERNAME": "your_username",
"ALM_PASSWORD": "your_password",
"ALM_DOMAIN": "YOUR_DOMAIN",
"ALM_PROJECT": "YOUR_PROJECT"
}
}
}
}
}Alternatively, if you installed via pip and want to use the entry-point script:
{
"mcp": {
"servers": {
"hp-alm": {
"type": "stdio",
"command": "alm-mcp",
"env": { "..." : "..." }
}
}
}
}Standalone (stdio)
# With a .env file in the current directory
python -m alm_mcp.server
# Or with explicit env vars
ALM_BASE_URL=https://... ALM_USERNAME=user ALM_PASSWORD=pass \
ALM_DOMAIN=DEFAULT ALM_PROJECT=MyProject \
python -m alm_mcp.serverProject Structure
alm-mcp/
├── src/
│ └── alm_mcp/
│ ├── __init__.py # Package init
│ ├── config.py # pydantic-settings configuration
│ ├── alm_client.py # HP ALM REST API client
│ └── server.py # MCP tool definitions (FastMCP)
├── .env.example # Environment variable template
├── .gitignore
├── LICENSE
├── README.md
└── pyproject.tomlSecurity Notes
SSL verification is disabled (
verify=False) because many enterprise ALM deployments use self-signed certificates. This is intentional and matches standard practice for on-premise ALM.Credentials are never stored in code. They are loaded exclusively from environment variables or
.envfiles.XML injection prevention: all user-supplied values are escaped with
html.escape()before being inserted into ALM XML payloads.Path traversal prevention:
alm_attach_to_entityresolves and validatesfile_pathwithos.path.realpath()before opening the file.No secrets in error messages: authentication error messages do not include the HTTP response body, preventing credential leakage.
Contributing
Fork the repository and create a feature branch.
Install dev dependencies:
pip install -e ".[dev]"Make your changes.
Open a pull request with a clear description.
License
Available Tools
34 toolsalm_add_design_stepsA
Add design steps to a test case (test must already be checked out).
Args: test_id: ALM ID of the test case (must be in Checked_Out state). steps: List of steps, each a dict with "name", "description", "expected". Example: [{"name": "Step 1", "description": "Open browser", "expected": "Browser opens"}] delete_existing: If true, deletes all current steps before adding new ones.
Returns: {"test_id": "", "steps_added": , "delete_existing": true/false}
Inputs: test_id (required), steps (required), delete_existing.
alm_add_test_to_setA
Pull (add) a test case from Test Plan into a Test Lab test set.
This is the 'Move TC from Test Plan to Test Lab' operation in ALM.
Args: test_set_id: ID of the target test set. test_id: ID of the test case in Test Plan. status: Initial run status — 'No Run', 'Passed', 'Failed', 'Blocked'.
Returns: {"success": true/false, "test_instance_id": "", "test_set_id", "test_id"}
Inputs: test_set_id (required), test_id (required), status.
alm_attach_to_entityA
Upload a local file as an attachment to any ALM entity.
Supports screenshots, test reports, logs, and any other file type.
Args: entity_type: ALM collection name — one of: 'runs' → attach to a test run (reports, screenshots) 'run-steps' → attach a screenshot/evidence to a single run step (use the run-step ID from alm_get_run_steps) 'defects' → attach to a defect (screenshots, logs, evidence) 'tests' → attach to a test case 'test-sets' → attach to a test set 'requirements' → attach to a requirement entity_id: Numeric ALM ID of the entity. For 'run-steps', this is the run-step ID (not the run ID). file_path: Absolute path to the file on the machine running this server. Example: 'C:/reports/screenshot.png'
Returns: {"success": true, "entity_type", "entity_id", "file_path"}
Inputs: entity_type (required), entity_id (required), file_path (required).
alm_bulk_create_test_casesA
Create multiple test cases with design steps under a folder path in one call.
Creates any missing folders along the path automatically.
Args: folder_path: '/' separated path e.g. 'AppName/Sprint1/Smoke'. test_cases: List of test case dicts: [{"name": "TC-001", "steps": [{"name": "Step 1", "description": "Navigate to login", "expected": "Login page is shown"}]}]
Returns: {"folder_id": "", "created": [...], "failed": [...]}
Inputs: folder_path (required), test_cases (required).
alm_checkin_testA
Check in a test case after editing to save a new version in ALM.
Args: test_id: ALM ID of the test case.
Returns: {"test_id": "", "vc_status": ""}
Inputs: test_id (required).
alm_checkout_testA
Check out a test case so its fields and design steps can be edited.
Args: test_id: ALM ID of the test case.
Returns: {"test_id": "", "vc_status": ""}
Inputs: test_id (required).
alm_create_defectA
Create a new defect (bug) in the ALM project.
Args: name: Defect summary / title (required). severity: '1-Low', '2-Medium', '3-High', '4-Very High'. priority: '1-Low', '2-Medium', '3-High', '4-Very High'. description: Detailed description of the defect. extra_fields: Any additional ALM field names → values, e.g. {"owner": "jsmith", "status": "Open", "detected-in-rel": "2.1", "environment": "QA", "component": "Login"}.
Returns: {"success": true, "defect_id": "", "name": ""}
Inputs: name (required), severity, priority, description, +1 more.
alm_create_requirementA
Create a new requirement in the ALM project.
Args: name: Requirement name / title (required). req_type: Requirement type, e.g. 'Business', 'Functional', 'Testing', 'Undefined'. description: Detailed requirement description. extra_fields: Optional dict of additional ALM field names → values.
Returns: {"success": true, "req_id": "", "name": ""}
Inputs: name (required), req_type, description, extra_fields.
alm_create_test_caseA
Create a manual test case in a Test Plan folder, optionally with design steps.
Handles check-out/check-in automatically when steps are provided.
Args: folder_id: ID of the parent folder. test_name: Name for the new test case. steps: Optional list of design steps. Each step is a dict with keys: "name" (step number/title), "description", "expected".
Returns: {"test_id": "", "test_name": "", "folder_id": "", "steps_added": }
Inputs: folder_id (required), test_name (required), steps.
alm_create_test_runB
Create a manual test run record for an existing test instance.
Args: test_id: ALM ID of the test case. test_set_id: ALM ID of the test set (cycle). test_instance_id: ALM ID of the test instance inside the test set. test_name: Display name/label for this run. status: Initial status — 'Not Completed', 'Passed', 'Failed', 'Blocked'. peer_reviewer: Optional ALM username to set as peer reviewer (user-template-06 field).
Returns: {"success": true/false, "test_run_id": "", "test_name", "status"}
Inputs: test_id (required), test_set_id (required), test_instance_id (required), test_name (required), +2 more.
alm_create_test_setA
Create a new test set inside a Test Lab folder.
Args: parent_folder_id: ID of the test-set folder (use alm_ensure_test_lab_folder). test_set_name: Name for the new test set.
Returns: {"test_set_id": "", "test_set_name": "", "parent_folder_id": ""}
Inputs: parent_folder_id (required), test_set_name (required).
alm_ensure_test_lab_folderA
Ensure a Test Lab (test-set) folder path exists, creating any missing folders.
Args: folder_path: '/' separated path, e.g. 'Automation/Sprint1'.
Returns: {"folder_id": "", "folder_path": ""}
Inputs: folder_path (required).
alm_ensure_test_plan_folderA
Ensure a Test Plan folder path exists, creating any missing folders.
Args: folder_path: '/' separated path, e.g. 'AppName/Sprint1/Regression'.
Returns: {"folder_id": "", "folder_path": ""}
Inputs: folder_path (required).
alm_execute_testA
Full end-to-end test execution in a single call.
Finds the test instance → creates a run → updates run status → updates all run steps. This is the primary tool for recording automation results in ALM.
Args: test_set_id: ALM ID of the test set containing the test instance. test_id: ALM ID of the test case in Test Plan. test_name: Name matching the test instance in the test set. status: 'Passed' or 'Failed'. comments: Optional comment written to step actual-result field. peer_reviewer: Optional ALM username to set as peer reviewer (user-template-06).
Returns: {"success": true/false, "test_run_id", "status", "steps_updated": }
Inputs: test_set_id (required), test_id (required), test_name (required), status (required), +2 more.
alm_find_test_by_nameA
Look up a test case ID by its exact name.
Args: test_name: Exact name of the test case in ALM.
Returns: {"found": true/false, "test_id": "", "test_name": ""}
Inputs: test_name (required).
alm_find_test_instanceA
Find a test instance inside a test set by test case name (partial match supported).
Args: test_set_id: ID of the test set. test_case_name: Name of the test case (exact or partial match).
Returns: {"found": true/false, "test_instance_id": "", "test_case_name", "test_set_id"}
Inputs: test_set_id (required), test_case_name (required).
alm_find_test_setA
Find a test set in Test Lab by its exact name and return its ID.
Args: test_set_name: Exact name of the test set.
Returns: {"found": true/false, "test_set_id": "", "test_set_name": ""}
Inputs: test_set_name (required).
alm_get_defectA
Get the full details of a defect by its ID.
Args: defect_id: ALM numeric ID of the defect.
Returns: {"defect_id": "", "fields": {all ALM field names and values}}
Inputs: defect_id (required).
alm_get_requirementA
Get the full details of a requirement by ID.
Args: req_id: ALM numeric ID of the requirement.
Returns: {"req_id": "", "fields": {all ALM field names and values}}
Inputs: req_id (required).
alm_get_run_stepsA
Get all run steps for a test run, sorted by step order.
Returns step IDs and order numbers — use these to map evidence (screenshots) to the correct step before calling alm_update_run_step or alm_attach_to_entity.
Args: test_run_id: ALM ID of the run.
Returns: {"test_run_id": "", "run_steps": [{"id", "step_order", "name"}, ...], "count": }
Inputs: test_run_id (required).
alm_get_test_caseA
Get the full details of a test case by ID, including all ALM fields.
Args: test_id: ALM numeric ID of the test case.
Returns: {"test_id": "", "fields": {all ALM field names and values}}
Inputs: test_id (required).
alm_get_test_configA
Get the test configuration ID for a test case (required internally to create test runs).
Args: test_id: ALM ID of the test case.
Returns: {"found": true/false, "test_config_id": "", "test_id": ""}
Inputs: test_id (required).
alm_get_test_version_statusA
Get the version control status of a test case (Checked_In or Checked_Out).
Args: test_id: ALM ID of the test case.
Returns: {"test_id": "", "vc_status": "Checked_In" | "Checked_Out" | null}
Inputs: test_id (required).
alm_list_defectsA
List defects from the project with optional HPQL filter.
Args: query: HPQL filter string (without braces). Examples: "status[Open]" "status[Open];priority[4-Very High]" "owner[jsmith]" "name[login]" Leave empty to list all defects up to page_size. page_size: Maximum number of defects to return (default 100).
Returns: {"defects": [...], "count": }
Inputs: query, page_size.
alm_list_domains_projectsA
List all ALM domains and their projects accessible to the current user.
Use this to discover available domains and project names.
Returns: {"domains": [{"domain": "", "projects": ["", ...]}, ...]}
Inputs: no named parameters.
alm_list_requirementsA
List requirements from the project with optional HPQL filter.
Args: query: HPQL filter string, e.g. "status[Not Covered]", "priority[4-Very High]". Leave empty to list all requirements up to page_size. page_size: Maximum number of results (default 100).
Returns: {"requirements": [...], "count": }
Inputs: query, page_size.
alm_list_test_casesB
List all test cases inside a Test Plan folder.
Args: folder_id: ALM numeric ID of the test plan folder.
Returns: {"tests": [{"id", "name", "status", "owner"}, ...], "count": , "folder_id": ""}
Inputs: folder_id (required).
alm_list_test_instancesA
List all test instances (pulled tests) inside a test set.
Args: test_set_id: ID of the test set.
Returns: {"instances": [{"id", "name", "status"}, ...], "count": , "test_set_id": ""}
Inputs: test_set_id (required).
alm_refresh_sessionA
Refresh or reconnect the ALM session.
Use this if other tools start returning authentication or session errors. Tries a heartbeat first; reconnects fully if that fails.
Returns: {"refreshed": true, "reconnected": true/false}
Inputs: no named parameters.
alm_searchA
Generic HPQL search across any ALM entity collection.
Use this for advanced queries not covered by the specific tools above.
Args: entity_type: ALM entity collection — e.g. 'defects', 'tests', 'requirements', 'test-sets', 'test-instances', 'runs', 'test-folders'. query: HPQL filter string (without braces). Examples: "status[Open];severity[4-Very High]" "name[login]" "owner[jsmith];creation-time[> '2026-01-01']" "owner[u1197976];parent-id[2400]" ← filter tests by folder + owner Leave empty to return all entities up to page_size. NOTE: For 'tests', use 'parent-id' to filter by folder — there is no 'subject' field. Combining 'parent-id' with multiple OR values (e.g. parent-id[1|2|3]) may cause HTTP 500 on some ALM servers; query each folder separately in that case. fields: Comma-separated ALM field names to include in the response. Example: 'id,name,status,owner,creation-time' For 'tests': valid fields include id,name,status,owner,parent-id, creation-time,subtype-id,description. 'subject' is NOT a valid field. page_size: Maximum records to return (default 100).
Returns: {"entity_type", "results": [...], "count": }
Inputs: entity_type (required), query, fields, page_size.
alm_update_defectA
Update any field(s) on an existing defect.
Common fields: "status", "priority", "severity", "owner", "description", "closing-version", "fix-version", "environment", "component".
Args: defect_id: ALM ID of the defect to update. fields: Dict of ALM field names → new values. Example: {"status": "Fixed", "owner": "jsmith", "closing-version": "2.1"}
Returns: {"defect_id": "", "fields_updated": [...], "updated": true}
Inputs: defect_id (required), fields (required).
alm_update_run_statusA
Update the overall pass/fail status of a test run.
Args: test_run_id: ALM ID of the run. status: 'Passed', 'Failed', 'Not Completed', 'Blocked'.
Returns: {"test_run_id": "", "status": "", "updated": true}
Inputs: test_run_id (required), status (required).
alm_update_run_stepA
Update the status and actual-result comment for a single run step.
Args: test_run_id: ALM ID of the run. run_step_id: ALM ID of the run step (from alm_get_run_steps). status: 'Passed', 'Failed', 'Not Completed'. comments: Actual result / comments text to record against this step.
Returns: {"test_run_id", "run_step_id", "status", "updated": true}
Inputs: test_run_id (required), run_step_id (required), status (required), comments.
alm_update_test_caseA
Update any field(s) on an existing test case.
Common fields: "name", "status", "description", "owner", "priority", "subtype-id". The test case must be checked out — set auto_checkout=true to handle this automatically.
Args: test_id: ALM ID of the test case. fields: Dict of ALM field names → new values. Example: {"status": "Ready", "owner": "jsmith", "description": "Updated desc"}. auto_checkout: If true (default), checks out before and checks in after editing.
Returns: {"test_id", "fields_updated": [...], "vc_status": ""}
Inputs: test_id (required), fields (required), auto_checkout.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 34 tools
Most tools have distinct purposes (defects, requirements, test cases, runs, etc.), but some overlap exists between general search and specific lookups, and between single and bulk creation. Descriptions are clear enough to resolve most ambiguities.
All tools follow a consistent 'alm_verb_noun' pattern, e.g., 'alm_create_defect', 'alm_get_test_case'. No mixing of conventions, making the set predictable.
34 tools is on the high side for a typical MCP server. While ALM is complex and many operations are covered, the count feels slightly excessive, approaching the upper bound of what is reasonable.
Covers core CRUD for defects, test cases, runs, and requirements, but lacks delete operations entirely. Update is missing for requirements, and there is no tool to get full test set details. Several notable gaps exist.
Maintenance
Related MCP Connectors
Create and manage test cases, test runs and results in Testiny from your AI assistant.
Test management for AI agents: cases, runs, results, cycles and traceability.
Create, run and debug Leapwork Play tests and runlists, build knowledge bases, and use AI workflows.
- octoperfDeprecatedio.github.OctoPerf
Drive OctoPerf load testing from any AI agent: import, edit, validate, run scenarios, read metrics.
Related MCP Servers
FlicenseAqualityFmaintenanceEnables AI agents to run and create Squish test scripts and test suites and analyze the results.1913-- AlicenseAqualityDmaintenanceEnables AI agents to manage Autotest AI projects, screens, test cases, and test runs through natural language commands.10MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to interact with OpenText ALM Octane for querying, creating, and updating defects, stories, tests, and work items through natural language.21 npmMIT
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with the QA Touch test management API, including browsing projects, managing test cases, running tests, recording results, and filing defects.32MIT