Agents
Connect an MCP-capable agent (Cursor, Claude Desktop, and others) so it can write test cases and record results in your TestBeaver projects.
1. Create a token
- Open Account while signed in
- Create an API token and copy the secret once (it starts with
cr_)
Tokens are personal. Access is limited to projects you’re a member of.
2. Add the MCP server
Paste this into your client’s MCP settings (Cursor, Claude Desktop, etc.). Replace the token if you didn’t copy a filled config from Account:
{
"mcpServers": {
"testbeaver": {
"command": "npx",
"args": ["-y", "@testbeaver/mcp"],
"env": {
"TESTBEAVER_API_TOKEN": "cr_YOUR_TOKEN"
}
}
}
}Restart the client after saving. The first run uses npx to download @testbeaver/mcp from npm (package page).
3. Ask the agent to write test cases
Try a prompt like:
Create a few smoke test cases for login in my TestBeaver project: title, steps, and expected result for each.
Then refresh your project in TestBeaver. New test cases should appear under Test cases.
What the agent can do
list_projects/list_casescreate_case/update_casestart_run/list_run_resultsrecord_result/run_summary— on fail/blocked preferfailedStep,observed,evidenceUrls
Troubleshooting
- Tools don’t appear: Confirm the MCP config was saved, then fully restart the client. Check that Node 18+ is available for
npx. - Auth / token errors: Create a new token under Account and update
TESTBEAVER_API_TOKEN. Tokens are shown only once at creation. - No projects: Create a project in TestBeaver first, or make sure you were invited to one.
- Cases don’t show up: Refresh the project page. Confirm the agent used the correct project (ask it to
list_projects).
Without MCP
Any agent that can call HTTP can use the API with Authorization: Bearer cr_…. See the API docs.