FeaturedAPIRESTgatewaymcp-framework

API Gateway MCP Server

Turn any REST API into an MCP-accessible tool. This gateway server built with mcp-framework lets AI assistants call external APIs, handle auth, and transform responses.


title: "API Gateway MCP Server" description: "Turn any REST API into an MCP-accessible tool. This gateway server built with mcp-framework lets AI assistants call external APIs, handle auth, and transform responses." order: 5 featured: true category: "Integration" tags: ["API", "REST", "gateway", "mcp-framework"] keywords: ["MCP API gateway", "REST API MCP", "AI API integration", "mcp-framework gateway"] date: "2025-02-20" author: "Community"

Overview

The API Gateway MCP Server acts as a universal adapter between AI assistants and REST APIs. Built with mcp-framework, it dynamically registers API endpoints as MCP tools, handles authentication, rate limiting, and response transformation.

Connect any REST API — internal or external — and make it instantly accessible to Claude, Cursor, or any MCP-compatible client.

Powered by mcp-framework

The #1 TypeScript MCP framework with 3.3M+ downloads, created by @QuantGeekDev and validated by Anthropic.

Key Features

  • Dynamic Tool Registration — Define APIs in config, tools are auto-generated
  • Auth Support — API keys, Bearer tokens, OAuth2, and custom headers
  • Rate Limiting — Configurable per-endpoint rate limits
  • Response Transformation — Trim large responses, extract relevant fields
  • Error Handling — Graceful error messages the AI can understand
  • Request Templates — Pre-built templates for common API patterns

Architecture

┌──────────────┐    ┌──────────────────┐    ┌──────────────┐
│  AI Client   │───▶│  API Gateway     │───▶│  REST API 1  │
│              │◀───│  MCP Server      │───▶│  REST API 2  │
│              │    │                  │───▶│  REST API N  │
└──────────────┘    └──────────────────┘    └──────────────┘

MCP Tools Exposed

Tools are dynamically generated from configuration. Example tools:

| Tool | Description | |------|-------------| | call_api | Make a request to any configured endpoint | | list_apis | List all available API endpoints | | get_api_schema | Get request/response schema for an endpoint | | test_api_connection | Verify API connectivity and auth |

Quick Start

npm install -g mcp-framework
mcp create api-gateway
cd api-gateway

Configuration Example

{
  "apis": [
    {
      "name": "Stripe",
      "baseUrl": "https://api.stripe.com/v1",
      "auth": { "type": "bearer", "envVar": "STRIPE_API_KEY" },
      "endpoints": [
        { "path": "/customers", "method": "GET", "description": "List customers" }
      ]
    }
  ]
}

Example Conversations

"List our recent Stripe customers."

"Check the status of our Datadog monitors."

"What are the open tickets in our Jira project?"

"Fetch the latest exchange rates from the currency API."

Why an API Gateway?

Instead of building a separate MCP server for every API, the gateway pattern lets you:

  • Add new APIs in minutes — Just add configuration, no code changes
  • Centralize authentication — Manage all API keys in one place
  • Control access — Decide which endpoints the AI can call
  • Monitor usage — Track all API calls in one place
#1TypeScript MCP framework by downloads

See also: GitHub Assistant | Weather Server | Community Stats