TestKase
TestKase
|Docs
Test ManagementAI & Advanced

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 Test Management MCP Server (@testkase/test-management-mcp, formerly @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

42 report types

Execution, coverage, trends, advanced insights, and more

Prerequisites

Before setting up the MCP server, make sure you have:

  1. A TestKase account — sign 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.

Keep TESTKASE_API_BASE_URL in your config. From version 2.3.0 the server defaults to production (https://api.testkase.com), but versions before 2.3.0 fell back to an internal test endpoint when the variable was missing. Every config block on this page sets it; keep it there.

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/test-management-mcp"],
      "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/test-management-mcp"],
      "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/test-management-mcp

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/test-management-mcp"],
      "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 by text, folder, filters, sorting, and pagination
get_testcaseGet full test case details including steps
manage_testcaseCreate, bulk create, update, or delete test cases; add, edit, delete, or reorder test steps
manage_folderCreate, rename, move, or delete folders (all sections)
search_test_cyclesSearch test cycles by text, folder, or status, with execution progress
manage_test_cycleFull cycle lifecycle — CRUD, link/unlink/assign test cases
execute_testsRecord execution results — as a tester would (default) or as a CI/automation run
manage_test_planFull plan lifecycle — CRUD, link/unlink cycles, view test cases
get_reportPull from 42 report types, including five that have no card in the Reports tab

Field values are project-specific

Priority, status and the other dropdown fields are configured per project, so a value that works in one project is rejected in another. get_project_structure is the discovery call: ask it for field_options and it returns the values that project actually accepts, along with folder IDs, labels and members. The tool descriptions tell the agent to call it before creating or updating anything, and when a write fails on an invalid value the server returns a hint pointing back at it.

If your agent reports "Invalid priority value" or "folder_id must be a number", the fix is almost always to look up the real value rather than to guess a different one. Field options are cached for five minutes, so a change you make in Project Settings can take that long to be visible to the agent. Letter case doesn't matter: critical is accepted for Critical.

Small replies, fewer tokens

From version 2.5.0 the server keeps your AI assistant's context small:

  • Lists return the fields an agent works with (ID, title, priority, status), plus one link pattern such as …/testcases/{id} instead of a full link on every row.
  • Empty values and wrapper fields are left out.
  • Add verbose: true to any read call when you need the full API response.

Compared with 2.4.1, the tool descriptions an assistant loads are about half the size, and replies are about two thirds smaller.

Works with smaller models

The tools are built so that smaller, cheaper models get them right too:

  • Test steps, bulk test cases and results go in as plain JSON lists.
  • Common spellings are understood: Passed, FAILED, not run, In Progress.
  • When a call is wrong, the error says what to send, with an example.
  • In a bulk create, a folder or priority given once applies to every test case.

Reporting

The get_report tool covers execution, coverage, trends, team, defect, and insight report types. Five of the 42 -- marked below -- have no card in the Reports tab, so the MCP server and the REST API are the only ways to read them:

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 ✱
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 ✱

✱ API-only — no card in the Reports tab, and not counted in the 37 reports the UI lists. See Reports Available Only Through the API for what each one returns.

Every call takes projectId and report_type. Most report types also accept one test_cycle_id, one test_plan_id, a folder_id, and startDate and endDate (YYYY-MM-DD, both days included); the time-series types accept granularity of day, week (the default) or month, and cycle_comparison takes cycle_ids. You do not need to remember any of that -- ask for a report the way you would ask a colleague ("show me the project health score for PRJ-1001") and the agent fills in the arguments. An unrecognised report_type comes back with the full list of valid types.

Configuration

VariableRequiredDefaultDescription
TESTKASE_PAT_TOKENYes—Personal Access Token from Settings → API Keys
TESTKASE_API_BASE_URLRecommendedhttps://api.testkase.com (2.3.0 and later)Your TestKase API endpoint. Set it explicitly — older versions did not default to production.
TESTKASE_ORGANIZATION_IDNoYour first organizationSet this if your account belongs to more than one organization and the project you want is not in the first one.
TESTKASE_APP_URLNohttps://test-management.testkase.comBase for the links the tools return next to test cases, cycles, and plans.
TESTKASE_TIMEOUT_MSNo60000How long to wait for TestKase before giving up. Raise it for very large reports. Reads are retried once if the connection drops; changes are never retried.

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 in the Checkout folder"Calls search_testcases with a folder and a priority filter
"Create a regression test cycle and add the test cases from the Smoke folder"Calls search_testcases to find them, then manage_test_cycle to create the cycle and link them
"Move step 3 of TEST-12 to the top"Calls get_testcase for the step IDs, then manage_testcase with reorder_steps

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. TestKase PATs start with the xyz_ prefix. 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/test-management-mcp 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 present in your config and set to https://api.testkase.com (or your self-hosted URL). Versions before 2.3.0 did not fall back to production when it was missing.
  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.

▶I get 403 errors
  1. Your role does not allow it. The token can do exactly what your account can do in the app. For example, only owners and project admins can delete folders.
  2. The project is in another organization. If your account belongs to more than one organization, set TESTKASE_ORGANIZATION_ID to the organization that owns the project.
▶What does deleting a folder remove?

Deleting a folder permanently removes its sub-folders and every test case, test cycle, or test plan inside them. The agent is told to confirm with you first, but check before you approve it.