Connect API Specification within Apidog Project to AI via Apidog MCP Server
Configuring the MCP Client
Prerequisites
Obtaining API Access Token and Project ID
Generate API Access Token
Account Settings
β API Access Token
<access-token>
in the configuration belowGet Apidog Project ID
<project-id>
in the configuration belowConfiguring MCP in Cursor
Edit MCP Config File
Open Cursor editor, click the settings icon (top-right), select "MCP" from the left menu, then click "+ Add new global MCP server".
Add Configuration
Paste the following configuration in the opened
mcp.json
. Remember to replace <access-token>
and <project-id>
with your own:macOS / Linux
Windows
{ "mcpServers": { "API specification": { "command": "npx", "args": [ "-y", "apidog-mcp-server@latest", "--project=<project-id>" ], "env": { "APIDOG_ACCESS_TOKEN": "<access-token>" } } } }
Verify Configuration
Test the connection by asking the AI (in Agent mode):Successful connection is confirmed when AI returns your Apidog project's API information. 
Please fetch API specification via MCP and tell me how many endpoints exist in the project
Important Notes
<access-token>
and <project-id>
with your personal Apidog API access token and project ID.<project-id>
. For clarity, name each MCP Server following the format "xxx API Specification"."APIDOG_ACCESS_TOKEN": "<access-token>"
and instead, configure the APIDOG_ACCESS_TOKEN
as an environment variable on each member's machine to prevent token leakage.<API address of the on-premise server, starting with http:// or https://>
". Additionally, ensure network access to www.npmjs.com
properly.{ "mcpServers": { "API specification": { "command": "npx", "args": [ "-y", "apidog-mcp-server@latest", "--project=<project-id>", // Required for on-premise deployment: "--apidog-api-base-url=<API address of the on-premise server, starting with http:// or https://>" ], "env": { "APIDOG_ACCESS_TOKEN": "<access-token>" } } } }
Connecting Other Data Resources to AI
FAQs
Modified atΒ 2025-06-26 06:05:56