ApiPost MCP logo

ApiPost MCP

Community
jlcodes99

ApiPost API management tool based on MCP (Model Context Protocol), supporting complete interface documentation management and team collaboration. Features intelligent search, batch operations, and security management.

Publisherjlcodes99
Repositoryapipost-mcp
LanguageJavaScript
Forks
11
Stars
42
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    ApiPost MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    42 stars and 11 forks from the linked repository.

ApiPost MCP

基于 MCP 协议和 ApiPost 官方 OpenAPI 实现的 API 管理工具。

功能

  • 连接测试 - 一键验证MCP服务器状态和配置
  • 工作空间管理 - 查看、切换团队和项目工作空间
  • 目录管理 - 创建API文档目录,支持层级结构
  • API接口管理 - 创建、查看、修改、删除接口文档
  • 增量更新 - 支持字段级别的精确更新和删除
  • 层级搜索 - 强化的目录层级搜索和父子关系定位
  • 递归浏览 - 递归搜索子目录,支持深度限制
  • 多维筛选 - 多维度搜索和批量操作
  • 结构化显示 - 树形结构和分组显示
  • 路径导航 - 完整路径显示,快速定位
  • 权限管理 - 多种安全模式,灵活的操作权限控制

安装

环境要求

在开始安装之前,请确保您的系统已安装以下环境:

环境版本要求说明
Node.js>= 18.0.0JavaScript 运行环境(MCP SDK 官方最低要求)
npm>= 8.0.0Node.js 包管理器(通常随 Node.js 一起安装)

环境安装指南

Node.js 安装:

  • 访问 Node.js 官网 下载 LTS 版本
  • 或使用包管理器:
    bash
    # macOS (使用 Homebrew)
    sudo brew install node
    
    # Ubuntu/Debian
    sudo apt update && sudo apt install nodejs npm
    
    # CentOS/RHEL
    sudo yum install nodejs npm

验证安装:

bash
node --version   # 应显示 v18.0.0 或更高版本
npm --version    # 应显示 8.0.0 或更高版本

开始安装

bash
git clone https://github.com/jlcodes99/apipost-mcp.git
cd apipost-mcp
npm install && npm run build

配置

在 MCP 配置文件中添加:

json
{
  "mcpServers": {
    "apipost": {
      "command": "node",
      "args": ["/absolute/path/to/apipost-mcp/dist/index.js"],
      "env": {
        "APIPOST_TOKEN": "your_access_token_here",
        "APIPOST_HOST": "https://open.apipost.net",
        "APIPOST_SECURITY_MODE": "limited",
        "APIPOST_DEFAULT_TEAM_NAME": "你的团队名称",
        "APIPOST_DEFAULT_PROJECT_NAME": "你的项目名称",
        "APIPOST_URL_PREFIX": "接口前缀可定义常量比如{{host}}"
      }
    }
  }
}

环境变量

变量名是否必需说明
APIPOST_TOKEN是API访问令牌
APIPOST_SECURITY_MODE否安全模式:readonly, limited, full
APIPOST_DEFAULT_TEAM_NAME否默认团队名称
APIPOST_DEFAULT_PROJECT_NAME否默认项目名称
APIPOST_URL_PREFIX否接口URL前缀,自动拼接到所有新建/修改的接口路径,如 {{host}}

安全模式说明

模式权限说明
readonly只读仅允许查看接口列表和详情,禁止创建、修改、删除
limited读写允许查看、创建、修改接口,禁止删除操作
full完全访问允许所有操作,包括查看、创建、修改、删除

可用工具

工具功能主要参数
apipost_test_connection连接测试random_string
apipost_workspace工作空间管理action (必需)
apipost_create_folder创建目录name, parent_id
apipost_smart_create创建接口method, url, name
apipost_list强化列表搜索search, parent_id, target_type, show_structure, recursive, group_by_folder
apipost_detail查看详情target_id
apipost_update修改接口target_id, 其他可选
apipost_delete删除接口api_ids

apipost_test_connection 说明

快速诊断工具,适合首次使用或故障排查:

  • ✅ 验证MCP服务器连接状态
  • 🔧 检查环境变量配置
  • 🏢 显示当前工作空间信息
  • 🛠️ 检查操作权限和安全模式
  • 📊 提供系统环境详情

apipost_workspace 说明

统一的工作空间管理工具,支持以下操作:

Action功能主要参数说明
current查看当前工作空间show_all显示当前团队、项目信息,可选显示所有可用选项
list_teams列出团队show_details显示所有可用团队,标识当前团队
list_projects列出项目team_id, show_details显示指定团队的项目列表
switch切换工作空间team_id, project_id 或 team_name, project_name切换到指定的团队和项目

使用示例:

# 查看当前工作空间
apipost_workspace action: "current"

# 列出所有团队
apipost_workspace action: "list_teams" show_details: true

