← Back to Posts

How to Install and Use TestSprite MCP for AI-Powered Testing

Learn step-by-step how to set up the TestSprite MCP server, integrate it with your IDE, and leverage AI-driven testing in your projects.

2026-03-21
By Jake Alberio
TestSpriteMCPAI testingIDE integrationtest automation

How to Install and Use TestSprite MCP for AI-Powered Testing

Coding AssistantCoding Assistant

Overview

TestSprite MCP (Model Context Protocol) turns your IDE’s AI assistant into an autonomous testing agent. It can automatically generate PRDs, test plans, and test code, and run tests securely in the TestSprite cloud.

“One‑command testing makes it feel like the IDE is doing the work for you.” – TestSprite documentation

Prerequisites

  • Node.js (v14 or higher)
  • Access to your IDE’s MCP configuration (e.g., Cursor, VS Code)

Step 1: Install the MCP Server Globally

bash
1npm install -g @testsprite/testsprite-mcp@latest

Verify the installation:

bash
1npm list -g @testsprite/testsprite-mcp

You should see something like @testsprite/testsprite-mcp@0.0.29.

Step 2: Run the Server (Quick Test)

bash
1npx @testsprite/testsprite-mcp@latest

If the server starts without errors, you’re ready to connect it to your IDE.

Step 3: Add the MCP Server to Your IDE

Cursor

  1. Open SettingsFeaturesMCP.
  2. Click “+ Add New MCP Server”.
  3. In the Command field, enter:
bash
1node $(npm root -g)/@testsprite/testsprite-mcp/build/index.js
  1. Save the configuration. The server will appear in the MCP servers list.

VS Code (example)

Add the following to your settings.json:

json
1{ 2 "mcp.servers": [ 3 { 4 "name": "TestSprite MCP", 5 "command": "node $(npm root -g)/@testsprite/testsprite-mcp/build/index.js" 6 } 7 ] 8}

Note: Adjust the path if you installed the package locally.

Step 4: Use One‑Command Testing

In your IDE’s chat or Composer window, type:

text
1Help me test this project with TestSprite

The AI assistant will:

  1. Generate a PRD document.
  2. Create a test plan.
  3. Write test code.
  4. Execute the tests in the TestSprite cloud.

Advanced Configuration

Featurestdio Server ExampleSSE Server Example
Commandnode ~/mcp-quickstart/weather-server-typescript/build/index.jsnode server-sse.js
Use CaseSimple request/responseReal‑time streaming responses
Recommended ForBasic testing workflowsComplex, interactive debugging

Troubleshooting

  • MCP Server Not Connecting – Run npm list -g @testsprite/testsprite-mcp to confirm the version.
  • Port Conflicts – Ensure no other service is using the default MCP port (usually 4000). Change the port via the --port flag:
bash
1@testsprite/testsprite-mcp --port 5000

Further Reading


By following these steps, you can empower your IDE’s AI assistant to automatically test, debug, and fix your code with a single command. Happy testing!