Apidog Tests Mcp

io.github.acabala由 GitHub 账号 acabala 发布v0.0.5更新于 Oct 24, 2026

MCP server for managing Apidog test cases, scenarios, suites, and test data

已验证STDIO仅桌面效率与工作流开发者工具

概览

AI 生成的概览

一个本地 MCP 服务器,让 AI 助手读写 Apidog 中的测试用例、测试场景、测试套件、测试数据和文件夹。

可以做什么
列出环境、API 端点、分类、标签、运行器和端点覆盖率统计(只读)。创建、读取、批量创建、更新和删除 API 端点的测试用例。创建、查看、更新和删除多步骤测试场景及其步骤。创建、查看、更新和删除测试套件及其条目。管理基于 CSV 的测试数据记录,并创建或删除场景与套件文件夹。
适用场景
适合在 Apidog 中维护 API 测试、并希望助手代为起草、批量创建、整理或清理测试用例、场景、套件和数据驱动测试数据,而无需切换到 Apidog 界面的场景。
运行要求
通过 stdio 在本地运行,通常使用 npx 或全局 npm 安装,因此需要 Node.js。需要环境变量 APIDOG_ACCESS_TOKEN、APIDOG_PROJECT_ID 和 APIDOG_BRANCH_ID;APIDOG_BASE_URL 可选,默认指向 Apidog 云 API。需要能访问 Apidog 的网络。
安装前请注意
该服务器具有写入权限:工具可在所配置的 Apidog 项目和分支中创建、更新和删除测试用例、场景、套件、测试数据和文件夹。它需要 Apidog 访问令牌(APIDOG_ACCESS_TOKEN);请使用专用的自动化令牌并限定到最小项目范围,定期轮换,并妥善保管客户端配置文件。它不是 Apidog 官方集成。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Apidog Tests Mcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

apidog-tests-mcp

MCP (Model Context Protocol) server for managing Apidog test cases, scenarios, suites, and test data. Gives AI assistants full read/write access to Apidog's test management features.

This project is not an official Apidog integration.

Features

  • Test Cases -- Create, read, update, delete, and bulk-create test cases for API endpoints
  • Test Scenarios -- Build multi-step test flows chaining multiple API calls
  • Test Suites -- Organize tests into runnable suites for CI/CD
  • Test Data -- Manage data-driven test iterations with CSV-formatted data
  • Folders -- Organize scenarios and suites into nested folder structures
  • Read-only tools -- List environments, endpoints, categories, tags, runners, and coverage statistics

Documentation

  • docs/PRACTICAL-USAGE.md -- proven patterns for creating stable test cases/scenarios/suites
  • SECURITY.md -- vulnerability reporting and secure usage guidelines
  • CONTRIBUTING.md -- contribution workflow
  • CHANGELOG.md -- release notes

Installation

bash
npm install -g @acabala/apidog-tests-mcp

Or use directly with npx:

bash
npx @acabala/apidog-tests-mcp

Configuration

The server requires these environment variables:

VariableRequiredDescription
APIDOG_ACCESS_TOKENYesYour Apidog access token
APIDOG_PROJECT_IDYesThe Apidog project ID
APIDOG_BRANCH_IDYesThe branch ID to work with
APIDOG_BASE_URLNoOverride the API base URL (default: https://api.apidog.com/api/v1)

MCP Client Configuration

Add to your MCP client config (e.g. Claude Desktop claude_desktop_config.json):

json
{	"mcpServers": {		"apidog-tests": {			"command": "npx",			"args": ["@acabala/apidog-tests-mcp"],			"env": {				"APIDOG_ACCESS_TOKEN": "your-token",				"APIDOG_PROJECT_ID": "your-project-id",				"APIDOG_BRANCH_ID": "your-branch-id"			}		}	}}

Recommended Token Practices

  • Use a dedicated token for automation.
  • Scope access to the minimum required Apidog project(s).
  • Rotate tokens regularly.
  • Keep MCP client config files local/private.

Available Tools

Read-only

ToolDescription
list_environmentsList all environments with base URLs
list_api_endpointsList API endpoint tree (filterable by module and name)
list_test_case_categoriesList test case categories
list_test_case_tagsList available tags
list_runnersList self-hosted test runners
get_endpoint_statisticsGet test coverage statistics

Test Cases

ToolDescription
list_test_casesList all test cases (filterable by endpoint)
get_test_caseGet full test case details
create_test_caseCreate a test case for an endpoint
create_test_cases_bulkCreate multiple test cases at once
update_test_caseUpdate a test case (GET-then-merge)
delete_test_caseDelete a test case

Test Scenarios

ToolDescription
list_test_scenariosList scenarios with folder structure
get_test_scenario_stepsGet steps for a scenario
create_test_scenarioCreate a multi-step test scenario
update_test_scenario_stepsSet/replace scenario steps
delete_test_scenarioDelete a scenario

Test Suites

ToolDescription
list_test_suitesList suites with folder structure
get_test_suiteGet full suite details
create_test_suiteCreate a test suite
update_test_suite_itemsSet suite items (static/dynamic groups)
delete_test_suiteDelete a suite

Test Data

ToolDescription
list_test_dataList test data records for a test case
get_test_dataGet test data with CSV rows and columns
create_test_dataCreate test data for a test case
update_test_dataUpdate test data (GET-then-merge)
delete_test_dataDelete a test data record

Folders

ToolDescription
create_scenario_folderCreate a scenario folder
delete_scenario_folderDelete a scenario folder
create_suite_folderCreate a suite folder

Development

bash
# Install dependenciesnpm install
# Run in development modenpm run start:dev
# Type checknpm run typecheck
# Formatnpm run format
# Run testsnpm test
# Run tests with coveragenpm run test:coverage
# Build for productionnpm run build

Security

  • Use a dedicated automation token with minimal required permissions.
  • Never commit APIDOG_ACCESS_TOKEN or environment-specific IDs.
  • Keep local MCP client config files private.
  • See SECURITY.md for reporting and response policy.

Release and Versioning

This repository uses Changesets and a GitHub Actions release workflow:

  • Add a changeset for user-visible changes: npm run changeset
  • Release automation creates/updates a version PR on main
  • Merged release PR publishes to npm with provenance

Open Source Guidelines

  • Contribution guide: CONTRIBUTING.md
  • Code of conduct: CODE_OF_CONDUCT.md
  • Changelog: CHANGELOG.md

Practical Tips

  • Always include path and parameters.path when creating route-parameterized test cases.
  • For update operations, prefer this server's merge-style tools over raw full-replace payloads.
  • Use customScript post-processors for assertions to avoid runner issues with declarative assertions.
  • See docs/PRACTICAL-USAGE.md for complete examples.

Project Structure

src/  index.ts          Entry point, registers tools and starts MCP server  client.ts         ApidogClient HTTP wrapper with auth headers  types.ts          Shared TypeScript interfaces and MCP result helpers  errors.ts         Custom error classes (ApidogApiError, ApidogConfigError)  schemas.ts        Shared Zod schemas for request parameters  tools/    read.ts         Read-only tools (environments, endpoints, categories, etc.)    test-cases.ts   Test case CRUD tools    test-scenarios.ts  Test scenario CRUD tools    test-suites.ts  Test suite CRUD tools    test-data.ts    Test data CRUD tools    folders.ts      Folder management tools

License

MIT License

来源:README.md,提交 f35de66

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.0.5最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分