api-mind
MCP server for API discovery from .mind spec files, enabling AI assistants to list, inspect, and call APIs defined in OpenAPI specs.
README
api-mind MCP Server
MCP server for API discovery from .mind spec files. Works with Claude Code, Claude Desktop, and any MCP-compatible AI assistant.
Quick Start
# 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
In Claude Code:
What APIs are available?
Show me the endpoints for payments
Call GET /payments/{id} in dev
Installation
Prerequisites
Install spec-mind to generate .mind files from your OpenAPI specs:
brew install spec-mind
Setup
Run setup-mcp.sh from your project directory:
curl -fsSL https://raw.githubusercontent.com/msegoviadev/api-mind-mcp/main/setup-mcp.sh | bash
Or for user-wide installation (all projects):
curl -fsSL https://raw.githubusercontent.com/msegoviadev/api-mind-mcp/main/setup-mcp.sh | bash -s -- --global
The script:
- Creates a
specs/directory in your project - Registers api-mind in Claude Code with the correct specs path
- Scaffolds
~/.config/api-mind/dev.envfor environment defaults
Usage
1. Add your API specs
# Copy your OpenAPI/Swagger YAML/JSON files to specs/
cp your-api.yaml specs/
2. Generate .mind files
spec-mind sync --no-notation ./specs/
3. Use in Claude Code
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..."
Tools
list_apis
Lists all APIs loaded from the specs folder.
Input: none
Output: JSON with API names, titles, base URLs, and environments
list_endpoints
Lists endpoints across all APIs.
Input:
filter (optional): Substring match on method, path, or section
Output: JSON with environments and endpoint list
get_endpoint_schema
Returns full context for an endpoint.
Input:
api: API name
method: HTTP method
path: Endpoint path
Output: Text block with base URL, environments, auth, and schema
Call before constructing curl to understand the endpoint contract.
get_call_context
Returns runtime context needed to execute API calls.
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
Call this before constructing curl when the user wants to actually invoke an endpoint.
Reads from ~/.config/api-mind/<env>.env and ~/.config/api-mind/<api>/<env>.env.
Auth Patterns
When get_endpoint_schema shows auth requirements, construct headers:
| Auth in Schema | curl Header |
|---|---|
None |
No header |
bearer |
-H 'Authorization: Bearer <TOKEN>' |
oauth2 <scopes> |
-H 'Authorization: Bearer <TOKEN>' |
api_key <header> |
-H '<header>: <KEY>' |
basic |
-H 'Authorization: Basic <base64>' |
Environment Defaults
get_call_context reads default values from ~/.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
Each .env file uses key=value format (lines starting with # are ignored). The base_url key overrides the placeholder URL from the spec.
Example ~/.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 scaffolds this file on first run.
Workflow
list_apis → list_endpoints → get_endpoint_schema → get_call_context → [LLM constructs curl] → bash
list_apis- Discover available APIslist_endpoints- Find relevant endpointsget_endpoint_schema- Get endpoint contract (URL, auth, schema)get_call_context- Resolve base URL and credentials for the target environment- LLM constructs curl command using resolved values
- LLM executes via
bashtool
Advanced Configuration
<details> <summary>Manual installation and team setup</summary>
Manual Installation
claude mcp add --transport stdio api-mind \
--env SPECS_DIR=/absolute/path/to/specs \
-- npx -y @msegoviadev/api-mind-mcp
Important: Always use absolute paths. MCP servers run as standalone processes without project context.
Project Configuration (.mcp.json)
Create .mcp.json in your project root:
{
"mcpServers": {
"api-mind": {
"command": "npx",
"args": ["-y", "@msegoviadev/api-mind-mcp"],
"env": {
"SPECS_DIR": "/absolute/path/to/specs"
}
}
}
}
Note: Each team member needs their own .mcp.json with their absolute path. Add .mcp.json to .gitignore.
</details>
Development (Contributors)
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
Related
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。