MCP API Server

MCP API Server

mcp-server-qingtianyu•byqingtianyu

An enterprise microservice API server that supports MCP protocol extensions and dynamically exposes configured API endpoints as MCP tools.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Integrates the MCP protocol to support tool extension and resource access.
  • •Discovers and registers API endpoints as MCP tools automatically from an OpenAPI specification.
  • •Uses an allowlist to control which API endpoints are exposed as MCP tools.
  • •Registers a tool list and handles tool call requests by forwarding them to the matching API endpoint using the appropriate HTTP method.

BEST FOR

  • •Exposing selected backend API endpoints to MCP clients as callable tools.
  • •Teams that want MCP tools generated from an existing OpenAPI specification rather than configured manually.

ABOUT MCP-SERVER-QINGTIANYU

MCP API Server is cataloged as an MCP server attributed to qingtianyu. An enterprise microservice API server that supports MCP protocol extensions and dynamically exposes configured API endpoints as MCP tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP API Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does the server generate MCP tools automatically?

Yes. It discovers and registers API endpoints from an OpenAPI specification and automatically generates MCP tools without manual configuration.

How are exposed API endpoints controlled?

An ALLOWED_APIS list in the MCP server configuration determines which API endpoints can be exposed as MCP tools.

Upstream README

View this exact version on GitHub

README.md · 704aeb530a32 · Fetched 2026-11-13 12:40:26 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MCP API Server

Node.js Version TypeScript

企业级微服务API服务端,支持MCP协议扩展。

✨ 功能特性

  • MCP协议集成(支持工具扩展和资源访问)
  • 动态API工具注册
  • TypeScript强类型支持

🚀 快速开始

前置要求

  • Node.js 18+
  • npm 9+
  • TypeScript 5.0+

安装步骤

# 克隆仓库
git clone https://github.com/your-repo/mcp-api-server.git

# 安装依赖
npm install

# 生产环境构建
npm run build

MCP 配置参数

{
  "mcpServers": {
    "api-server": {
      "command": "node",
      "args": [
        "D:/api-server/build/index.js"
      ],
      "env": {
        "BASE_URL": "https://127.0.0.0:8080",
        "CLIENT_ID": "xxx",
        "CLIENT_SECRET": "xxx",
        "USERNAME": "xxx",
        "PASSWORD": "xxx",
        "TENANT_ID": "1",
        "REJECT_UNAUTHORIZED": "false",
        "ALLOWED_APIS": "/admin-api/system/user/page,/admin-api/system/user/create,/admin-api/system/user/update"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

配置说明

在 mcpServers 中配置 ALLOWED_APIS 数组来控制哪些API端点可以作为MCP工具暴露:

alt text

📂 项目结构

mcp-api-server/
├── build/          # 编译输出目录
├── src/            # 源代码
│   ├── config/     # 配置模块
│   ├── modules/    # 业务模块
│   └── tools/      # MCP工具协议
├── package.json
└── tsconfig.json

📡 MCP Tools

动态API工具系统

MCP-Server 实现了基于 OpenAPI 规范的动态工具发现和注册机制,无需手动配置即可自动生成 MCP 工具。

apiEndpoints.ts 功能说明

// 从OpenAPI规范自动获取API端点信息
const openApiData = await fetchOpenApiData();

// 根据配置的允许列表过滤API
const API_ENDPOINTS = Object.entries(openApiData.paths)
    .filter(([path]) => config.ALLOWED_APIS.includes(path))
    .map(([path, methods]) => {
        // 转换为标准工具格式
        return Object.entries(methods).map(([method, details]) => ({
            name: details.operationId,
            description: details.summary,
            inputSchema: details.parameters ? {
                type: 'object',
                properties: Object.fromEntries(details.parameters
                    .filter(isExposableParameter)
                    .map(transformParameterToProperty)
                )
            } : {},
            path: path,
            method: method.toUpperCase()
        }));
    }).flat();

tools/index.ts 工具注册机制

export function registerTools(server: Server) {
  // 注册可用工具列表
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
    tools: tools,
  }));

  // 处理工具调用请求
  server.setRequestHandler(CallToolRequestSchema, async (request) => {
    const endpoint = apiMap[request.params.name];
    
    // 根据HTTP方法类型动态处理请求
    if(endpoint.method === 'GET') {
      const response = await apiClient.get(endpoint.path, { params: request.params.arguments });
      return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
    } else if(endpoint.method === 'POST') {
      const response = await apiClient.post(endpoint.path, request.params.arguments);
      return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
    } else if(endpoint.method === 'PUT') {
      const response = await apiClient.put(endpoint.path, request.params.arguments);
      return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2) }] };
    }
  });
}

系统优势

  • 自动发现: 通过 OpenAPI 规范自动发现和注册API端点
  • 缓存机制: 实现了API规范数据的缓存,提高性能并处理网络异常
  • 参数转换: 自动将OpenAPI参数定义转换为MCP工具输入模式
  • 安全过滤: 过滤内部参数,只暴露安全的API参数
  • 错误处理: 完善的错误处理机制,确保工具调用稳定性
  • 工具注册: 自动注册可用工具列表,无需手动配置

🤝 贡献指南

  1. Fork项目仓库
  2. 创建特性分支 (git checkout -b feature/your-feature)
  3. 提交修改 (git commit -m 'Add some feature')
  4. 推送分支 (git push origin feature/your-feature)
  5. 创建Pull Request

📄 许可证

MIT License

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP API Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-qingtianyu)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools