Token导航 LogoToken导航TokenDH.com
API Mind MCP logo
开发工具未说明官方级别未说明来源级核验

API Mind MCP

MCP Server

api-mind MCP Server是一个用于从.mind规范文件中发现API的服务,支持与Claude Code、Claude Desktop和任何MCP兼容的AI助手一起使用。

工具数

4

提示词数

0

GitHub Stars

0

资源数

0
开发工具TypeScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

msegoviadev

提供方

msegoviadev

最后核验

2026/5/17 20:23

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

api mind MCP服务器

用于从中发现API的MCP服务器 .mind 规范文件。可与Claude Code、Claude Desktop和任何兼容MCP的AI助手配合使用。

快速开始

# 1. Install spec-mind to generate .mind files from OpenAPI specs
brew install spec-mind

# 2. Run the setup script from your project directory
curl -fsSL https://raw.githubusercontent.com/msegoviadev/api-mind-mcp/main/setup-mcp.sh | bash

# 3. Add your OpenAPI specs and generate .mind files
mkdir specs
cp your-api.yaml specs/
spec-mind sync --no-notation ./specs/

# 4. Restart Claude Code

在克劳德代码中:

What APIs are available?
Show me the endpoints for payments
Call GET /payments/{id} in dev

______________________________________________________________________

安装

先决条件

安装 规格思维 生成 .mind OpenAPI规范中的文件:

brew install spec-mind

设置

setup-mcp.sh 从您的项目目录:

curl -fsSL https://raw.githubusercontent.com/msegoviadev/api-mind-mcp/main/setup-mcp.sh | bash

或用于用户范围的安装(所有项目):

curl -fsSL https://raw.githubusercontent.com/msegoviadev/api-mind-mcp/main/setup-mcp.sh | bash -s -- --global

脚本:

  • 创建一个 specs/ 项目中的目录
  • 在Claude Code中使用正确的规范路径注册api mind
  • 支架 ~/.config/api-mind/dev.env 对于环境默认值

______________________________________________________________________

用法

1.添加您的API规格

# Copy your OpenAPI/Swagger YAML/JSON files to specs/
cp your-api.yaml specs/

2.生成.mind文件

spec-mind sync --no-notation ./specs/

3.在克劳德代码中使用

User: "What APIs are available?"
Claude: *uses list_apis tool*
"Found 2 APIs: ecommerce, payments"

User: "Show me payment endpoints"
Claude: *uses list_endpoints tool*
"POST /payments [auth: oauth2]
 GET /payments/{id}"

User: "Call GET /payments/{id} in dev"
Claude: *uses get_endpoint_schema + get_call_context tools*
"Resolved base URL: https://api.dev.example.com
 Calling GET /payments/123..."

______________________________________________________________________

工具

list_apis

列出从specs文件夹加载的所有API。

Input: none
Output: JSON with API names, titles, base URLs, and environments

list_endpoints

列出所有API的端点。

Input:
  filter (optional): Substring match on method, path, or section
Output: JSON with environments and endpoint list

get_endpoint_schema

返回端点的完整上下文。

Input:
  api: API name
  method: HTTP method
  path: Endpoint path
Output: Text block with base URL, environments, auth, and schema

在构造curl之前调用以了解端点契约。

get_call_context

返回执行API调用所需的运行时上下文。

Input:
  api: API name
  env (optional): Environment to use (dev, stage, uat). Defaults to dev.
Output: Resolved base URL, active environment, and default values for credentials and parameters

当用户想要实际调用端点时,在构造curl之前调用此函数。 阅读来源 ~/.config/api-mind/.env~/.config/api-mind//.env.

______________________________________________________________________

身份验证模式

get_endpoint_schema 显示身份验证要求,构造标头:

架构中的身份验证curl标头
None无标题
bearer-H 'Authorization: Bearer '
oauth2 -H 'Authorization: Bearer '
api_key -H ': '
basic-H 'Authorization: Basic '

______________________________________________________________________

环境默认值

get_call_context 从以下位置读取默认值 ~/.config/api-mind/:

~/.config/api-mind/
  dev.env        # base defaults for all APIs (dev environment)
  stage.env      # base defaults for stage
  auth0/
    dev.env      # API-specific overrides for auth0

.env 文件用途 key=value 格式(以开头的行 # 被忽略)。这 base_url 键会覆盖规范中的占位符URL。

示例 ~/.config/api-mind/dev.env:

base_url=https://api.dev.example.com
auth0_client_id=abc123
auth0_cacert=/etc/ssl/cert.pem

setup-mcp.sh 在第一次运行时脚手架此文件。

______________________________________________________________________

工作流程

list_apis → list_endpoints → get_endpoint_schema → get_call_context → [LLM constructs curl] → bash
  1. list_apis -发现可用的API
  2. list_endpoints -查找相关端点
  3. get_endpoint_schema -获取端点合约(URL、身份验证、模式)
  4. get_call_context -解析目标环境的基本URL和凭据
  5. LLM使用解析值构造curl命令
  6. LLM通过执行 bash 工具

______________________________________________________________________

高级配置

Manual installation and team setup

手动安装

claude mcp add --transport stdio api-mind \
  --env SPECS_DIR=/absolute/path/to/specs \
  -- npx -y @msegoviadev/api-mind-mcp

重要提示: 始终使用绝对路径。MCP服务器作为独立进程运行,没有项目上下文。

项目配置(.mcp.json)

创建 .mcp.json 在项目根目录中:

{
  "mcpServers": {
    "api-mind": {
      "command": "npx",
      "args": ["-y", "@msegoviadev/api-mind-mcp"],
      "env": {
        "SPECS_DIR": "/absolute/path/to/specs"
      }
    }
  }
}

注: 每个团队成员都需要自己的 .mcp.json 他们的绝对道路。添加 .mcp.json.gitignore.

______________________________________________________________________

发展(贡献者)

git clone https://github.com/msegoviadev/api-mind-mcp
cd api-mind-mcp
npm install
npm run build

# Test locally
node dist/index.js /path/to/specs

______________________________________________________________________

相关

许可证

麻省理工学院

目录标签

目录标签

开发工具TypeScriptClaudeAPI发现本地部署OpenAPI规范AI助手集成

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

4

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP