Skip to main content

MCP Server Generation Overview

The Model Context Protocol (MCP) allows AI applications like Claude Desktop, VS Code, and Cursor to connect seamlessly with external APIs as tools. These AI applications are called MCP Clients and they connect to your APIs via MCP Servers.

If you already use APIMatic for developer portals, MCP server generation requires minimal additional effort and immediately unlocks AI integration capabilities for your API ecosystem.

note

The APIMatic MCP Server Generator is currently in active development. Contact the APIMatic team at support@apimatic.io to join the alpha program and get early access.

How It Works

The MCP Server Generator integrates directly into your existing APIMatic workflow:

Unified Input → Multiple Outputs

  • From a single API specification, APIMatic generates SDKs, Developer Portals, and now MCP Servers. MCP Server generation fits seamlessly into your Docs-as-Code workflow, the same one used for Developer Portal and SDK generation.
  • Your API definition may need some enhancements before enabling MCP Server generation. Consult with the APIMatic team to learn more about OpenAPI optimization for MCP Server generation.

Built on your TypeScript SDK

  • The generated MCP Server builds on your existing TypeScript SDK, ensuring stability, consistency, and minimal additional maintenance.

Core Capabilities

OpenAPI Feature Translation

  • Complex Schema Support: Handles anyOf with or without discriminators
  • Authentication Support: Supports common authentication schemes like API Key, OAuth2 (Client Credentials & Resource Owner Password), and custom auth types that use headers, query or form parameters

Ready-to-Use Artifacts

  • Comprehensive documentation: Auto-generated README with setup instructions for popular AI applications like Claude Desktop, VS Code, and Cursor
  • Flexible deployment: Supports both local (stdio) and remote (HTTP) operation modes

Context Management

  • Tool filtering: For large APIs with many endpoints, enabling all available tools in an MCP Server can overwhelm large language models. Use endpoint tags to control which tools are exposed, helping manage context and prevent overload.

Publishing and Distribution

  • Distributable as an npm package: Each generated MCP server includes a package.json file, making it convenient to publish as an npm package.
  • Local installation: Users can install the npm package via npm install or run with npx

Enable MCP Server Generation

note

To request access to the MCP server generator, please reach out to support@apimatic.io.

Add the following configuration to your APIMATIC-BUILD.json file under the generatePortal section:

{
"generatePortal": {
"mcpServer": {
"isEnabled": true
}
}
}

After regenerating your portal, your generated MCP server can be found under the static/ directory in a new folder named mcp-server/.