API Docs MCP 4afb61ad

MCP文档知识

提供方 EliFuzz

文档知识 未标注 Token 社区 / 第三方

一个支持GraphQL、OpenAPI/Swagger和gRPC规范的API文档管理服务器,可从本地文件或远程URL获取并缓存模式定义,提供文档检索工具。

一句话选型结论

按资料字段整理

API Docs MCP 4afb61ad 属于文档知识类 MCP 服务器,传输方式未标注,Token,没有现成安装命令,需按官方文档接入。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类文档知识 传输方式未标注 鉴权Token 部署方式未标注
GitHub 星标 2 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

文档知识
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

API文档TypeScript本地部署GraphQLOpenAPIgRPC模式缓存

安装与配置

未标注 Token
上游未给出传输方式
  1. 1
    准备运行环境

    按官方文档确认运行环境(常见为 Node.js 或 Python),装好后再执行安装命令。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
文档检索问答

在你的文档库里按问题找答案。

知识库读写

把新资料写进知识库,随用随取。

内容整理

把零散资料归纳成结构化笔记。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 基础信息齐全,可以先按官方文档接入试跑。

先想清楚的地方

  • 没有现成安装命令,需要按官方文档自己填启动命令和参数。
  • 使用前要准备好Token对应的凭据,并按最小权限配置。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在文档知识场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 不方便管理密钥或第三方授权的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
API Docs MCP 4afb61ad当前 未标注 未标注 未标注 无 2026-05-17
dify 未标注 stdio · 本地进程 本地部署 有 2026-04-11
open-webui 未标注 stdio · 本地进程 本地部署 有 2026-04-11
JeecgBoot 未标注 stdio · 本地进程 本地部署 有 2026-04-11
Cherry Studio 未标注 未标注 未标注 无 2026-05-17
mempalace 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

文档知识
字段来自项目仓库与公开索引,中文说明由本站标注
提供方EliFuzz上游标注的维护方 EliFuzz
分类文档知识本站按上游分类展示
连接方式未标注上游未给出传输方式
鉴权方式Token远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型未标注上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

11.6 KB
来自项目仓库与上游目录的原文,未做删改

API Docs MCP

Model Context Protocol (MCP) server that provides tools for interacting with API documentation. Supports GraphQL, OpenAPI/Swagger, and gRPC specifications, fetching schema definitions from various sources (local files or remote URLs), caching them, and exposing them through a set of tools.

Table of Contents

  • API Docs MCP
  • Table of Contents
  • MCP Platforms
  • Features
  • Example Use Cases
    • OpenAPI Petstore retrieval docs
    • GraphQL retrieval docs
    • Multiple Sources retrieval docs
  • Architecture
  • Installation
  • Configuration
    • FileSource Example
    • UrlSource Example
    • Setting the API_SOURCES Environment Variable
  • Usage
    • API Docs Tool
    • API Search Tool
  • Development
    • Running the Server Locally
    • Project Structure
  • Contributing
  • License

MCP Platforms

Features

  • Dynamic Tool Registration: Automatically discovers and registers tools from a specified directory.
  • API Documentation Retrieval: Provides tools to list available API methods (api_docs) and retrieve detailed documentation for specific methods (api_search).
  • Schema Caching: Caches API schema information to reduce redundant fetches and improve performance.
  • Multiple Source Support:
  • GraphQL: Supports loading GraphQL schemas from graphql / gql files or json introspection results (local files or remote URLs).
  • OpenAPI/Swagger: Supports loading OpenAPI/Swagger yaml / yml / json schemas from local files or remote URLs.
  • gRPC: Supports loading gRPC schemas from proto files or via gRPC reflection from remote URLs.
  • Environment-based Configuration: Configures API sources via the API_SOURCES environment variable, allowing flexible deployment and management.
  • Automatic Cache Refresh: Periodically refreshes cached schema data to ensure up-to-date documentation.

Example Use Cases

OpenAPI Petstore retrieval docs

GraphQL retrieval docs

Multiple Sources retrieval docs

Architecture

