# Apidog MCP

> Apidog MCP connects your AI agent directly to your API specification library. You can list projects, fetch deep schemas for any endpoint, and export the full OpenAPI 3.0 JSON without leaving your chat environment. Get instant access to every data model and HTTP route defined in Apidog.

## Overview
- **Category:** productivity
- **Price:** Free
- **Tags:** api-testing, mocking, openapi, schema-validation, lifecycle-management, documentation

## Description

Need to understand an API contract without clicking through a dozen tabs? Connect this MCP and let your AI agent handle it. You can ask your agent to list all existing projects, instantly seeing the full scope of your organization’s APIs. Need details on one specific route? Your agent pulls the complete schema for that endpoint—headers, path parameters, and body structures included. Better yet, if you need context for unit testing or code generation, your agent can pull every reusable data model (DTOs, entities) defined in Apidog. When you're ready to scaffold a whole service, simply ask it to export the complete OpenAPI 3.0 JSON specification. This capability makes advanced API documentation immediately available right within your chat interface, giving your AI client maximum context for testing or building new codebases. Because Vinkius hosts this MCP, you connect once from any compatible agent and get access to all of Apidog's powerful tools.

## Tools

### list_projects
Retrieves a list of every API project that exists in your Apidog organization.

### list_endpoints
Gives you a comprehensive list of all HTTP routes defined within one specific Apidog project.

### get_endpoint
Pulls the complete technical schema for any single API endpoint, showing its methods and parameters.

### list_schemas
Lists all defined data models or reusable schemas (DTOs, entities) used across your Apidog project.

### export_openapi
Exports the full OpenAPI 3.0 specification file for a selected project in JSON format.

## Prompt Examples

**Prompt:** 
```
List all active projects in our Apidog organization.
```

**Response:** 
```
I've retrieved your workspace projects. You have 'E-commerce API' (ID: 39420) and 'Internal Admin Portal' (ID: 10429). Which one would you like to explore?
```

**Prompt:** 
```
Write a TypeScript interface for the response schema of the /users endpoint in the E-commerce project.
```

**Response:** 
```
I analyzed the response schema for `/users`. Here is the exact TypeScript interface matching the backend's contract:

```typescript
export interface UserResponse {
  id: number;
  email: string;
  status: 'active' | 'suspended';
}
```
```

**Prompt:** 
```
Export the full OpenAPI JSON for the E-commerce project so we can generate unit tests.
```

**Response:** 
```
The complete OpenAPI 3.0 specification has been imported into my context. The project defines 42 endpoints and 18 global schemas. Looking at the /cart endpoints, which of its constraints would you like me to test first?
```

## Capabilities

### View API Projects
Lists every active project in your connected Apidog organization so you know what APIs exist.

### List Endpoints within a Project
Retrieves all specific HTTP routes and endpoints defined inside one chosen Apidog project.

### Inspect Endpoint Schemas
Fetches the complete technical blueprint, including request/response body schemas, for any single API endpoint.

### Query Data Models
Lists all reusable data structures (like DTOs or entities) defined across your entire Apidog workspace.

### Export OpenAPI Specification
Extracts the full, standardized OpenAPI 3.0 JSON file for a project, giving you maximum context.

## Use Cases

### Building a new microservice
A backend developer needs to scaffold five controllers for a new 'Billing' service. Instead of jumping through Apidog to find every endpoint, they ask the agent to use list_projects and then export_openapi for the Billing API. The resulting JSON provides everything needed for the AI client to generate all necessary boilerplate code in one go.

### Updating a legacy front-end
A frontend engineer needs to update their TypeScript models because an internal API changed its response structure. They use get_endpoint on the old route, letting the agent pull the precise schema definition and generate the correct interfaces for their client code.

### Writing complex integration tests
The QA team has a module that hits multiple endpoints (GET /users, POST /orders). They use list_schemas to see every possible data structure. Then, they instruct the agent to fetch expected response payloads for each route, building robust test cases without manual inspection.

### Onboarding a new developer
A junior developer needs an overview of all available APIs in a large system. They ask the agent to use list_projects first, then follow up by listing endpoints for a specific project, getting them oriented quickly without needing institutional knowledge.

## Benefits

- Stop copying schemas manually. Using the agent to inspect endpoint schemas means you get clean, structured data for immediate use in your code.
- Never lose context again. The ability to export the full OpenAPI 3.0 JSON specification lets your AI client have maximum information when generating unit tests or scaffolding entire services.
- Save time listing APIs. Instead of clicking into projects one by one, you can ask the agent to list all active projects in your organization instantly.
- Keep code types consistent. You can use the tool to query and get a list of every data model defined, ensuring your front-end interfaces match the backend contract.
- Streamline testing setup. QA teams gain an automatic way to fetch expected response payloads using the agent, making integration test construction much faster.

## How It Works

The bottom line is you talk to your API documentation using plain English instead of navigating through complex web dashboards.

1. Subscribe to this MCP and provide your Apidog Personal API Access Token.
2. Your AI client authenticates and gains access to all of your API contracts stored in the Apidog workspace.
3. You prompt your agent with a natural language request, like 'Show me the schema for /users,' or 'Export the OpenAPI JSON.' The agent executes the necessary tool call and returns the structured data.

## Frequently Asked Questions

**How does Apidog MCP help me with unit testing?**
It helps by letting your agent export_openapi. You get the complete OpenAPI 3.0 JSON specification, which gives your AI client all the necessary context (endpoints and schemas) to write comprehensive tests.

**Can I see every project in my organization using Apidog MCP?**
Yes, you use list_projects. This tool immediately shows you a roster of all active API projects within your connected Apidog workspace.

**What if I need to check the parameters for one endpoint in Apidog MCP?**
You run get_endpoint. The agent pulls the full schema, detailing everything from HTTP methods and path params to required headers and body structure.

**Is the data model information limited when using list_schemas?**
No. list_schemas queries all reusable schemas—the DTOs and entities—that your API uses across multiple endpoints, keeping your whole system's type definitions in one place.

**Does Apidog MCP work with my existing code base?**
Yes. By providing the full OpenAPI JSON via export_openapi, you give your AI client all the necessary documentation to scaffold controllers or generate service layers that match your existing codebase.