PlugWiki

Apifox MCP Server

OfficialLocal
Getnpmapifox-mcp-serverapifox/apifox-mcp-serverDocs

Lets Cursor or Cline read your Apifox project's API docs, or any OpenAPI file, so the AI writes code that matches your real endpoints.

This is Apifox's own server for giving your AI coding assistant your API docs. It runs on your computer, downloads the docs for one Apifox project, and lets the AI read them when it writes models, request code or comments. It only reads docs and keeps a local copy, so ask the AI to refresh after you change the API in Apifox. Apifox still calls it a beta, and users report that very large or multi-module projects are not read in full.

Good for

  • Developers who keep their API design in Apifox and code in Cursor or VS Code with Cline
  • Front-end teams generating request types and models from the backend's API docs
  • Anyone with a Swagger or OpenAPI file who wants the AI to read it directly
  • Teams on a self-hosted Apifox server

Works in

1 supported · 1 with issues · 9 should work

Tap an app to see how to set it up and any known problems.

Install Apifox MCP

Claude Code

  1. 1

    Copy this prompt.

    Add the Apifox MCP server to Claude Code. Run this command:
    
    claude mcp add apifox-api-docs -e APIFOX_ACCESS_TOKEN=<APIFOX_ACCESS_TOKEN> -- npx -y apifox-mcp-server@latest --project-id=<project-id>
    
    Ask me for APIFOX_ACCESS_TOKEN and only put the values in that config, nowhere else.
    
    Then check that it loaded and tell me if I need to sign in or restart.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js 18 or newer, Apifox access token and project ID.

Read-only mode: It only reads your API docs, so there is nothing to turn off.

Replace <project-id> with the ID from Project settings > Basic settings in Apifox. For a Swagger or OpenAPI file, swap --project-id=<project-id> for --oas=<url-or-path> and drop the token. Self-hosted Apifox: add --apifox-api-base-url=<your server API address>. For several projects, add one entry per project. On Windows, if npx does not start, run it through cmd /c npx.

Built from the package data we hold. Not yet tested by us.

Tools

  • Reads your project's API docs

    Reads the OpenAPI spec of your Apifox project or OpenAPI file, so the AI knows your endpoints, parameters and response shapes. The name gets a project suffix when you connect more than one project.

    Try: “Read the API docs and generate TypeScript types for the /users endpoints”

    Network · read_project_oas

  • Downloads the latest API docs again

    Throws away the local copy and downloads the latest API docs, so the AI sees changes you made in Apifox.

    Try: “Refresh the API docs, I just added new fields in Apifox”

    Network · refresh_project_oas

  • Used by the assistant behind the scenes

    Opens the linked parts of the API docs, such as shared models

    Reads the parts of the spec that other sections point to, such as shared data models or individual endpoint files, several at a time.

    Try: “Show me the full Product model the order endpoints use”

    Network · read_project_oas_ref_resources

Read from the source code

Pros and cons

Good

  • Official server from Apifox.
  • Read-only, so it cannot change your API project.
  • Works with an Apifox project, published docs or a plain OpenAPI file.
  • Supports self-hosted Apifox servers.
  • Keeps a local copy of the docs, so it does not download them for every question.

Watch out

  • Still labelled beta by Apifox.
  • Users report large projects being cut off and only the first module showing.
  • Endpoints inside folders can be missing.
  • Tool names can change on each start when reading an OpenAPI file.
  • Does not work behind some corporate proxies.
  • Cannot push changes back to Apifox.

Permissions

low risk · 3 things to watch

Low risk

It only reads your API docs, so the main risk is your Apifox token leaking from a shared config file. Keep the token in an environment variable on your own machine.

What it can do

Watch out for

  • Your access token can leak through shared config

    Apifox advises setting the token as an environment variable on each machine instead of committing it in a shared MCP config file. github.com

  • Your full API docs go to your AI provider

    The AI reads the project's whole spec, including internal endpoints. Only connect projects you are happy to share with your AI provider. docs.apifox.com

  • The current code is not on GitHub

    npm has releases up to October 2026, but the public repo was last updated in March 2025. You cannot review the code you run. registry.npmjs.org