The api-docs-mcp project is designed as an MCP server that integrates with various API documentation sources.```mermaid
graph TD
mcpServer[MCP Server] e1@--> tools(Tools:<br/>api_docs / api_search);
tools e2@--> cacheManager{Cache Manager};
cacheManager e3@--> configuration[Configuration:<br/>API_SOURCES env var];
configuration e4@--> schemaSources{Schema Sources};
schemaSources e5@-- FileSource--> localFiles(Local Files:<br/>.graphql, .json, .yaml, .proto);
schemaSources e6@-- UrlSource--> remoteUrls(Remote URLs:<br/>GraphQL Endpoints, OpenAPI/Swagger Endpoints, gRPC Endpoints);
localFiles e7@--> processor[Schema Processors];
remoteUrls e8@--> processor;
processor e9@--> cacheManager;
processor e10@--> openAPIProcessor(OpenAPI Processor:<br/>OpenAPI/Swagger);
processor e11@--> graphQLProcessor(GraphQL Processor);
processor e12@--> grpcProcessor(gRPC Processor)
cacheManager e13@--Cached Data--> tools;

subgraph Core Components
    mcpServer
    tools
    cacheManager
    configuration
end

subgraph Data Flow
    schemaSources
    localFiles
    remoteUrls
    processor
    openAPIProcessor
    graphQLProcessor
    grpcProcessor
end

e1@{ animate: true }
e2@{ animate: true }
e3@{ animate: true }
e4@{ animate: true }
e5@{ animate: true }
e6@{ animate: true }
e7@{ animate: true }
e8@{ animate: true }
e9@{ animate: true }
e10@{ animate: true }
e11@{ animate: true }
e12@{ animate: true }
e13@{ animate: true }

**Flow of Operations:**

1. **Server Initialization**: The `index.ts` entry point initializes the MCP server and dynamically registers tools defined in the `src/tools` directory.
2. **Configuration Loading**: The `CacheManager` loads API source configurations from the `API_SOURCES` environment variable via `src/utils/config.ts`.
3. **Schema Fetching &amp; Caching**:
   - Based on the configured sources (file-based or URL-based), the `CacheManager` fetches API schemas.
   - For file sources, it reads local files (`graphql`, `gql`, `json`, `yaml`, `yml`, `proto`).
   - For URL sources, it makes HTTP requests to GraphQL, OpenAPI, or gRPC endpoints.
   - Schemas are then processed by specialized handlers (`src/api/api.ts` for OpenAPI, `src/gql/gql.ts` for GraphQL, `src/grpc/grpc.ts` for gRPC).
   - The processed documentation is stored in an in-memory cache (`src/utils/cache.ts`) with a specified TTL (Time-To-Live).
   - The cache is periodically refreshed.
4. **Tool Usage**:
   - `api_docs`: When invoked, this tool retrieves a list of all available API resources from the cache, filtered by `source` if provided.
   - `api_search`: When invoked with a `detailName`, this tool provides detailed documentation (request, response, error structures) for a specific API resource from the cache.

## Installation

To set up the `api-docs-mcp` server, follow these steps:

1. **Clone the repository:**```bash
   git clone https://github.com/EliFuzz/api-docs-mcp.git
   cd api-docs-mcp
   ```

2. **Install dependencies:**```bash
   pnpm install
   ```

3. **Build the project:**```bash
   pnpm build
   ```

## Configuration

The server&#x27;s behavior is controlled by the `API_SOURCES` environment variable. This variable should contain a JSON string representing an array of `SchemaSource` objects. Each `SchemaSource` can be either a `FileSource` or a `UrlSource`.

### `FileSource` Example

For a local GraphQL schema:```json
{
  &quot;name&quot;: &quot;MyGraphQLFile&quot;,
  &quot;path&quot;: &quot;/path/to/your/schema.graphql&quot;,
  &quot;type&quot;: &quot;gql&quot;
}

For a local OpenAPI JSON schema:```json
{
"name": "MyOpenAPIFile",
"path": "/path/to/your/openapi.json",
"type": "api"
}


For a local gRPC proto file:```json
{
  &quot;name&quot;: &quot;MyGrpcFile&quot;,
  &quot;path&quot;: &quot;/path/to/your/service.proto&quot;,
  &quot;type&quot;: &quot;grpc&quot;
}

UrlSource Example

For a remote GraphQL endpoint:```json
{
"name": "GitHubGraphQL",
"method": "POST",
"url": "https://api.github.com/graphql",
"headers": {
"Authorization": "Bearer YOUR_GITHUB_TOKEN"
},
"type": "gql"
}


For a remote OpenAPI endpoint:```json
{
  &quot;name&quot;: &quot;PetstoreAPI&quot;,
  &quot;method&quot;: &quot;GET&quot;,
  &quot;url&quot;: &quot;https://petstore.swagger.io/v2/swagger.json&quot;,
  &quot;type&quot;: &quot;api&quot;
}

For a remote gRPC endpoint with reflection:```json
{
"name": "MyGrpcService",
"url": "grpc://localhost:9090",
"type": "grpc"
}


### Setting the `API_SOURCES` Environment Variable

You can set this in your shell before running the server:```bash
export API_SOURCES=&#x27;[{&quot;name&quot;: &quot;MyGraphQLFile&quot;, &quot;path&quot;: &quot;./example/fixtures/graphql/graphql-schema.graphql&quot;, &quot;type&quot;: &quot;gql&quot;}, {&quot;name&quot;: &quot;PetstoreAPI&quot;, &quot;method&quot;: &quot;GET&quot;, &quot;url&quot;: &quot;https://petstore.swagger.io/v2/swagger.json&quot;, &quot;type&quot;: &quot;api&quot;}]&#x27;

