How to Set Up the TestSprite MCP Server in Your IDE
This is a one-time setup that takes a few minutes, and once it's done, testing a project becomes a single instruction typed into your existing IDE chat. Here's the actual setup process, what each step does, and what to check if something doesn't connect.
What the MCP server actually does
TestSprite MCP Server is the developer-facing surface of TestSprite inside AI IDEs. It doesn't run tests by itself; it's the bridge that lets your IDE's AI assistant call TestSprite's testing engine directly from chat. Once it's configured, typing "Help me test this project with TestSprite" triggers the full discover → plan → generate → execute → analyze → heal → report loop without you leaving the editor.
It supports Cursor, Claude Code, Windsurf, VS Code, GitHub Copilot, and Trae, since all of them speak the Model Context Protocol.
Step 1: Create a TestSprite account
Sign up at testsprite.com. The free plan doesn't require a credit card and gives you 150 credits a month that refresh automatically, enough to actually test the setup before deciding whether to pay for anything.
Step 2: Get your API key
Every installation method needs a TestSprite API key first. You'll find this in your account dashboard after signing up. Keep it handy; you'll paste it into your IDE's MCP configuration in the next step.
Step 3: Install the MCP server package
The MCP server is distributed as an npm package. You have two installation options:
# Global installation (recommended)
npm install -g @testsprite/testsprite-mcp@latest
# Or run it directly without installing globally
npx @testsprite/testsprite-mcp@latest
Global installation is generally the more reliable path since it avoids re-resolving the package on every invocation, but npx works fine if you'd rather not install anything globally.
Step 4: Add TestSprite to your IDE's MCP configuration
The exact file and menu path differs slightly by IDE, but the configuration itself is nearly identical everywhere. For most IDEs, you're adding an entry like this to your MCP config file:
{
"mcpServers": {
"TestSprite": {
"command": "npx",
"args": ["@testsprite/testsprite-mcp@latest"],
"env": {
"API_KEY": "your-api-key"
}
}
}
}
In Cursor or Claude Code: open the MCP store from the editor's agent panel dropdown, select "Manage MCP Servers," then "View raw config," and paste the configuration above into mcp_config.json, replacing your-api-key with the key from Step 2. Note that installing this way in Claude Code scopes TestSprite to the current project directory; if you work across multiple project directories, you'll need to add it again in each one, or configure it globally following Claude Code's own MCP documentation.
In VS Code: the format is slightly different, using a servers key instead of mcpServers:
{
"servers": {
"testsprite": {
"command": "npx",
"args": ["-y", "@testsprite/testsprite-mcp@latest"],
"env": { "API_KEY": "your-api-key" }
}
}
}
In Trae: navigate to AI Sidebar > AI Management, select MCP > Add > Add from Marketplace, and search for TestSprite to add it directly without editing a config file by hand.
Step 5: Start the server
After saving your configuration, click the start button next to the TestSprite MCP entry in your config file (in Cursor and Claude Code) or restart your IDE if your specific client requires that to pick up the new server. You should see TestSprite appear as an active MCP server in your IDE's server list once it's connected.
Step 6: Confirm your app can run
TestSprite tests your live, running application, not your source files. Before your first session, make sure your dev server (or staging environment) is actually running:
# Frontend (React, Vue, Angular, etc.)
npm run dev # typically port 3000, 5173, or 8080
# Backend (Node.js, Python, etc.)
node index.js # typically port 8000, 3001, or 4000
python app.py # Flask/FastAPI, typically port 5000 or 8000
Step 7: Verify the connection with a real prompt
Open a new chat in your IDE's AI assistant panel and type: "Help me test this project with TestSprite." If everything's connected, this triggers the bootstrap step, which opens a Testing Configuration page in your browser where you confirm project details before the full pipeline runs.
If something doesn't connect
A few common causes to check first: confirm your Node.js version is compatible (run node --version; older versions can cause the npx command to fail silently), double-check the API key was pasted without extra whitespace, and make sure you restarted or reloaded the IDE after saving the config, since most clients don't pick up MCP server changes live.
Working across multiple projects
If you switch between several codebases regularly, it's worth deciding upfront whether you want TestSprite scoped per-project or available globally, rather than discovering the answer by accident the first time it's missing where you expected it. In Claude Code specifically, the setup described above scopes the server to the current project directory, so a second or third project needs its own configuration entry unless you follow the global-scope setup in Claude Code's own MCP documentation instead. Cursor and Windsurf tend to behave similarly: check whether your specific client's MCP settings are workspace-level or user-level before assuming a single setup covers everything you work on.
A reasonable default for most solo developers: set it up per-project as you actually start using it on each one, rather than trying to configure every project you own in one sitting. The five-minute setup cost is low enough that doing it as-needed doesn't create real friction.
What to expect the first time it actually runs
The first session, on any given project, tends to take longer than subsequent ones, since TestSprite is exploring your app structure and building an internal PRD for the first time rather than working from something it already has cached. Don't take a longer-than-expected first run as a sign something's misconfigured; give it a few minutes to complete the bootstrap and exploration steps before assuming a problem.
Conclusion
The MCP server setup is a five-minute task once you have your API key: install the npm package, drop the configuration into your IDE's MCP settings, and confirm your app is running before your first prompt. After that, testing your project is as simple as typing a sentence into the same chat window you're already using to write code. If you haven't created an account yet, start with TestSprite's free plan and follow the steps above.