Security advisories

No published security advisories as of Nov 1, 2026.

Technical details
Turning on read-onlyThe server only reads and refreshes API docs; it has no tools that change your Apifox project.
Talks toApifox API (or your self-hosted Apifox server). Any OpenAPI URL you give it
Sign-in and keysYour Apifox access token sits in the MCP config or an environment variable on your computer.
Scopes
  • Read access to the API docs of the Apifox projects your access token can reach

Alternatives

Use Apifox's own server unless your project is too big for it. A community server that fetches only the endpoints you ask for is the pick for large or multi-module projects.

ServerOfficialRunsSign-inToolsWeekly downloads
For Apifox
Apifox MCP ServerThis pageOfficialLocalAccess token31.8K/wk
Other tools for the same job
apifox-filter-mcp-serverCommunityLocalAccess token–45/wk

What people say

People like having the AI read their real API docs, and complain that big projects are read only in part.

What people like

  • Gives the AI your real API definitions when it writes models and request code
  • Same setup works in Claude Code and Cursor

Common complaints

  • Large projects are cut off or read only in part
  • Only the first module of a multi-module project shows up
  • Endpoints in folders are missed
  • Tool names change between restarts when reading an OpenAPI file
  • Fails to start in Codex
  • Breaks behind corporate HTTP proxies

In their words

Questions

Do I need an Apifox account?

Only to read docs from an Apifox project, which needs a personal access token. Published docs and OpenAPI files work without one.

Why does the AI see old API docs?

The server keeps a local copy. Ask the AI to refresh the API docs after you change them in Apifox.

Can it change or sync my API docs in Apifox?

No. It only reads and refreshes docs, so it cannot edit your project.

Why are some endpoints missing?

Users report large projects being cut off, only the first module showing, and endpoints inside folders missing. These reports are still open on GitHub.

Why do I get a 401 or permission error?

Check your access token first. One user fixed it by making sure their account had at least Editor access to the project.

Can I use it with a Swagger or OpenAPI file?

Yes. Give it a local path or URL instead of a project ID, and no Apifox account is needed.

How do I use several Apifox projects?

Add one server entry per project, each with its own project ID. Apifox suggests a name like "API docs" rather than "Apifox" so the AI knows what it is for.

Does it work with self-hosted Apifox?

Yes. Add your server's API address with the base URL option shown in the install box.

Does it work in Codex or Claude Code?

Apifox only documents Cursor and Cline. Users say the same setup works in Claude Code but fails to start in Codex.

Examples

  • Generate model code from the API docs

    Get the API docs through MCP, then generate the Product model and related model definitions

    Source
  • Add newly documented fields to a DTO

    Based on the API docs, add the new fields to the Product DTO

    Source
  • Comment every field from the docs

    Based on the API docs, add a comment to every field of the Product class

    Source
  • Generate all MVC code for one endpoint

    Based on the API docs, generate all the MVC code for the /users endpoints

    Source

Information

updated Nov 1, 2026

Publisher
Official
Package
apifox-mcp-server
Registry
npm
Transport
stdio
Auth
token in env
Version
0.0.18
License
ISC
Last commit
Mar 26, 2025

DocsGitHubnpm

Other Apifox MCP servers

Sources

Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.

Show all 13
  1. apifox/apifox-mcp-server · github.com
  2. Apifox MCP Server · docs.apifox.com
  3. 项目中多个模块,只能查找到第一个模块的接口 · github.com
  4. 为什么接口总是被截取? · github.com
  5. apifox-mcp-server on npm · registry.npmjs.org
  6. 在codex中使用报错,无法初始化成功! · github.com
  7. 同步接口 · github.com
  8. 服务打印了日志导致cursor报错非法json · github.com
  9. mcp只能请求到根目录到接口 · github.com
  10. 每次加载MCP服务都会随机重置Tool名字 · github.com
  11. Squid proxy error · github.com
  12. npm weekly downloads · api.npmjs.org
  13. apifox-filter-mcp-server on npm · registry.npmjs.org

Facts from the official MCP registry, GitHub, npm, PyPI and the Docker catalog. Updated Nov 1, 2026.