Or in mcp.json for MCP execution:```json
"api-docs-mcp": {
"type": "stdio",
"command": "npx",
"args": [ "api-docs-mcp" ],
"env": {
"API_SOURCES": "[{\"name\": \"MyGraphQLFile\", \"path\": \"./example/fixtures/graphql/graphql-schema.graphql\", \"type\": \"gql\"}, {\"name\": \"PetstoreAPI\", \"method\": \"GET\", \"url\": \"https://petstore.swagger.io/v2/swagger.json\", \"type\": \"api\"}]"
}
}


## Usage

Once configured and running, the `api-docs-mcp` server exposes two primary tools: `api_docs` and `api_search`.

### API Docs Tool

This tool provides a list of all available API methods from the configured sources.

**Name**: `api_docs`
**Description**: Get a list of all available API methods.
**Input Schema**:```typescript
{
    sourceName?: string; // The name of the API source (e.g., &quot;GitHub&quot;) from MCP configuration environment variables. If not provided, docs from all sources will be returned.
}

Output Schema:```typescript
{
sources: Array<{
sourceName: string; // The name of the source API
resources: Array<{
resourceName: string; // The name of the API resource
resourceType: string; // The type of the API resource (e.g., "POST", "GET", "mutation", "query")
resourceDescription: string; // A brief description of the API resource
}>;
}>;
}


**Output Example**:```json
{
  &quot;sources&quot;: [
    {
      &quot;sourceName&quot;: &quot;GitHubGraphQL&quot;,
      &quot;resources&quot;: [
        {
          &quot;resourceName&quot;: &quot;getUser&quot;,
          &quot;resourceType&quot;: &quot;query&quot;,
          &quot;resourceDescription&quot;: &quot;Fetch a user by username&quot;
        },
        {
          &quot;resourceName&quot;: &quot;createIssue&quot;,
          &quot;resourceType&quot;: &quot;mutation&quot;,
          &quot;resourceDescription&quot;: &quot;Create a new issue in a repository&quot;
        }
      ]
    },
    {
      &quot;sourceName&quot;: &quot;PetstoreAPI&quot;,
      &quot;resources&quot;: [
        {
          &quot;resourceName&quot;: &quot;getPetById&quot;,
          &quot;resourceType&quot;: &quot;GET&quot;,
          &quot;resourceDescription&quot;: &quot;Find pet by ID&quot;
        },
        {
          &quot;resourceName&quot;: &quot;addPet&quot;,
          &quot;resourceType&quot;: &quot;POST&quot;,
          &quot;resourceDescription&quot;: &quot;Add a new pet to the store&quot;
        }
      ]
    }
  ]
}

API Search Tool

This tool provides detailed documentation for a specific API method.

Name: api_search
Description: Search for a specific API method by name and get its full definition.
Input Schema:``typescript { resourceName: string; // The exact resource name of the API method to search for that was provided inapi_docs` tool's output
}


**Output Schema**:```typescript
{
  details: Array&lt;{
    sourceName: string; // The name of the source API
    resources: Array&lt;{
      resourceName: string; // The name of the resource
      resourceType: &quot;query&quot; | &quot;mutation&quot; | &quot;subscription&quot;; // The type of GraphQL resource
      resourceDescription: string; // Context or description of the resource
      details: {
        request?: string; // The request structure or input parameters for the API method
        response?: string; // The response structure or output format for the API method
        error?: string; // Error information or error handling details for the API method
      };
    }&gt;;
  }&gt;;
}

Output Example:```json
{
"details": [
{
"sourceName": "GitHubGraphQL",
"resources": [
{
"resourceName": "getUser",
"resourceType": "query",
"resourceDescription": "Fetch a user by username",
"details": {
"request": "{ username: String! }",
"response": "{ id: ID!, login: String!, name: String }",
"error": "{ message: String!, code: Int! }"
}
}
]
}
]
}


## Development

### Running the Server Locally

1. **Set the `API_SOURCES` environment variable** as described in the Configuration section.
2. **Start the server:**```bash
   pnpm start
   ```

The server will connect to a `StdioServerTransport`, meaning it will communicate over standard input/output.

### Project Structure```markdown
.
├── src/
│ ├── api/ # OpenAPI/Swagger schema processing
│ │ └── api.ts
│ ├── gql/ # GraphQL schema processing
│ │ └── gql.ts
│ ├── grpc/ # gRPC schema processing
│ │ └── grpc.ts
│ ├── tools/ # MCP tools definitions
│ │ ├── api_docs.ts
│ │ └── api_search.ts
│ ├── utils/ # Utility functions (cache, config, fetch, file, source)
│ │ ├── cache.ts
│ │ ├── config.ts
│ │ ├── fetch.ts
│ │ ├── file.ts
│ │ └── source.ts
│ ├── index.ts # Main entry point
│ └── server.ts # MCP server setup and tool registration
└── package.json # Project dependencies and scripts
└── README.md # This file

Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

常见问题

5 问
答案由本站依据条目字段整理,不引用上游原文
API Docs MCP 4afb61ad 怎么安装?

资料没有给出安装命令,请到官方仓库或文档按说明接入;这类条目多数是生态应用,或尚未发布可安装包。

API Docs MCP 4afb61ad 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

API Docs MCP 4afb61ad 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

API Docs MCP 4afb61ad 需要 API Key 吗?

资料标注需要Token认证,使用前准备好对应凭据,并按最小权限配置。

API Docs MCP 4afb61ad 能提供哪些能力?

资料显示能力标签包括 API文档、TypeScript、API集成、GraphQL。具体工具清单以官方文档为准。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。