Skip to main content

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
YouYou ask in plain words
Your toolsYour editor's AI assistant
tool calls
TestFlair MCP server
as you
Your TestFlair workspace
The assistant picks the tools; TestFlair checks every call against your own permissions.

What you can do​

The tools follow the same flow as the web app:

  1. Pick a workspace list_workspaces
  2. Create a project create_project
  3. Generate user stories generate_user_stories
  4. Generate test cases generate_test_cases
  5. Generate scripts generate_test_scripts
  6. Run them execute_test, or group them in a test run with create_test_run and execute_test_run
  7. File the bugs If something fails: generate_bug_suggestions, then create_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 mcp add --transport http testflair https://mcp.testflair.ai/mcp

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.

Discovery

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:

KindToolsWhat your editor may do
Read-onlylist_*, get_*, read_*, search_*Run without asking
Changes datacreate_*, update_*, save_project_context, upload_attachmentAsk before running, depending on your settings
Deletes or overwritesdelete_*, and updates that replace a whole fieldAsk for confirmation
Generates or runsgenerate_*, import_user_stories, execute_*Takes minutes and may spend Flairs

Tools marked (Flairs) below run AI and spend credits.

Workspaces & projects​

ToolWhat it does
list_workspacesLists your workspaces. Call it first: every other tool needs a workspace id, and an editor has no default workspace.
list_projectsLists projects in a workspace. Owners and Coordinators see all; others see projects they belong to, directly or through a team.
get_projectReads a project's settings: application URL, stored requirement text, generation language.
get_project_statsCounts and progress for one project: user stories, test cases, scripts and how execution is trending. Bug counts aren't included.
create_projectCreates 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_projectCorrects 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_contextAdds or corrects the business-requirement text that generate_user_stories reads.

Requirement documents​

ToolWhat it does
list_attachmentsLists the documents attached to a project, with their ids.
upload_attachmentAttaches 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_attachmentReads the text TestFlair extracted from a document, including PDFs and Word files uploaded in the web app.
delete_attachmentPermanently deletes one document. Stories already generated from it are kept.

Test data​

ToolWhat it does
list_test_dataLists the project's test data. Passwords are masked.
create_test_dataAdds test data, so generation uses real values. Add it before generating test cases.
update_test_dataChanges one entry and every existing test case step that uses it.
delete_test_dataDeletes one entry and removes it from existing test case steps.

User stories​

ToolWhat 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_storiesLists the stories in a project, with an optional text filter.
search_user_storiesFinds a story by code or title, for example "US-4" or "checkout".
get_user_storyReads one story in full, including acceptance criteria.
create_user_storyWrites one story by hand.
update_user_storyCorrects a story in place.
delete_user_storyDeletes one story. Its test cases are kept.

Test cases​

ToolWhat 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_casesLists a project's test cases with totals; filter by story, cases without a script, failed cases and more.
search_test_casesFinds a test case by code or name.
get_test_caseReads one test case with its ordered steps.
create_test_caseWrites one test case by hand. Only the name is required.
update_test_caseCorrects a test case. Sending steps replaces all steps, so send the full list.
delete_test_caseDeletes one test case with its steps and script. Linked bugs and the user story are kept.

Scripts​

ToolWhat 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_scriptReads a script and its status. Takes the test case id and returns the test script id.
update_test_scriptEdits a script's code, for example to fix one selector without regenerating. Takes the test script id.
delete_test_scriptDeletes a test case's script and all its executions, keeping the test case. Takes the test case id.

Execution​

ToolWhat it does
list_execution_preferencesLists the project's execution profiles: window size, timeouts, cache and cookie clearing, video recording.
create_execution_preferenceCreates a new profile. It can't edit or delete profiles or change the default; do that in the web app.
execute_testRuns one script against your application and reports the result with a video of the browser. Waits for up to 15 minutes.
get_executionReads 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.

ToolWhat it does
list_test_runsLists a project's test runs with status and latest counts.
get_test_runReads one run: settings, progress and a results breakdown. Can wait up to two minutes for a running run to finish.
list_test_run_casesLists the cases in a run with each result, and why a case is Blocked.
create_test_runCreates a run with an engine (Selenium or Playwright), an optional execution profile and environment label. Nothing runs yet.
update_test_runRenames a run, changes settings, or adds and removes cases; cases you don't mention stay.
delete_test_runDeletes one run. Its test cases, scripts and bugs are kept. A running run can't be deleted.
execute_test_runStarts a run, or reruns every case of a finished run as a new session. Returns as soon as it's queued.
execute_test_run_caseRetries one finished case in a run without rerunning the rest.

Bugs​

ToolWhat 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_bugsFiles several bugs at once, normally the suggestions you kept.
create_bugFiles one bug by hand.
list_bugsLists a project's bugs, paged and searchable.
search_bugsFinds a bug by code or title.
get_bugReads one bug in full.
get_bugs_for_test_caseLists the bugs linked to one test case.
update_bugChanges a bug, most often its status.
delete_bugDeletes one bug and its attachments. To retire a bug but keep its history, close it instead.
list_environmentsLists 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​