Token导航 LogoToken导航TokenDH.com
Cursor API Testing MCP logo
开发工具未说明官方级别未说明来源级核验

Cursor API Testing MCP

MCP Server

专为Cursor设计的轻量级API接口测试工具,支持单个API测试和批量测试,提供完整响应和性能监控。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
API测试TypeScriptCursor跨平台Cursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

TixXin

提供方

TixXin

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

Cursor API Testing MCP

License

简化版API测试MCP服务器 - 专为Cursor设计的轻量级API接口测试工具。

✨ 功能特性

  • 🚀 单个API测试 - 支持GET/POST/PUT/DELETE/PATCH方法
  • 📊 批量测试 - 并发测试多个端点
  • 📋 完整响应 - 显示原始JSON数据和响应头
  • 高性能 - 支持并发请求和性能监控
  • 🔍 智能错误分类 - 自动分析网络、认证、业务错误
  • 🌐 跨平台 - 支持HTTP/HTTPS,本地和远程API

🔧 支持的工具

工具名功能描述参数
test_api测试单个API端点endpoint, method, test_data, auth_token
batch_test批量测试多个端点module_name, endpoints[], concurrent_limit

📦 安装方式

方式1: NPM全局安装

npm install -g cursor-api-testing-mcp

方式2: 本地项目安装

npm install cursor-api-testing-mcp

方式3: 从源码构建

git clone https://github.com/YuGe-Git/cursor-api-testing-mcp.git
cd cursor-api-testing-mcp
npm install
npm run build

⚙️ Cursor配置

在Cursor的 settings.json 中添加MCP配置:

{
  "mcp": {
    "api-testing": {
      "command": "api-testing-mcp",
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

或者使用本地路径:

{
  "mcp": {
    "api-testing": {
      "command": "node",
      "args": ["/path/to/cursor-api-testing-mcp/dist/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

🚀 使用示例

单个API测试

// 在Cursor中调用
mcp_api-testing_test_api({
  endpoint: "https://httpbin.org/get",
  method: "GET"
})

// POST请求示例
mcp_api-testing_test_api({
  endpoint: "https://httpbin.org/post",
  method: "POST",
  test_data: {"name": "测试", "type": "API"},
  auth_token: "Bearer your-token"
})

批量测试

mcp_api-testing_batch_test({
  module_name: "用户API测试",
  endpoints: [
    "GET https://api.example.com/users",
    "POST https://api.example.com/users",
    "PUT https://api.example.com/users/1"
  ],
  concurrent_limit: 3
})

📊 输出示例

✅ API 测试结果

端点信息:
- 方法: POST
- 路径: https://httpbin.org/post
- 状态: 成功

性能指标:
- HTTP状态码: 200
- 响应时间: 156ms
- 测试时间: 2025-01-20T10:30:45.123Z

响应数据:

{ "args": {}, "data": "{\"name\": \"测试\"}", "json": { "name": "测试" } }


响应头 (主要):
- content-type: application/json
- server: gunicorn/19.9.0

🛠 开发指南

本地开发

# 克隆项目
git clone https://github.com/YuGe-Git/cursor-api-testing-mcp.git
cd cursor-api-testing-mcp

# 安装依赖
npm install

# 开发模式
npm run dev

# 构建项目
npm run build

# 启动服务
npm start

构建命令

  • npm run build - TypeScript编译
  • npm run dev - 开发模式
  • npm run clean - 清理dist目录
  • npm run package - 创建NPM包
  • npm run release - 构建并发布

📝 更新日志

v2.0.0

  • ✨ 简化工具数量,只保留核心功能
  • 🔧 工具名称缩短 (test_api, batch_test)
  • 📋 优化输出格式,去除Markdown加粗
  • 🚀 提升性能和稳定性

v1.0.0

  • 🎉 初始版本发布
  • 🔧 8个完整测试工具
  • 📊 完整的Swagger解析和报告生成

🤝 贡献指南

  1. Fork项目
  2. 创建功能分支: git checkout -b feature-name
  3. 提交更改: git commit -am 'Add feature'
  4. 推送分支: git push origin feature-name
  5. 提交Pull Request

📄 许可证

MIT License - 详见 LICENSE 文件

🔗 相关链接


Made with ❤️ for Cursor developers

目录标签

目录标签

API测试TypeScriptCursor跨平台本地部署性能监控批量测试错误分类

支持客户端

Cursor

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP