Connect Your Editor to TestFlair
TestFlair has an MCP server (Model Context Protocol), so the AI assistant in your editor can work in TestFlair for you: create a project, generate user stories, test cases and scripts, run them, and file the bugs, against your real data and with your own permissions.
- Server address
https://mcp.testflair.ai/mcp(streamable HTTP) - Sign-in Your normal TestFlair account, in the browser. No API key
- Works with Claude Code, Cursor, VS Code, Claude Desktop and other clients that support remote MCP servers with OAuth
- Permissions Exactly yours. The assistant can see and change only what you can in the web app
- Costs Generation and AI bug analysis spend Flairs; everything else is free
What you can do
The tools follow the same flow as the web app:
- Pick a workspace
list_workspaces - Create a project
create_project - Generate user stories
generate_user_stories - Generate test cases
generate_test_cases - Generate scripts
generate_test_scripts - Run them
execute_test, or group them in a test run withcreate_test_runandexecute_test_run - File the bugs If something fails:
generate_bug_suggestions, thencreate_bugs
Around that flow you can search, read, correct and delete what's already there: projects, requirement documents, test data, user stories, test cases, scripts, test runs and bugs.
A first session can be one sentence: "Using TestFlair, create a project for our checkout flow against https://staging.example.com, generate user stories from this requirement, then test cases and a script for the happy path, and run it."
Connecting
Add the server to your editor. Don't add any headers, Authorization or API-key entry. If your editor asks for a transport type, choose http, not sse.
- Claude Code
- Cursor
- VS Code
- Claude Desktop
claude mcp add --transport http testflair https://mcp.testflair.ai/mcp
Add to .cursor/mcp.json in your project, or to your global Cursor MCP settings:
{
"mcpServers": {
"testflair": {
"type": "http",
"url": "https://mcp.testflair.ai/mcp"
}
}
}
Add to .vscode/mcp.json:
{
"servers": {
"testflair": {
"type": "http",
"url": "https://mcp.testflair.ai/mcp"
}
}
}
Add TestFlair as a custom connector and enter https://mcp.testflair.ai/mcp as its URL.
The first time your editor connects, your browser opens the TestFlair sign-in page. Sign in, and the tools appear in your editor. Start by asking your assistant to list your workspaces. See Signing In from Your Editor for how sessions and signing out work.
MCP clients and directories that support server discovery can find TestFlair on their own: the server describes itself at https://mcp.testflair.ai/mcp/server-card, and testflair.ai points to it.
Tool reference
Each tool has a readable title (for example Generate Test Cases) that your editor may show when it asks to run it. Editors also see what kind of tool it is:
| Kind | Tools | What your editor may do |
|---|---|---|
| Read-only | list_*, get_*, read_*, search_* | Run without asking |
| Changes data | create_*, update_*, save_project_context, upload_attachment | Ask before running, depending on your settings |
| Deletes or overwrites | delete_*, and updates that replace a whole field | Ask for confirmation |
| Generates or runs | generate_*, import_user_stories, execute_* | Takes minutes and may spend Flairs |
Tools marked (Flairs) below run AI and spend credits.
Workspaces & projects
| Tool | What it does |
|---|---|
list_workspaces | Lists your workspaces. Call it first: every other tool needs a workspace id, and an editor has no default workspace. |
list_projects | Lists projects in a workspace. Owners and Coordinators see all; others see projects they belong to, directly or through a team. |
get_project | Reads a project's settings: application URL, stored requirement text, generation language. |
get_project_stats | Counts and progress for one project: user stories, test cases, scripts and how execution is trending. Bug counts aren't included. |
create_project | Creates a project. name is 30 characters at most; also takes a description, the base_url of the application under test and, optionally, the requirement text. |
update_project | Corrects a project's settings, most often the base URL. Changing base_url also moves the test cases that still followed the old URL; regenerate their scripts afterwards. |
save_project_context | Adds or corrects the business-requirement text that generate_user_stories reads. |
Requirement documents
| Tool | What it does |
|---|---|
list_attachments | Lists the documents attached to a project, with their ids. |
upload_attachment | Attaches a document as text. Name it .txt or .csv: text isn't extracted from .md files. Upload PDFs and Word files in the web app. |
read_attachment | Reads the text TestFlair extracted from a document, including PDFs and Word files uploaded in the web app. |
delete_attachment | Permanently deletes one document. Stories already generated from it are kept. |
Test data
| Tool | What it does |
|---|---|
list_test_data | Lists the project's test data. Passwords are masked. |
create_test_data | Adds test data, so generation uses real values. Add it before generating test cases. |
update_test_data | Changes one entry and every existing test case step that uses it. |
delete_test_data | Deletes one entry and removes it from existing test case steps. |
User stories
| Tool | What it does |
|---|---|
generate_user_stories (Flairs) | Generates stories from the project's requirement text or from text you pass. Waits and reports progress for up to 20 minutes. |
import_user_stories (Flairs) | Reads user stories out of an attached document as written. Use it only for documents that already contain stories. |
list_user_stories | Lists the stories in a project, with an optional text filter. |
search_user_stories | Finds a story by code or title, for example "US-4" or "checkout". |
get_user_story | Reads one story in full, including acceptance criteria. |
create_user_story | Writes one story by hand. |
update_user_story | Corrects a story in place. |
delete_user_story | Deletes one story. Its test cases are kept. |
Test cases
| Tool | What it does |
|---|---|
generate_test_cases (Flairs) | Generates test cases for one user story. Call it once per story. If the story already has cases, they're returned and nothing is spent unless you ask to regenerate. |
list_test_cases | Lists a project's test cases with totals; filter by story, cases without a script, failed cases and more. |
search_test_cases | Finds a test case by code or name. |
get_test_case | Reads one test case with its ordered steps. |
create_test_case | Writes one test case by hand. Only the name is required. |
update_test_case | Corrects a test case. Sending steps replaces all steps, so send the full list. |
delete_test_case | Deletes one test case with its steps and script. Linked bugs and the user story are kept. |
Scripts
| Tool | What it does |
|---|---|
generate_test_scripts (Flairs) | Generates Java automation scripts for one or more test cases. The engine (selenium or playwright) is optional: TestFlair matches the test case's preconditions, otherwise uses Playwright. Waits for up to 20 minutes. |
get_test_script | Reads a script and its status. Takes the test case id and returns the test script id. |
update_test_script | Edits a script's code, for example to fix one selector without regenerating. Takes the test script id. |
delete_test_script | Deletes a test case's script and all its executions, keeping the test case. Takes the test case id. |
Execution
| Tool | What it does |
|---|---|
list_execution_preferences | Lists the project's execution profiles: window size, timeouts, cache and cookie clearing, video recording. |
create_execution_preference | Creates a new profile. It can't edit or delete profiles or change the default; do that in the web app. |
execute_test | Runs one script against your application and reports the result with a video of the browser. Waits for up to 15 minutes. |
get_execution | Reads an earlier result without running again, or gets a fresh video link. |
Test runs
A test run executes many test cases together and keeps the results.
| Tool | What it does |
|---|---|
list_test_runs | Lists a project's test runs with status and latest counts. |
get_test_run | Reads one run: settings, progress and a results breakdown. Can wait up to two minutes for a running run to finish. |
list_test_run_cases | Lists the cases in a run with each result, and why a case is Blocked. |
create_test_run | Creates a run with an engine (Selenium or Playwright), an optional execution profile and environment label. Nothing runs yet. |
update_test_run | Renames a run, changes settings, or adds and removes cases; cases you don't mention stay. |
delete_test_run | Deletes one run. Its test cases, scripts and bugs are kept. A running run can't be deleted. |
execute_test_run | Starts a run, or reruns every case of a finished run as a new session. Returns as soon as it's queued. |
execute_test_run_case | Retries one finished case in a run without rerunning the rest. |
Bugs
| Tool | What it does |
|---|---|
generate_bug_suggestions (Flairs) | Analyses a failed run and proposes bugs with reproduction steps and evidence. Files nothing. An earlier analysis is returned free. |
create_bugs | Files several bugs at once, normally the suggestions you kept. |
create_bug | Files one bug by hand. |
list_bugs | Lists a project's bugs, paged and searchable. |
search_bugs | Finds a bug by code or title. |
get_bug | Reads one bug in full. |
get_bugs_for_test_case | Lists the bugs linked to one test case. |
update_bug | Changes a bug, most often its status. |
delete_bug | Deletes one bug and its attachments. To retire a bug but keep its history, close it instead. |
list_environments | Lists the platform and browser combinations a bug can be recorded against. |
Things worth knowing
Start with list_workspaces. It's the only way to get a valid workspace id.
Script id or test case id? get_test_script and delete_test_script take the test case id. execute_test and update_test_script take the test script id that get_test_script returns. This is the most common mistake.
Use only execution profile ids TestFlair gave you. Take them from list_execution_preferences or create_execution_preference. An unknown id doesn't fail; the test quietly runs under the project's default profile.
Your application must be reachable from the internet. Tests run in TestFlair's cloud, so localhost and private addresses won't work. Use a tunnel; see Testing Local Applications.
Generation takes minutes. Your assistant will appear to wait; it isn't stuck. If the wait is cut short, the work carries on, and the reply says which tool picks it up.
Deletes can't be undone. Your editor should ask before running a delete_* tool. Ask your assistant to show you the item before you confirm.
Edits can't clear a field. update_user_story and update_test_case skip blank values.
Updating a bug can unassign it. update_bug clears the assignee whenever the call doesn't include it, and sending test_case_ids replaces all linked test cases.
Starting a test run doesn't wait for it. Ask your assistant to check on it later, or open it in the web app, where it updates live.
"Completed" doesn't mean "passed". A run is COMPLETED once every case has finished. Read the pass and fail counts.
Every case needs a script for the run's engine. Cases with no script, a script still generating, or a script for the other engine are Blocked and skipped.
Video links expire after one hour. Call get_execution for a fresh one.
Troubleshooting
I'm asked to sign in again, or the tools stopped working.
- Your TestFlair session ended. Complete the browser sign-in again; see Staying Signed In.
"Not permitted"
- Your own TestFlair permissions don't allow it. Retrying won't help. Ask your workspace admin for access; see Roles & Permissions.
"Out of Flair credits"
- Your balance is spent. Nothing will generate until it's topped up or your plan renews. See Billing.
"Not found"
- TestFlair doesn't distinguish doesn't exist from you can't see it. Make sure the id came from a list call made with the same account.
"Already in progress"
- Only one generation runs at a time per project or story. Wait for the first one to finish.
"Too many executions in flight"
- Executions are capped per workspace and per user, so a teammate's run or CI may be holding the slots. Retry shortly.
"The generated script does not compile"
- The run never started. The reply lists the compiler errors with file names and line numbers. Ask your assistant to fix the script, or regenerate it.
"This test run is already running"
- It wasn't started again. Wait for it to complete, then start it.
Every case in my test run was skipped.
- They're all Blocked, most often because the scripts were generated for the other engine. See Why a case is Blocked.
Next steps
- Signing In from Your Editor Sessions, security and switching accounts
- Create Your First Project The same flow in the web app
- Test Execution Execution preferences, tunnels and live browser viewing
- Test Runs Runs, sessions and Blocked cases in detail