npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cursor-api-testing-mcp

v2.0.0

Published

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

Readme

Cursor API Testing MCP

NPM Version License Node Version

简化版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

响应数据:
```json
{
  "args": {},
  "data": "{\"name\": \"测试\"}",
  "json": {
    "name": "测试"
  }
}

响应头 (主要):

  • content-type: application/json
  • server: gunicorn/19.9.0

## 🛠 开发指南

### 本地开发
```bash
# 克隆项目
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