Skip to main content

Connect Your Editor to TestFlair

TestFlair speaks MCP (Model Context Protocol), so the AI assistant in your editor can drive the platform directly. Instead of switching to the web app, you ask your assistant to create a project, generate user stories and test cases from a requirement, generate automation scripts, run them, and report what happened — and it does the work through TestFlair, against your real data, with your own permissions.

Beta feature

The TestFlair MCP server is a Beta feature and is still rolling out. It may not be available on your account yet. Contact your workspace admin or [email protected] if you'd like access.

What You Can Do​

The tools follow the same pipeline as the web app:

Alongside the pipeline, you can read and correct what's already there — projects, requirement documents, test data, user stories, test cases, scripts and bugs — by hand, without spending Flairs.

A typical first session is one sentence to your assistant: "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​

The TestFlair MCP server is at:

https://mcp.testflair.ai/mcp

It uses streamable HTTP transport. If your client asks you to choose a type, pick http — not sse. Signing in happens in your browser the first time your editor connects; you do not create or paste an API key.

Claude Code​

claude mcp add --transport http testflair https://mcp.testflair.ai/mcp

Cursor​

Add to .cursor/mcp.json in your project, or your global Cursor MCP settings:

{
"mcpServers": {
"testflair": {
"type": "http",
"url": "https://mcp.testflair.ai/mcp"
}
}
}

VS Code​

Add to .vscode/mcp.json:

{
"servers": {
"testflair": {
"type": "http",
"url": "https://mcp.testflair.ai/mcp"
}
}
}

Claude Desktop​

Add TestFlair as a custom connector and enter the server address above as its URL.

After adding the server, your editor opens your browser at the TestFlair sign-in page. Sign in with your TestFlair account, and the tools become available to your assistant. See Signing In from Your Editor for how sign-in, sessions and signing out work.

Tool Reference​

Thirty-seven tools, grouped by what they work on. Tools marked (Flairs) run AI generation and consume credits; everything else is free.

Workspaces & projects​

ToolWhat it does
list_workspacesLists the workspaces you belong to. Call this first — every other tool needs a workspace id, and there is no default workspace when working from an editor.
list_projectsLists projects in a workspace. You see every project if you are its Owner or Coordinator; otherwise only the ones you are a member of.
get_projectReads a project's settings and its stored requirement text.
get_project_statsCounts and progress for one project — user stories, test cases, scripts, bugs, and how execution is trending — without listing every item.
create_projectCreates a project. Takes a name (30 characters maximum), an optional description, the base_url of the application under test, and optionally the requirement text itself.
update_projectCorrects a project's settings — most often a missing or wrong base URL.
save_project_contextAdds or corrects the business-requirement text stored on a project.

Requirement documents​

ToolWhat it does
list_attachmentsLists the documents attached to a project.
upload_attachmentAttaches a requirement document to a project, as text. Name the file .txt or .csv — TestFlair does not extract text from .md files. PDFs and Word documents go through the web app.
read_attachmentReads the text TestFlair extracted from an attached document.

Test data​

ToolWhat it does
list_test_dataLists a project's test data — the inputs TestFlair uses when generating test cases.
create_test_dataAdds test data entries, so test case generation uses real values.
update_test_dataChanges one test data entry, and every existing test case step that uses it.

User stories​

ToolWhat it does
generate_user_stories (Flairs)Generates user stories from a business requirement or attached documents. If the project already has requirement text stored, call it with just the ids and the stored text is used.
import_user_stories (Flairs)Reads user stories out of an attached document as written, instead of generating new ones.
list_user_storiesLists the stories already in a project, so you can find an id without regenerating. Supports a text filter.
get_user_storyReads one user story in full, including its acceptance criteria.
create_user_storyWrites one user story by hand.
update_user_storyCorrects an existing user story in place.

Test cases​

ToolWhat it does
generate_test_cases (Flairs)Generates test cases for one user story. There is no project-wide option — call it once per story.
list_test_casesLists the test cases already in a project, optionally filtered to one story.
get_test_caseReads one test case in full, including its ordered steps.
create_test_caseWrites one test case by hand.
update_test_caseCorrects an existing test case in place.

Scripts​

ToolWhat it does
generate_test_scripts (Flairs)Generates runnable automation for one or more test cases. Choose JAVA or PYTHON, and selenium or playwright.
get_test_scriptReads a generated script and its status. Takes the test case id, and returns the test script id you need to run or edit it.
update_test_scriptEdits the code of a generated script — fix one bad selector without regenerating, which would discard your other corrections. Takes the test script id.

Execution​

ToolWhat it does
list_execution_preferencesLists the execution profiles a project can run under — window size, timeouts, whether video is recorded. Any of them can be used to run a test; the default applies when you don't ask for anything specific.
create_execution_preferenceCreates a new execution profile — for example a mobile-sized window, longer timeouts, or no video — to run tests under. Names are unique per project. It can't edit, delete or change the project default; do that in the TestFlair UI.
execute_test (Flairs)Runs a generated script against the application under the execution profile you choose, and reports the result, including a video of the browser session.
get_executionReads a previous result without running again — useful for checking on a run that outlasted your client's patience, or fetching a fresh video link.

Bugs​

ToolWhat it does
generate_bug_suggestions (Flairs)Analyses a failed run and proposes bug reports with reproduction steps and evidence. Nothing is filed. If the run was already analysed, the earlier result is returned for free.
create_bugsFiles several bugs at once — normally the suggestions you kept.
create_bugFiles one bug by hand.
list_bugsLists the bugs across a project, paged and searchable.
get_bugReads one bug in full.
get_bugs_for_test_caseLists the bugs linked to one test case.
update_bugChanges fields on an existing bug — most often its status.

Things Worth Knowing​

Start with list_workspaces. There is no ambient workspace when you connect from an editor. Every other tool needs a workspace id, and this is the only way to discover a valid one.

The test script id is not the test case id. get_test_script takes a test case id and returns a test script id. execute_test and update_test_script need the script id. This is the single most common mistake.

The execution language must match the generation language. If you generated with JAVA, run with JAVA. Nothing checks this, and a mismatch runs the wrong executor.

Only use execution profile ids that TestFlair gave you. Take them from list_execution_preferences or create_execution_preference. An id TestFlair doesn't recognise doesn't cause an error: the test quietly runs under the project's default profile instead.

Your application must be reachable from the internet. TestFlair executes in the cloud, not on your machine, so localhost and private addresses will not work. To test a local app, set up a tunnel — see Test Execution.

Generation takes minutes, and that is normal. Your assistant will appear to wait. It is not stuck. If the wait is cut short, that is not a failure either — the reply tells you which tool to call to pick the work up.

Regeneration is opt-in. generate_test_cases returns the existing cases and spends nothing if the story already has them. Ask for regeneration explicitly to replace them.

Video links expire after one hour. Call get_execution again for a fresh one.

Edits cannot clear a field. update_user_story and update_test_case skip blank values, so passing an empty value leaves the field as it was.

Updating a bug unassigns it unless you pass the assignee. update_bug clears assigned_to whenever the call does not include it — even when you only meant to change the status.

Bug suggestions are proposals. generate_bug_suggestions files nothing. Review them, drop the noise, and pass the rest to create_bugs.

info

Generation consumes Flairs. Check your balance under Settings → Usage.

Troubleshooting​

I'm asked to sign in again, or tools stop working

  • Your TestFlair session ended. Complete the browser sign-in again — see Staying Signed In.

"Not permitted"

  • This is your own TestFlair permissions. Retrying will not help and neither will a different workspace. Ask your workspace admin for access to the project — see Roles & Permissions.

"Out of Flair credits"

  • AI generation is metered and your balance is spent. Nothing will generate until the account is topped up or the subscription renews. See Billing.

"Not found"

  • TestFlair does not distinguish does not exist from exists but is not visible to you. Check 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. This is a wait, not a failure — the earlier run is still going and will finish.

"Too many executions in flight"

  • The cap applies per workspace and per user, so a colleague'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 and run it again, or to regenerate it.

Next Steps​