npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

apifox-import-mcp

v1.0.1

Published

MCP server for importing OpenAPI data to Apifox

Readme

MCP Apifox Import Server

一个基于 MCP (Model Context Protocol) 的服务器,用于将 OpenAPI 3/Swagger 2 格式数据导入到 Apifox 平台。

快速开始

Claude Desktop 配置

mcp.json 中添加:

{
  "servers": {
    "apifox-import": {
      "command": "npx",
      "args": ["-y", "apifox-import-mcp", "--project-id", "<your-project-id>"],
      "env": {
        "APIFOX_ACCESS_TOKEN": "<your-access-token>"
      }
    }
  }
}

功能特性

  • 支持 OpenAPI 3 和 Swagger 2 格式数据导入
  • 提供丰富的导入选项(目录、覆盖行为、分支等)
  • 基于 stdio 的 MCP 传输方式

获取 Apifox 访问令牌

  1. 登录 Apifox
  2. 进入「开放平台」
  3. 创建系统级访问令牌
  4. 将令牌复制到 mcp配置 文件中

获取 Apifox 项目 ID

项目 ID 可以从 Apifox 项目 URL 中获取:

  1. 在 Apifox 中打开您的项目
  2. 浏览器地址栏的 URL 格式为:https://app.apifox.com/project/{projectId}/...
  3. {projectId} 部分即为项目 ID

开发

# 构建
npm run build

# 运行
npm start

# 开发模式(构建后运行)
npm run dev

# 监听模式
npm run watch

MCP 工具

import-openapi

将 OpenAPI 3/Swagger 2 数据导入到 Apifox 项目。项目 ID 需要在 MCP 配置中设置。

参数

  • input (必填): OpenAPI 数据,支持以下格式:
    • string: JSON/YAML 格式的 OpenAPI 数据字符串
  • options (可选): 导入配置选项
    • targetEndpointFolderId: 目标接口目录 ID
    • targetSchemaFolderId: 目标数据模型目录 ID
    • endpointOverwriteBehavior: 接口覆盖行为
    • schemaOverwriteBehavior: 数据模型覆盖行为
    • updateFolderOfChangedEndpoint: 是否更新接口目录
    • prependBasePath: 是否添加基础路径
    • targetBranchId: 目标分支 ID
    • moduleId: 目标模块 ID

示例

{
  "input": "{\"openapi\":\"3.0.1\",\"info\":{\"title\":\"API\"},\"paths\":{}}",
  "options": {
    "targetEndpointFolderId": 0,
    "endpointOverwriteBehavior": "OVERWRITE_EXISTING"
  }
}

许可证

MIT