MCP.so
Sign In
Servers

MCP API Server

@qingtianyu

mcp server

Overview

What is MCP API Server?

MCP API Server is an enterprise-level microservice API server that integrates with the Model Context Protocol (MCP). It enables dynamic API tool registration and management, allowing existing RESTful APIs to be exposed as MCP tools. The server is built with TypeScript and targets developers who need to bridge MCP clients with custom backend services.

How to use MCP API Server?

Install Node.js 18+, npm 9+, and TypeScript 5.0+. Clone the repository, run npm install, then npm run build. Configure the server by setting the required environment variables (e.g., BASE_URL, CLIENT_ID, CLIENT_SECRET, ALLOWED_APIS) in the mcpServers section of your MCP client configuration. The server automatically discovers and registers API endpoints based on an OpenAPI specification and the ALLOWED_APIS filter list.

Key features of MCP API Server

  • MCP protocol integration with tool and resource support
  • Dynamic API tool registration via OpenAPI specification
  • Automatic parameter conversion from OpenAPI to MCP input schema
  • Security filtering to expose only safe API parameters
  • Built-in caching for API specification data
  • Error handling for stable tool invocation

Use cases of MCP API Server

  • Expose existing microservice endpoints as callable MCP tools
  • Enable AI assistants to interact with enterprise APIs via MCP
  • Quickly add MCP support to a RESTful backend without manual tool definitions
  • Automatically synchronize tool list with backend API changes using OpenAPI

FAQ from MCP API Server

What are the runtime requirements?

Node.js 18+, npm 9+, and TypeScript 5.0+ are required.

How do I control which API endpoints become MCP tools?

Set the ALLOWED_APIS environment variable with a comma-separated list of API paths (e.g., /admin-api/system/user/page). Only these endpoints will be exposed as MCP tools.

Does the server support authentication?

Yes. Authentication parameters like CLIENT_ID, CLIENT_SECRET, USERNAME, PASSWORD, and TENANT_ID can be provided via environment variables.

How does the server discover APIs without manual configuration?

It fetches an OpenAPI specification from the configured BASE_URL and automatically generates MCP tool definitions for the allowed endpoints. The specification data is cached for performance.

Is the server restricted to HTTP methods?

No. The server handles GET, POST, and PUT methods, mapping them to appropriate request invocations.

More from Developer Tools