MCP Server
Connect AI agents like Claude, GitHub Copilot, and Cursor to TestKase via the Model Context Protocol.
Overview
The Model Context Protocol (MCP) is an open standard that lets AI agents interact with external tools and services.
The TestKase MCP Server (@testkase/mcp-server) connects any MCP-compatible AI agent to your TestKase workspace — giving it full access to create test cases, run cycles, pull reports, and manage your entire test lifecycle through natural language.
Supported AI agents:
- Claude Desktop — Anthropic's desktop app
- GitHub Copilot — VS Code agent mode
- Claude Code — Anthropic's CLI agent
- Cursor — AI-powered code editor
11 built-in tools
Full test lifecycle — create, search, execute, report
Natural language
Tell your agent what to do in plain English
Any MCP client
Works with Claude, Copilot, Cursor, and more
PAT authentication
Secure access using your Personal Access Token
Structured responses
Clean JSON output for every tool call
40+ report types
Execution, coverage, trends, AI insights, and more
Prerequisites
Before setting up the MCP server, make sure you have:
- A TestKase account — sign up free if you don't have one.
- A Personal Access Token (PAT) — generate one from Settings → API Keys. See the API Keys guide for details.
- An MCP-compatible AI agent — Claude Desktop, GitHub Copilot (VS Code), Claude Code, or Cursor.
Installation & Setup
The MCP server runs via npx — no global install needed. Configure your AI agent with the JSON config below.
Claude Desktop
Add to your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"testkase": {
"command": "npx",
"args": ["-y", "@testkase/mcp-server"],
"env": {
"TESTKASE_API_BASE_URL": "https://api.testkase.com",
"TESTKASE_PAT_TOKEN": "YOUR_PAT_TOKEN"
}
}
}
}- Open or create the config file at the path above.
- Paste the JSON block, replacing
YOUR_PAT_TOKENwith your actual token. - Save the file and restart Claude Desktop.
- Look for the hammer icon (🔨) in the chat — it shows available MCP tools.
GitHub Copilot (VS Code)
Add to your Copilot MCP config file:
- Windows:
%APPDATA%\Code\User\globalStorage\github.copilot\mcp.json - macOS:
~/Library/Application Support/Code/User/globalStorage/github.copilot/mcp.json
{
"mcpServers": {
"testkase": {
"command": "npx",
"args": ["-y", "@testkase/mcp-server"],
"env": {
"TESTKASE_API_BASE_URL": "https://api.testkase.com",
"TESTKASE_PAT_TOKEN": "YOUR_PAT_TOKEN"
}
}
}
}- Open or create the config file at the path above.
- Paste the JSON block, replacing
YOUR_PAT_TOKENwith your actual token. - Restart VS Code or reload the Copilot extension.
Claude Code (CLI)
Run this single command to register the MCP server:
claude mcp add testkase \
-e TESTKASE_API_BASE_URL=https://api.testkase.com \
-e TESTKASE_PAT_TOKEN=YOUR_PAT_TOKEN \
-- npx -y @testkase/mcp-serverThat's it — restart Claude Code and the tools are available immediately.
Cursor
Add to .cursor/mcp.json in your project root:
{
"mcpServers": {
"testkase": {
"command": "npx",
"args": ["-y", "@testkase/mcp-server"],
"env": {
"TESTKASE_API_BASE_URL": "https://api.testkase.com",
"TESTKASE_PAT_TOKEN": "YOUR_PAT_TOKEN"
}
}
}
}- Create the
.cursordirectory in your project root if it doesn't exist. - Create
mcp.jsonwith the config above, replacingYOUR_PAT_TOKEN. - Restart Cursor to pick up the new MCP server.
Never commit your PAT token to version control. Use environment variables or a .gitignore'd config file
to keep your token secure. See Security Best Practices.
Available Tools
The MCP server exposes 11 tools covering the full test management lifecycle:
| Tool | Description |
|---|---|
list_projects | List all accessible projects |
get_project_structure | Get folders, labels, members, and field options for a project |
search_testcases | Search test cases with filters, sorting, and pagination |
get_testcase | Get full test case details including steps |
manage_testcase | Create, bulk create, update, or delete test cases |
manage_folder | Create, rename, move, or delete folders (all sections) |
search_test_cycles | Search test cycles with execution progress |
manage_test_cycle | Full cycle lifecycle — CRUD, link/unlink/assign test cases |
execute_tests | Record execution results (single or bulk) |
manage_test_plan | Full plan lifecycle — CRUD, link/unlink cycles, view test cases |
get_report | Pull from 40+ report types |
Reporting
The get_report tool covers execution, coverage, trends, team, defect, and AI-powered report types:
| Category | Report Types |
|---|---|
| Execution | execution_summary, execution_by_cycle, execution_by_tester, execution_by_priority, execution_by_environment, execution_by_folder, execution_by_automation |
| Coverage | requirement_coverage, traceability_matrix, failed_requirements, uncovered_requirements, testcase_coverage, unlinked_testcases |
| Trends | execution_trend, execution_burnup, execution_burndown, test_creation, requirement_coverage_trend, execution_velocity |
| Comparison | cycle_comparison, created_vs_executed, scorecard_by_folder, scorecard_by_tester |
| Team | tester_workload, testcase_distribution, tester_effectiveness |
| Defects | defects_by_cycle, defects_by_tester, defects_by_folder, defect_hotspots |
| AI Insights | predictive_failure, smart_prioritization, testcase_quality, stale_tests, flaky_tests, suite_optimization |
| Risk & Release | release_readiness, risk_heatmap_folder, risk_heatmap_feature, requirement_risk_matrix, cycle_health, project_health |
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
TESTKASE_PAT_TOKEN | Yes | — | Personal Access Token from Settings → API Keys |
TESTKASE_API_BASE_URL | No | https://api.testkase.com | API endpoint (only change for self-hosted instances) |
Example Conversations
Here are some things you can say to your AI agent once the MCP server is connected:
| What you say | What happens |
|---|---|
| "List my projects" | Calls list_projects and shows all your TestKase projects |
| "Create a login test case in PRJ-1001 with steps for valid credentials, invalid password, and account lockout" | Calls manage_testcase to create a test case with three detailed steps |
| "Run TEST-1 as pass in cycle TCYCLE-5" | Calls execute_tests to record a pass result |
| "Show me the execution summary for PRJ-1001" | Calls get_report with execution_summary type |
| "Find all high-priority test cases that failed in the last cycle" | Calls search_testcases with priority and status filters |
| "Create a regression test cycle and add all smoke test cases to it" | Calls manage_test_cycle to create the cycle and link test cases |
You don't need to memorize tool names or parameters. Just describe what you want in natural language and the AI agent will figure out which tools to call and how.
Troubleshooting
▶I see 'Authentication required' or 401 errors
Check that your TESTKASE_PAT_TOKEN is correct and hasn't expired. You can verify by generating a new token from Settings → API Keys in TestKase. Make sure the token is pasted without any extra spaces or line breaks in your config file.
▶The TestKase tools don't show up in my agent
- Restart completely — close and reopen your AI agent (Claude Desktop, VS Code, Cursor).
- Check JSON syntax — a missing comma or bracket in the config file will silently fail. Use a JSON validator.
- Verify npx works — run
npx -y @testkase/mcp-serverin your terminal to check for errors. - Check the config path — make sure you're editing the correct file for your platform (Windows vs macOS paths differ).
▶API connection errors or timeouts
- Verify
TESTKASE_API_BASE_URLis set tohttps://api.testkase.com(or your self-hosted URL). - Check that the URL is reachable from your machine — try opening it in a browser.
- If you're behind a corporate proxy or VPN, ensure
npxand outbound HTTPS are allowed.
▶Tools work but return empty results
Your PAT inherits the permissions of the user account that created it. If you see empty results, verify that your account has access to the project you're querying. See Token Scoping & Permissions for details.