HTTP API自动化测试工具

ScripterI/O MCP Server 是一个基于Model Context Protocol (MCP)的工具,支持发送HTTP请求、验证响应并自动化API测试场景,适用于LLM代理和自动化测试。

  • by PackageIO
  • JavaScript
  • 本地部署
  • 更新于
在 GitHub 查看 scripterio-js/scripterio-mcp

使用说明

脚本I/O MCP服务器

这 脚本I/O MCP服务器 使能够 LLM 以及使用模型上下文协议(MCP)与HTTP API交互并自动化测试场景的代理。使用ScripterI/O MCP,您可以发送HTTP请求、验证响应和编写API驱动的工作流的脚本。

🌟 主要特点

✅ 发送HTTP请求(GET,更多即将推出)
✅ 自动化API测试方案
✅ LLM友好,易于扩展


🔧 用例(工具)

1. get

向任何URL发送GET请求并返回响应对象(状态、标头、正文)。

提示示例:

Act as a ScripterI/O
- Proceed with test scenario using tools provided by scripterio-mcp

API specifications and logic.
Test Scenario:
Endpoint: Send a GET request to https://api.restful-api.dev/objects/7.

Validation Criteria:
Confirm the response contains the correct status code (e.g., 200).
Validate that the returned response data matches the expected data structure or values:
{
  "id": "7",
  "name": "Apple MacBook Pro 16",
  "data": {
    "year": 2019,
    "price": 1849.99,
    "CPU model": "Intel Core i9",
    "Hard disk size": "1 TB"
  }
}


🛠️ 运作原理

  • 服务器暴露了一个 get 用于发送HTTP GET请求的工具。
  • 该工具返回状态代码、标头和解析的JSON正文。
  • 专为与LLM代理和自动化测试场景集成而设计。

⚙️ 配置

要在VS Code中配置ScripterI/O MCP服务器,请更新您的 用户设置(JSON):

{
  "mcp": {
    "servers": {
      "scripterio-mcp": {
        "command": "npx",
        "args": ["scripterio-mcp"]
      }
    }
  }
}

🚀 安装与使用

在VS代码中安装

您可以使用VS Code CLI安装JSON MCP服务器:

# For VS Code
code --add-mcp '{"name":"scripterio-mcp","command":"npx","args": ["scripterio-mcp@latest"]}'

⚙️ 安装服务器

全局安装

npm install -g scripterio-mcp@latest

全局安装后运行

scripterio-mcp

使用最新版本的npx(推荐)

npx scripterio-mcp@latest