TestSprite MCP Server — Snelstartgids

TestSprite MCP Server — Quick Start Guide

TestSprite MCP Server — Quick Start Guide TestSprite MCP is a powerful AI-driven test server that helps you automatically test frontend and backend applications directly from your favorite IDE. With TestSprite, you can easily generate test plans, execute them, and have bugs automatically resolved, all within your existing development workflow.

TestSprite MCP Server — 快速入门指南 TestSprite MCP 是一款功能强大的 AI 驱动测试服务器,可帮助您直接在喜爱的 IDE 中自动测试前端和后端应用程序。通过 TestSprite,您可以在现有的开发工作流程中轻松生成测试计划、执行测试并自动修复错误。


Installation / 安装

Requirements

系统要求


Get Your API Key / 获取 API 密钥

  1. Log in to your TestSprite dashboard at https://www.testsprite.com/dashboard

  2. Navigate to API Keys under Settings.

  3. Click “New API Key”.

  4. Copy your API key.

  5. 登录您的 TestSprite 控制面板:https://www.testsprite.com/dashboard

  6. 在“设置”(Settings) 下导航至“API 密钥”(API Keys)。

  7. 点击“新建 API 密钥”(New API Key)。

  8. 复制您的 API 密钥。


IDE Configuration / IDE 配置

Cursor (One-Click)

  1. Get your API key.
  2. Click the one-click install link for Cursor.
  3. Enter your API key within Cursor.
  4. Start testing.

Cursor (一键安装)

  1. 获取您的 API 密钥。
  2. 点击 Cursor 的一键安装链接。
  3. 在 Cursor 中输入您的 API 密钥。
  4. 开始测试。

Cursor (Manual)

  1. Open Cursor Settings.
  2. Navigate to Tools & Integration.
  3. Click “Add Custom MCP”.
  4. Add the following configuration:
{
  "mcpServers": {
    "TestSprite": {
      "command": "npx",
      "args": ["@testsprite/testsprite-mcp@latest"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}
  1. Verify that a green dot appears on the TestSprite MCP server icon.

Cursor (手动配置)

  1. 打开 Cursor 设置。
  2. 导航至“工具与集成”(Tools & Integration)。
  3. 点击“添加自定义 MCP”(Add Custom MCP)。
  4. 添加以下配置:
{
  "mcpServers": {
    "TestSprite": {
      "command": "npx",
      "args": ["@testsprite/testsprite-mcp@latest"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}
  1. 确认 TestSprite MCP 服务器图标上出现绿点。

Important — Cursor Sandbox Mode / 重要提示 — Cursor 沙盒模式

Cursor runs MCP tools in sandbox mode by default, which limits TestSprite. To fix this:

  1. Go to Cursor → Settings → Cursor Settings.
  2. Go to Chat → Auto-Run → Auto-Run mode.
  3. Change to “Always ask” or “Always execute”.

Cursor 默认在沙盒模式下运行 MCP 工具,这会限制 TestSprite 的功能。解决方法如下:

  1. 进入 Cursor → 设置 (Settings) → Cursor 设置
  2. 进入 聊天 (Chat) → 自动运行 (Auto-Run) → 自动运行模式
  3. 将其更改为“总是询问”(Always ask) 或“总是执行”(Always execute)。

Claude Code

cd /path/to/your/project
claude mcp add TestSprite --env API_KEY=your_api_key -- npx @testsprite/testsprite-mcp@latest

Verify with: claude mcp list Expected output: TestSprite: npx @testsprite/testsprite-mcp@latest - ✓ Connected

Claude Code

cd /path/to/your/project
claude mcp add TestSprite --env API_KEY=your_api_key -- npx @testsprite/testsprite-mcp@latest

使用以下命令验证:claude mcp list 预期输出:TestSprite: npx @testsprite/testsprite-mcp@latest - ✓ Connected


VSCode

  1. Open the Command Palette.
  2. Run MCP: Add Server.
  3. Choose Command (stdio) as the type.
  4. Type npx @testsprite/testsprite-mcp@latest as the command.
  5. Name it TestSprite.
  6. Add the following env configuration:
{
  "servers": {
    "testsprite": {
      "command": "npx",
      "args": ["-y", "@testsprite/testsprite-mcp@latest"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}

VSCode

  1. 打开命令面板 (Command Palette)。
  2. 运行 MCP: Add Server
  3. 选择 Command (stdio) 作为类型。
  4. 输入 npx @testsprite/testsprite-mcp@latest 作为命令。
  5. 将其命名为 TestSprite
  6. 添加以下环境变量配置:
{
  "servers": {
    "testsprite": {
      "command": "npx",
      "args": ["-y", "@testsprite/testsprite-mcp@latest"],
      "env": {
        "API_KEY": "your-api-key"
      }
    }
  }
}

Verification / 验证

  • Your AI assistant can see TestSprite MCP tools.

  • No “command not found” errors.

  • Try: “Help me test this project with TestSprite.”

  • 您的 AI 助手可以看到 TestSprite MCP 工具。

  • 没有“command not found”错误。

  • 尝试输入:“Help me test this project with TestSprite.” (帮我用 TestSprite 测试这个项目。)