TestKase Docs
Integrations

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:

  1. A TestKase accountsign up free if you don't have one.
  2. A Personal Access Token (PAT) — generate one from Settings → API Keys. See the API Keys guide for details.
  3. 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"
      }
    }
  }
}
  1. Open or create the config file at the path above.
  2. Paste the JSON block, replacing YOUR_PAT_TOKEN with your actual token.
  3. Save the file and restart Claude Desktop.
  4. 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"
      }
    }
  }
}
  1. Open or create the config file at the path above.
  2. Paste the JSON block, replacing YOUR_PAT_TOKEN with your actual token.
  3. 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-server

That'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"
      }
    }
  }
}
  1. Create the .cursor directory in your project root if it doesn't exist.
  2. Create mcp.json with the config above, replacing YOUR_PAT_TOKEN.
  3. 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:

ToolDescription
list_projectsList all accessible projects
get_project_structureGet folders, labels, members, and field options for a project
search_testcasesSearch test cases with filters, sorting, and pagination
get_testcaseGet full test case details including steps
manage_testcaseCreate, bulk create, update, or delete test cases
manage_folderCreate, rename, move, or delete folders (all sections)
search_test_cyclesSearch test cycles with execution progress
manage_test_cycleFull cycle lifecycle — CRUD, link/unlink/assign test cases
execute_testsRecord execution results (single or bulk)
manage_test_planFull plan lifecycle — CRUD, link/unlink cycles, view test cases
get_reportPull from 40+ report types

Reporting

The get_report tool covers execution, coverage, trends, team, defect, and AI-powered report types:

CategoryReport Types
Executionexecution_summary, execution_by_cycle, execution_by_tester, execution_by_priority, execution_by_environment, execution_by_folder, execution_by_automation
Coveragerequirement_coverage, traceability_matrix, failed_requirements, uncovered_requirements, testcase_coverage, unlinked_testcases
Trendsexecution_trend, execution_burnup, execution_burndown, test_creation, requirement_coverage_trend, execution_velocity
Comparisoncycle_comparison, created_vs_executed, scorecard_by_folder, scorecard_by_tester
Teamtester_workload, testcase_distribution, tester_effectiveness
Defectsdefects_by_cycle, defects_by_tester, defects_by_folder, defect_hotspots
AI Insightspredictive_failure, smart_prioritization, testcase_quality, stale_tests, flaky_tests, suite_optimization
Risk & Releaserelease_readiness, risk_heatmap_folder, risk_heatmap_feature, requirement_risk_matrix, cycle_health, project_health

Configuration

VariableRequiredDefaultDescription
TESTKASE_PAT_TOKENYesPersonal Access Token from Settings → API Keys
TESTKASE_API_BASE_URLNohttps://api.testkase.comAPI 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 sayWhat 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
  1. Restart completely — close and reopen your AI agent (Claude Desktop, VS Code, Cursor).
  2. Check JSON syntax — a missing comma or bracket in the config file will silently fail. Use a JSON validator.
  3. Verify npx works — run npx -y @testkase/mcp-server in your terminal to check for errors.
  4. 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
  1. Verify TESTKASE_API_BASE_URL is set to https://api.testkase.com (or your self-hosted URL).
  2. Check that the URL is reachable from your machine — try opening it in a browser.
  3. If you're behind a corporate proxy or VPN, ensure npx and 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.

Next Steps