Skip to main content
Glama
apidog-tests-mcp

apidog-tests-mcp

by acabala

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

Related MCP server: Postmancer

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

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

Or use directly with npx:

npx @acabala/apidog-tests-mcp

Configuration

The server requires these environment variables:

Variable

Required

Description

APIDOG_ACCESS_TOKEN

Yes

Your Apidog access token

APIDOG_PROJECT_ID

Yes

The Apidog project ID

APIDOG_BRANCH_ID

Yes

The branch ID to work with

APIDOG_BASE_URL

No

Override 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):

{
	"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"
			}
		}
	}
}
  • 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

Tool

Description

list_environments

List all environments with base URLs

list_api_endpoints

List API endpoint tree (filterable by module and name)

list_test_case_categories

List test case categories

list_test_case_tags

List available tags

list_runners

List self-hosted test runners

get_endpoint_statistics

Get test coverage statistics

Test Cases

Tool

Description

list_test_cases

List all test cases (filterable by endpoint)

get_test_case

Get full test case details

create_test_case

Create a test case for an endpoint

create_test_cases_bulk

Create multiple test cases at once

update_test_case

Update a test case (GET-then-merge)

delete_test_case

Delete a test case

Test Scenarios

Tool

Description

list_test_scenarios

List scenarios with folder structure

get_test_scenario_steps

Get steps for a scenario

create_test_scenario

Create a multi-step test scenario

update_test_scenario_steps

Set/replace scenario steps

delete_test_scenario

Delete a scenario

Test Suites

Tool

Description

list_test_suites

List suites with folder structure

get_test_suite

Get full suite details

create_test_suite

Create a test suite

update_test_suite_items

Set suite items (static/dynamic groups)

delete_test_suite

Delete a suite

Test Data

Tool

Description

list_test_data

List test data records for a test case

get_test_data

Get test data with CSV rows and columns

create_test_data

Create test data for a test case

update_test_data

Update test data (GET-then-merge)

delete_test_data

Delete a test data record

Folders

Tool

Description

create_scenario_folder

Create a scenario folder

delete_scenario_folder

Delete a scenario folder

create_suite_folder

Create a suite folder

Development

# Install dependencies
npm install

# Run in development mode
npm run start:dev

# Type check
npm run typecheck

# Format
npm run format

# Run tests
npm test

# Run tests with coverage
npm run test:coverage

# Build for production
npm 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

Available Tools

30 tools
create_scenario_folderA

Create a folder for organizing test scenarios. Folders can be nested via parentId.

Inputs: name (required), ordering, parentId.

create_suite_folderB

Create a folder for organizing test suites. Folders can be nested via parentId.

Inputs: name (required), ordering, parentId.

create_test_caseA

Create a test case for an API endpoint. Requires apiDetailId (from list_api_endpoints) and responseId. Use list_test_case_categories and list_test_case_tags first to get valid categoryId and tagIds.

Inputs: name (required), path (required), responseId (required), apiDetailId (required), +7 more.

create_test_cases_bulkA

Create multiple test cases at once. Each item follows the same schema as create_test_case.

Inputs: testCases (required).

create_test_dataA

Create a test data record for a test case. The data field is CSV-formatted: first line is the column header, subsequent lines are values. Each column needs a matching entry in the columns object. Variables are accessible in test cases as {{columnName}} or via pm.iterationData.get('columnName') in scripts.

Inputs: data (required), columns (required), relatedId (required), environmentId.

create_test_scenarioA

Create a new test scenario (multi-step test flow). Use list_test_scenarios first to find valid folderIds and determine ordering.

Inputs: name (required), folderId (required), tags, options, +3 more.

create_test_suiteC

Create a new test suite for CI grouping. Suites can contain test cases and test scenarios.

Inputs: name (required), tags, folderId, ordering, +4 more.

delete_scenario_folderA

Delete a test scenario folder by ID. The folder must be empty. This cannot be undone.

Inputs: folderId (required).

delete_test_caseA

Delete a test case by ID. This cannot be undone.

Inputs: testCaseId (required).

delete_test_dataB

Delete a test data record by ID.

Inputs: testDataId (required).

delete_test_scenarioA

Delete a test scenario by ID. This cannot be undone.

Inputs: scenarioId (required).

delete_test_suiteB

Delete a test suite by ID. This cannot be undone.

Inputs: suiteId (required).

get_endpoint_statisticsC

Get endpoint test coverage statistics

Inputs: no named parameters.

get_test_caseA

