MCP Integration
Connect Claude Code to TestOps via the Model Context Protocol. Developers get 8 tools for test generation, syncing, and work-item linking — no packages or repo access needed.
What is MCP?
The Model Context Protocol is an open standard that lets AI tools like Claude Code connect to external services. TestOps exposes a remote MCP server at /api/mcp — once connected, Claude Code can fetch work items, generate tests, sync results, and link coverage to backlog items using natural language.
Why MCP instead of npm packages?
- •No GitHub access needed — developers never clone the TestOps repo
- •No npm packages to install or keep updated
- •Tools auto-update when TestOps deploys — zero developer action
- •One command to connect, works across all projects
Setup
Get a TestOps API Token
Go to TestOps → Settings → CLI Tokens → Create Token. Copy the ttok_... value.
Add the server at user scope
Run this once — it works across all projects regardless of folder path:
claude mcp add --scope user --transport http testops \ https://app.testops.calimatic.com/api/mcp \ --header "Authorization: Bearer ttok_YOUR_TOKEN"
Use --scope user not project scope. This avoids path-capitalization issues on Windows and works in every repo without a .mcp.json file.
Restart your IDE
Fully quit and reopen VS Code (or your terminal). MCP connections are established at startup — a window reload is not enough.
Verify
Type /mcp in Claude Code. You should see testops listed with 15 tools and status Connected.
Alternative: Project-level .mcp.json
If you want every developer on a repo to auto-connect, add .mcp.json to the project root. Use x-api-key header with an env var, or pass the token as a query parameter:
// Option A: x-api-key header (recommended)
{
"mcpServers": {
"testops": {
"type": "http",
"url": "https://app.testops.calimatic.com/api/mcp",
"headers": {
"x-api-key": "${TESTOPS_TOKEN}"
}
}
}
}
// Option B: token in URL (no env var needed)
{
"mcpServers": {
"testops": {
"type": "http",
"url": "https://app.testops.calimatic.com/api/mcp?token=ttok_YOUR_TOKEN"
}
}
}Option A requires each developer to set TESTOPS_TOKEN as a system environment variable and restart VS Code. Option B embeds the token in the URL — simpler but the token is visible in the committed file. For shared team tokens this is acceptable; for personal tokens use Option A or --scope user.
Admin: Connect Calimatic Engineering
For the get_work_item_context tool to work, an admin must configure the Calimatic Apps integration on the project:
- 1.In Calimatic → Settings → Integrations → TestOps → generate a Work Items API key
- 2.In TestOps → Projects → Edit → Calimatic Apps Integration → paste the cali_sk_... key
- 3.Save — the token is encrypted at rest (AES-256-GCM)
Tool Reference
Fetch work item details (title, description, acceptance criteria) from Calimatic Engineering. Returns LLM-ready markdown for test generation.
Create or update manual test cases in TestOps. Upserts by externalId — idempotent and safe to call repeatedly.
Link TestOps entities (manual tests, test runs, scenarios, gap findings) to Calimatic work items. Skips duplicates automatically.
Get a rich summary of all test data linked to a work item — manual tests with execution status, automated runs with share URLs, scenarios, gaps, and overall coverage.
Search manual test cases by project and optional externalId prefix. Use this to find test UUIDs for linking to work items.
List recent test runs with optional correlationId filter. Use this to find run UUIDs after running Playwright tests.
Generate a shareable report URL for a test run. Anyone with the link can view results without logging in.
Create a new test run to push results into. Returns a launchId for subsequent result uploads via the ingest API.
Example Workflow
After connecting, just tell Claude Code what you need. For example:
Full test coverage for STORY-123 in project calimatic-edtech. 1. Fetch the work item context 2. Generate manual tests covering feature, security, and edge cases 3. Sync them to TestOps and link to STORY-123 4. Create Playwright API + UI tests 5. Run the tests and link results to STORY-123 6. Create a share link and print summary
Claude Code will automatically use the MCP tools: get_work_item_context → sync_manual_tests → link_work_items → create_share_link — no curl commands, no env vars for API calls.
Data Flow
Developer (Claude Code)
│
├── get_work_item_context("STORY-123")
│ └── TestOps ──► Calimatic Engineering API
│ └── Returns: title, description, criteria
│
├── sync_manual_tests([...generated tests])
│ └── TestOps DB: upsert manual_test_cases
│
├── link_work_items([{STORY-123 → test UUIDs}])
│ └── TestOps DB: insert work_item_links
│
├── create_test_launch("STORY-123")
│ └── TestOps DB: insert test_runs
│
├── Playwright runs locally → results via reporter
│ └── POST /api/v1/ingest/launches/{id}/results
│
└── create_share_link(runId)
└── Returns: https://app.testops.calimatic.com/share/abc123
│
▼
Calimatic Apps → STORY-123 → Testing tab
(shows manual tests, runs, coverage badge)Running Playwright Tests
MCP handles all TestOps API interactions. However, the Playwright reporter still needs env vars at runtime to stream results during test execution:
export TESTOPS_URL=https://app.testops.calimatic.com export TESTOPS_TOKEN=ttok_YOUR_TOKEN export TESTOPS_PROJECT=your-project-slug
These are only needed for the Playwright reporter plugin. All other TestOps interactions go through MCP with the token baked into the connection config.
Technical Details
Transport
Streamable HTTP
Endpoint
POST /api/mcp
Auth
Bearer ttok_...
Scope
Organization (via token)