# 列出项目
apipost_workspace action: "list_projects" team_id: "your_team_id"

# 切换工作空间(支持按名称或ID)
apipost_workspace action: "switch" team_name: "团队名" project_name: "项目名"

apipost_create_folder 说明

API文档目录创建工具,支持在指定父目录下创建新的文件夹:

参数类型必需说明
namestring是目录名称
parent_idstring否父目录ID,使用"0"表示根目录,默认为"0"
descriptionstring否目录描述(可选)

使用示例:

# 在根目录创建目录
apipost_create_folder name: "用户管理" description: "用户相关接口"

# 在指定目录下创建子目录
apipost_create_folder name: "认证接口" parent_id: "folder_123" description: "用户认证相关接口"

apipost_list 参数说明

参数类型说明
searchstring搜索关键词(接口名称、URL、方法、ID、描述)
parent_idstring父目录ID,精确查找子项目。"0"为根目录
target_typestring类型筛选:api(仅接口)、folder(仅目录)、all(全部)
show_structureboolean显示树形结构,默认false为列表模式
show_pathboolean显示完整路径,默认false
recursiveboolean递归搜索子目录,默认false
depthnumber深度限制(配合recursive),默认无限制
group_by_folderboolean按目录分组显示,默认false
limitnumber显示数量限制(默认50,最大200)
show_allboolean显示全部(忽略limit限制)

apipost_smart_create 说明(字段列表驱动)

规则(强制):

  • responses 只传 fields,不要传 data;所有字段(含父级)必须带 desc。
  • headers/query/body/cookies 用字段列表字符串,嵌套用 .,数组用 [](如 meta.flags.debug、items[].id),example 填真实值,不要放 JSON 字符串。
  • 父级需显式声明并写 desc,示例:{"key":"data","type":"object","desc":"返回体"},{"key":"data.user","type":"object","desc":"用户"},{"key":"data.user.id","type":"integer","example":1,"desc":"用户ID"}。
  • 可选 APIPOST_INLINE_COMMENTS=true 时,raw 会按 desc 生成行内注释(mock 始终为纯 JSON)。
  • 可选 APIPOST_URL_PREFIX={{ajllxa}} 时,创建或更新接口时会将前缀自动拼接到 URL(避免手动重复填写路由常量)。

必填:method、url、name。其他字段(均为字符串化 JSON 数组/对象):

  • headers/query/body/cookies:[{"key":"X-Request-ID","type":"string","required":true,"example":"req-1","desc":"说明"}]
  • responses:[{"name":"成功","status":200,"fields":[{"key":"code","type":"integer","example":0,"desc":"状态码"},{"key":"data.items[].id","type":"string","example":"1","desc":"商品ID"}]}]
  • auth:{"type":"bearer","bearer":{"key":"your_token"}}

字段类型:string/integer/number/boolean/object/array/null

示例(嵌套):

json
"body": "[{\"key\":\"user.id\",\"type\":\"integer\",\"required\":true,\"example\":9001,\"desc\":\"用户ID\"},{\"key\":\"user.profile.tags[]\",\"type\":\"string\",\"example\":\"vip\",\"desc\":\"标签\"}]",
"responses": "[{\"name\":\"成功\",\"status\":200,\"fields\":[{\"key\":\"code\",\"type\":\"integer\",\"example\":0,\"desc\":\"状态码\"},{\"key\":\"data.user.profile.tags[]\",\"type\":\"string\",\"example\":\"vip\",\"desc\":\"标签\"}]}]"

获取 Token

  1. ApiPost OpenApi官方文档查看
  2. 用户api_token。获取方式:Apipost客户端>工作台>项目设置>对外能力>open API

📝 更新日志

查看 CHANGELOG.md 了解版本更新信息。


💡 提示:这是一个专注于API接口管理的MCP工具,简化了接口创建和管理流程,提高团队协作效率。

联系方式

相关链接

⭐ 如果这个项目对你有帮助,请给我们一个星标!

Installation

TypingMind
{
  "mcpServers": {
    "apipost-mcp": {
      "command": "node",
      "args": [
        "/absolute/path/to/apipost-mcp/dist/index.js"
      ]
    }
  }
}

Use ApiPost MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once ApiPost MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add ApiPost MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the ApiPost MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "apipost-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "apipost-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the ApiPost MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the ApiPost MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use ApiPost MCP to help me with this task?
ApiPost MCP
Sure. I read it.
Here is what I found using ApiPost MCP.

Frequently asked questions

What is the ApiPost MCP MCP server used for?

ApiPost MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use ApiPost MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use ApiPost MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use ApiPost MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With ApiPost MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect ApiPost MCP MCP to TypingMind?

ApiPost MCP runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does ApiPost MCP MCP provide in TypingMind?

ApiPost MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use ApiPost MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If ApiPost MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