Get full details of a single test case by its ID, including parameters, request body, and assertions

Inputs: testCaseId (required).

get_test_dataA

Get a specific test data record including the CSV data rows and column definitions.

Inputs: testDataId (required).

get_test_scenario_stepsA

Get the steps (API calls) for a test scenario. Each step contains the full httpApiCase with parameters, auth, and request details.

Inputs: scenarioId (required).

get_test_suiteA

Get full details of a test suite, including its items (test cases and scenarios).

Inputs: suiteId (required).

list_api_endpointsA

List API endpoints tree with IDs, names, and folder structure. Use this to find apiDetailId values needed for creating test cases. Pass moduleId to filter by a specific service module (reduces response size significantly). Pass search to filter by endpoint name.

Inputs: search, moduleId.

list_environmentsA

List all environments (DEV, TEST, PROD, etc.) with their base URLs

Inputs: no named parameters.

list_runnersA

List available test runners (self-hosted agents for running tests)

Inputs: no named parameters.

list_test_case_categoriesA

List test case categories (e.g. Positive, Negative, Edge Case)

Inputs: no named parameters.

list_test_casesA

List test cases (id, name, type, apiDetailId, categoryId, tagIds). Supports filtering by endpoint and pagination. Use get_test_case for full details of a single case.

Inputs: page, pageSize, endpointId.

list_test_case_tagsA

List available test case tags for categorizing test cases

Inputs: no named parameters.

list_test_dataA

List test data records for a test case. Returns metadata (id, environmentId, relatedId) but not the actual data rows — use get_test_data for that.

Inputs: entityId (required).

list_test_scenariosA

List all test scenarios (compact summary: id, name, folderId, priority, tags, description, ordering, status). Use get_test_scenario_steps for full details.

Inputs: no named parameters.

list_test_suitesA

List all test suites (compact summary: id, name, folderId, priority, tags, description, ordering, status). Use get_test_suite for full details.

Inputs: no named parameters.

update_test_caseA

Update an existing test case. Pass only the fields you want to change. The tool fetches the current state first and merges your changes, so unspecified fields are preserved.

Inputs: testCaseId (required), auth, name, tagIds, +5 more.

update_test_dataA

Update an existing test data record. Fetches current state first and merges changes.

Inputs: testDataId (required), data, columns.

update_test_scenario_stepsA

Set or update the steps in a test scenario. Each step references an API endpoint via bindId (apiDetailId). Steps are fully replaced — pass the complete steps array. Supports 'http' steps (regular API calls) and 'if' conditional blocks (which have children instead of httpApiCase).

Inputs: steps (required), scenarioId (required).

update_test_suite_itemsA

Replace items in a test suite. Each item is a group with a UUID, a type, and a nested array of references. For STATIC_TEST_CASE: provide testCaseIds (array of test case IDs). For STATIC_TEST_SCENARIO: provide testScenarioIds (array of scenario IDs). For DYNAMIC_TEST_CASE / DYNAMIC_TEST_SCENARIO: provide folderId to dynamically include all from that folder. This does a GET-then-merge so existing suite fields are preserved.

Inputs: items (required), suiteId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 30 tools

    Disambiguation5/5

    Each tool targets a distinct entity and action (e.g., create vs. list vs. update for test cases, scenarios, suites, data, folders). There is no ambiguity between tools like create_test_case and create_test_cases_bulk because the bulk variant is clearly separate.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case (e.g., create_test_case, list_test_scenarios, get_endpoint_statistics). No mixing of styles or irregular verbs.

    Tool Count3/5

    With 30 tools, the count is on the higher side but justified by the broad domain covering CRUD for multiple entities and metadata listings. However, it exceeds the typical 3-15 range, making it slightly heavy.

    Completeness3/5

    The tool set covers most CRUD operations for test cases, scenarios, suites, and data, but lacks tools for updating or deleting suite folders, and there is no tool to trigger test runs or view results. These gaps could hinder full workflow automation.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A standalone MCP server for API testing and management, allowing AI assistants to interact with RESTful APIs through natural language.
      12 npm
      29
      MIT
    • A
      license
      B
      quality
      C
      maintenance
      MCP server for executing MySQL SQL, managing Apifox API documentation, and parsing/executing curl commands.
      6
      11 npm
      ISC
    • A
      license
      A
      quality
      D
      maintenance
      MCP server that provides 22 tools to manage Apidog API documentation, including importing OpenAPI specs, exporting, diffing, analyzing, and bulk-editing endpoints.
      22
      13 npm
      3
      MIT