Automation

AI agents (MCP)

Let Claude Code, Cursor, VS Code Copilot or Claude Desktop send and set up requests, run collections and performance tests, and read the reports — asking you before anything that changes data, with your secrets kept hidden.

APITestCenter speaks MCP (Model Context Protocol), the standard way AI coding agents use tools. Connect it once, and you can ask your agent things like:

  • "Send the Orders/List request against UAT and tell me why it fails."
  • "Run the Checkout collection and fix the first test that fails."
  • "Load-test the search endpoint on my local server with 20 users for a minute — is p95 under 300 ms?"
  • "Compare the last two performance tests of the login request. Did it get slower?"
  • "Start the mock server for the Orders API so I can build the frontend."
  • "Make a request for POST /orders with a JSON body, Bearer sign-in from {{token}}, and checks for 201 and an id. Save it in Orders API."
  • "Run a stress test of the search request: up to 50 users over 2 minutes, then hold for a minute."

The agent works with the same saved requests, environments, checks and scripts as the app, and can set them up too: what it saves shows in the app straight away.

Connect your agent

The agent starts APITestCenter itself with npx apitestcenter mcp (or atc mcp if you have the desktop app or a global install). Pick yours:

Claude Code — in a terminal:

claude mcp add apitestcenter -- npx -y apitestcenter mcp

Cursor — .cursor/mcp.json in your project (or ~/.cursor/mcp.json for all projects):

{
  "mcpServers": {
    "apitestcenter": { "command": "npx", "args": ["-y", "apitestcenter", "mcp"] }
  }
}

VS Code (Copilot agent mode) — .vscode/mcp.json:

{
  "servers": {
    "apitestcenter": { "type": "stdio", "command": "npx", "args": ["-y", "apitestcenter", "mcp"] }
  }
}

Claude Desktop — Settings → Developer → Edit config, then add the same mcpServers entry as for Cursor.

It works on the app's usual data folder. For tests kept in a repository, add --data api-tests (in the args list: "mcp", "--data", "api-tests").

What the agent can do

ToolWhat it does
list_requestsLists saved requests (as Collection/Name), collections, and environments with their variable names.
send_requestSends a request once: a saved one, with its folder's sign-in, scripts and checks; one the agent describes (method, URL, params, headers, body, sign-in, checks); or a saved one with some of that changed for this call. Returns the status, time, headers, the body (first 20 KB), check results and the request as sent.
get_requestEverything a saved request is set up with, secrets left out.
save_requestSaves a new request, or changes, renames or moves one. Earlier versions stay in Version history, so a change can be undone.
set_folder_authThe sign-in (Bearer, Basic, Digest, NTLM, API key, OAuth 2.0 client credentials or password) and headers every request in a folder uses.
save_environmentMakes or changes an environment's variables, secret ones too.
run_collectionRuns a collection or folder in its saved order, passing saved values along. Returns which requests passed or failed, and why.
run_load_testA performance test of a saved or described request — a type (smoke, load, stress, spike, soak, breakpoint), changed as needed: users or requests per second, duration, ramp up and down, a custom shape of stages, think time, and p95 and error targets. Returns the verdict, percentiles, error rate, status codes and checks. Saved to History, marked Run by an AI agent (MCP).
load_test_resultThe result of a long performance test (one that ran past 100 s), or of any run in History.
list_runsThe latest performance tests in History, to compare runs or spot a regression.
list_api_descriptionsThe API descriptions you added, how many of their operations have a request, and the folders that check against each.
api_description_coverageOne description's operations with their saved requests, the ones with none, and saved requests that aren't in it — for the whole workspace or one folder.
add_missing_requestsMakes a request for each operation that has none, in the folder you name, and has that folder check against the description. Requests already there stay.
start_mock, stop_mockThe mock server for a collection.

The agent can add and change requests, folder sign-in and environments, but it can't delete anything, and it can't touch History.

Kept safe

  • You say yes before anything changes data. GET, HEAD and OPTIONS requests are sent straight away. A POST, PUT, PATCH or DELETE — on its own, in a collection run, as the request a request sends first, or in a performance test — waits for you: the app asks you in your agent's window (An AI agent wants to send POST …/orders. Allow it?), and nothing is sent on a no. The question comes from the app, not from the agent, so the agent can't answer it for you. Claude Code (2.1.76 or later) and VS Code can show it; other agents may not yet. With an agent that can't, such requests aren't sent; to let it send them without asking, add --allow-changes when you connect (npx -y apitestcenter mcp --allow-changes).
  • Secrets stay hidden. Secret environment variables show only their names; Authorization, cookies and API keys show as <hidden>; values saved from answers (often tokens) show only their names. The agent does see response bodies — that's what it's there to read — so don't point it at data it shouldn't see.
  • Performance tests only go where you allow. By default only to this computer (localhost, 127.0.0.1). To let the agent load-test a test server, add it when you connect: npx -y apitestcenter mcp --allow-load api-uat.example.com (several: separated by commas). A performance test to any other host is refused, and the agent is told how you could allow it. Sending single requests isn't limited.
  • Secrets saved in the desktop app are encrypted for the app only, so the command line — and the agent — can't use them. Give the agent what it needs through {{variables}}: it can pass values (like a test token you give it) with each call. A secret the agent saves (a secret variable, or a token typed into a request) is kept only while that agent session runs; for good, enter it in the app. The agent can't change a request or folder whose secret only the app can read, since that would lose the secret: it's told to leave it to you.

Good to know

  • The agent's performance tests use your computer, like the app's. A long test (past 100 s) keeps running; the agent fetches the result with load_test_result.
  • The agent sees only what the tools return. To check what it ran, open History in the app.
  • New to this? The words in the answers — p95, error rate, requests per second — are explained in Reading the report.

Something unclear or missing? Write to support@apitestcenter.com — the guide improves with every question.