Enables AI agents to explore OpenAPI specifications, search endpoints, and generate TypeScript type definitions for frontend integration.
Also known as ycs77/apifable, @iflow-mcp/ycs77-apifable
- Stars
- 10
- Tools
- 8
- Downloads, 30 days
- 38
- Latest version
- —
- Last commit
- Oct 21, 2026
- License
- MIT
What is apifable MCP?
apifable enables AI agents to explore OpenAPI specifications, search endpoints, and generate TypeScript type definitions for frontend integration. It exposes 8 tools, such as tag, limit, offset.
Summary generated from the project's README
About apifable MCP server
Helping AI agents integrate APIs into TypeScript frontend projects is the primary function of apifable. It provides the necessary context for agents to understand API structures, search for specific endpoints, and generate accurate code. Developers can connect this server to clients like Claude, Cursor, and Windsurf to bridge the gap between OpenAPI specifications and frontend implementation.
The server supports OpenAPI 3.0 and 3.1 standards and can work with local files or remote URLs. Users can configure the setup using a configuration file and manage sensitive authentication through a separate local file. It includes specialized tools such as get_spec_info for high-level overviews, search_endpoints for finding specific paths, and get_types to produce TypeScript declarations. This allows an AI to move from exploring a specification to writing functional integration code without manual data entry.
What you can do with it
- 1Explore API structuresAn AI agent can use the server to understand the general shape and version of an unfamiliar API specification.
- 2Search for specific endpointsA developer can ask an AI to find all API paths related to a specific keyword or category.
- 3Generate TypeScript definitionsYou can instruct an AI to create ready-to-use TypeScript types based on specific API schemas or endpoints.
- 4Automate frontend feature implementationAn AI can use endpoint details and generated types to write the code required for a new UI component.
Written from the project's README. Every use case is checked against a quote from it.
How to install apifable MCP
Formats verified 10 Nov 2026Add to CursorAdd to GooseInstall apifable MCP in Claude Code
$ claude mcp add apifable -- npx -y @iflow-mcp/ycs77-apifableInstall apifable MCP in Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"apifable": {
"command": "npx",
"args": [
"-y",
"@iflow-mcp/ycs77-apifable"
]
}
}
}Install apifable MCP in VS Code
.vscode/mcp.json
{
"servers": {
"apifable": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@iflow-mcp/ycs77-apifable"
]
}
}
}Install apifable MCP in VS Code CLI
$ code --add-mcp '{"name":"apifable","type":"stdio","command":"npx","args":["-y","@iflow-mcp/ycs77-apifable"]}'Install apifable MCP in Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"apifable": {
"command": "npx",
"args": [
"-y",
"@iflow-mcp/ycs77-apifable"
]
}
}
}Install apifable MCP in Codex
$ codex mcp add apifable -- npx -y @iflow-mcp/ycs77-apifableInstall apifable MCP in Codex config.toml
~/.codex/config.toml
[mcp_servers.apifable] command = "npx" args = ["-y", "@iflow-mcp/ycs77-apifable"]
Install apifable MCP in Gemini CLI
$ gemini mcp add -s user apifable npx -- -y @iflow-mcp/ycs77-apifableInstall apifable MCP in Gemini settings.json
~/.gemini/settings.json
{
"mcpServers": {
"apifable": {
"command": "npx",
"args": [
"-y",
"@iflow-mcp/ycs77-apifable"
]
}
}
}apifable MCP tools 8
Detected from the READMEtaglimitoffsetquerymethodoperationIdnameschemas
Automated checks
Ran Nov 13, 2026Full report →Passed our automated checks. That is not a security audit: read the code and give the server the narrowest access it needs. How checks work
- Source repository linked and reachablePass
- Open source license (OSI)Pass
- Commit or release in the last yearPass
- Package name not close to a popular packagePass
- Remote endpoint uses HTTPSNot checked
- Destructive tools are labelledPass
- No hidden instructions to the modelPass
- No critical advisory in the package or its dependenciesNot checked
README
View on GitHub
apifable
Read the spec. Understand the API. Integrate with confidence.
English | 繁體中文
Overview
apifable is an MCP server that helps AI integrate APIs more smoothly into TypeScript frontend projects. It makes it easy to explore API structure, search endpoints, and generate TypeScript types, giving your AI agent the context it needs to write accurate integration code.
✨ Features
- 📦 AI-ready API context — give AI the structure it needs to understand and work with your API
- 📘 OpenAPI 3.0 / 3.1 support — works with standard specs as a reliable source of truth
- 🤖 MCP server for AI agents — plug into Claude, Cursor, and Windsurf
- 🔍 API exploration tools — browse endpoints, search by keyword, and inspect full request/response details
- 🏷️ TypeScript type generation — generate TypeScript type definitions ready to use in frontend code
Getting Started
Installation
Run apifable init to set up your project configuration:
npx apifable@latest init
This creates apifable.config.json in your project root. The config file should be committed to version control so the spec path is shared with your team.
After the command starts, you can choose between Manual file and Remote URL.
1. Manual file
Use this mode if your OpenAPI spec already lives in the project, or if you want to manage spec updates yourself.
init will ask for the local file path, such as openapi.yaml.
This generates the following apifable.config.json:
{
"spec": {
"path": "openapi.yaml"
}
}
You then need to place your OpenAPI spec at that path manually. When the backend API changes, you also need to update that file manually.
2. Remote URL
Use this mode if your OpenAPI spec is available from a stable remote URL, such as the OpenAPI spec endpoint provided by your backend API docs.
init will first ask for the remote URL, such as https://api.example.com/openapi.yaml (supports yaml and json files), and then ask for the local output path, such as openapi.yaml.
This generates the following apifable.config.json:
{
"spec": {
"path": "openapi.yaml",
"url": "https://api.example.com/openapi.yaml"
}
}
[!NOTE] In this mode,
initalso adds the downloaded local spec path to.gitignoreautomatically, because the file is intended to be refreshed from the remote source. Of course, you can decide for yourself whether to commit it to version control.
You can then run the following command to download the OpenAPI spec from the remote URL to your local path (spec.url → spec.path). Whenever the spec changes, just run it again to refresh:
npx apifable@latest fetch
Headers
For non-sensitive headers that can be shared with your team, add spec.headers to apifable.config.json:
{
"spec": {
"path": "openapi.yaml",
"url": "https://example.com/openapi.yaml",
"headers": {
"X-Api-Version": "2"
}
}
}
Auth Headers (Secret Tokens)
If downloading the remote OpenAPI spec requires authentication (private API), store secret headers in .apifable/auth.json. This file should not be committed to version control:
{
"headers": {
"Authorization": "Bearer YOUR_SECRET_TOKEN"
}
}
Both apifable.config.json and .apifable/auth.json support ${ENV_VAR} syntax in header values.
{
"headers": {
"Authorization": "Bearer ${MY_API_KEY}"
}
}
Headers Priority (highest to lowest)
.apifable/auth.jsonheaders (overrides same-named keys)apifable.config.jsonspec.headers
Claude Code
Add the following to your .mcp.json:
{
"mcpServers": {
"apifable": {
"command": "npx",
"args": ["-y", "apifable@latest", "mcp"]
}
}
}
For other AI agents such as Cursor and Windsurf, you can follow the same approach to configure apifable as an MCP server.
Usage
Here are some example prompts you can use to explore APIs and build features.
Explore the API
List all APIs
Show me APIs related to posts
List APIs under the Post tag
Show me the API details for post comments
Show me the API details for GET /posts/{id}/comments
Show me the API details for postComments
Build a feature
Implement the post comments feature
Post page: src/pages/posts/[id].tsx
Related APIs:
- GET /posts/{id}/comments (list post comments)
- POST /posts/{id}/comments (create a post comment)
[!TIP] When writing a prompt to build a feature, include relevant context: page paths, component locations, related APIs, and any patterns or examples to follow.
AI Agent Guidance
Add the following to your project's AGENTS.md to help AI agents use apifable more effectively:
## API Integration
- **Apifable-first:** MUST use Apifable MCP tools to obtain OpenAPI metadata, endpoint details and TypeScript types; MUST NOT read `openapi.yaml` directly.
The above is a recommended starting point. Feel free to adjust the prompt as needed.
MCP Tools Reference
get_spec_info
Returns the API title, version, description, servers, and all tags with their endpoint counts. Start here to understand the shape of an unfamiliar spec.
list_endpoints_by_tag
Inputs:
tag(string): The tag name to filter bylimit(number, optional): Max endpoints to returnoffset(number, optional): Number of endpoints to skip (default: 0)
Returns all endpoints belonging to the given tag. The response includes total, offset, and hasMore fields for pagination. Includes a warning when results exceed 30 items and no limit is specified.
search_endpoints
Inputs:
query(string): Keyword to search fortag(string, optional): Restrict search to a specific taglimit(number, optional): Max results to return (default: 10)
Keyword search across operationId, path, summary, and description. Results are ranked by relevance. If no exact matches are found, automatically falls back to fuzzy search. The response includes a matchType field ("exact" or "fuzzy"); fuzzy results also include a score field per result.
get_endpoint
Inputs (choose one):
method(string) +path(string): HTTP method and endpoint path (e.g.get+/users/{id})operationId(string): Operation ID (e.g.listUsers)
Returns the full endpoint object, including parameters, requestBody, and responses, with supported internal component $refs resolved inline.
search_schemas
Inputs:
query(string): Keyword to search forlimit(number, optional): Max results to return (default: 10)
Keyword search across schema name and description. Results are ranked by relevance. If no exact matches are found, automatically falls back to fuzzy search. The response includes a matchType field ("exact" or "fuzzy"); fuzzy results also include a score field per result. Empty results may also include a message field with guidance for the next step.
get_schema
Inputs:
name(string): Schema name fromcomponents/schemas
Returns the full schema with supported internal component $refs resolved.
get_types
Inputs (choose one mode):
schemas(string[]): Array of schema names fromcomponents/schemasmethod(string) +path(string): HTTP method and endpoint pathoperationId(string): Operation ID (e.g.listUsers)
Generates self-contained TypeScript declarations as code text. In endpoint mode it follows supported internal component $refs before collecting schema dependencies. It automatically includes transitive dependencies and does not include import statements.
Mode rules:
- Use exactly one mode per call:
schemas,method+path, oroperationId - Do not mix modes in the same call
Limitations
- External
$refs (e.g. references to other files or URLs) are not supported. - OpenAPI 2.0 (Swagger) is not supported. Only OpenAPI 3.0 and 3.1 specs are supported.
Sponsor
If you think this package has helped you, please consider Becoming a sponsor to support my work~ and your avatar will be visible on my major projects.
Credits
- @reapi/mcp-openapi — for the initial inspiration
License
Star History
apifable MCP questions
How do I add apifable MCP to Claude Code?
Run claude mcp add apifable -- npx -y @iflow-mcp/ycs77-apifable in your terminal. Add --scope user to make it available in every project.
How do I add apifable MCP to Cursor?
Open ~/.cursor/mcp.json and add the server under mcpServers, using the Cursor config shown in the install section above.
What tools does apifable MCP provide?
It exposes 8 tools, including tag, limit, offset, query, method.
Which OpenAPI versions are supported?
The server supports OpenAPI 3.0 and 3.1 specifications. OpenAPI 2.0 (Swagger) is not supported.
How can I handle authentication for private APIs?
You can store secret headers, such as Authorization tokens, in a .apifable/auth.json file which should not be committed to version control.
Can I use apifable with Cursor or Windsurf?
Yes, you can configure apifable as an MCP server for other AI agents like Cursor and Windsurf using the same approach as Claude.
Does it support external references in the spec?
No, external $ref links to other files or URLs are not supported.