OpenAPI Lambda MCP Server
Enables serverless deployment of OpenAPI MCP servers on AWS Lambda with API Gateway, allowing MCP clients to interact with OpenAPI-defined APIs through AWS infrastructure
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
OpenAPI MCP Server - AWS Lambda Deployment
Serverless deployment of the AWS Labs OpenAPI MCP Server on AWS Lambda with API Gateway.
Overview
This project wraps the awslabs openapi-mcp-server to run as a serverless Lambda function, enabling MCP (Model Context Protocol) clients to interact with OpenAPI-defined APIs through AWS infrastructure.
Architecture
Lambda Function: FastMCP server with HTTP transport (Starlette ASGI)
API Gateway: HTTP API exposing the MCP endpoints
Transport: Mangum ASGI adapter (no child process overhead)
Prerequisites
Python 3.12+
uv package manager
AWS CLI configured
AWS CDK CLI:
npm install -g aws-cdk
Local Setup
Install dependencies:
uv syncDeployment
1. Bootstrap CDK (first time only)
cdk bootstrap2. Deploy Stack
cd cdk
cdk deploy \
--parameters ApiName=MyAPI \
--parameters ApiBaseUrl=https://api.example.com \
--parameters ApiSpecUrl=https://api.example.com/openapi.json \
--parameters AuthType=noneConfiguration Parameters
ApiName: Display name for the APIApiBaseUrl: Base URL of the target APIApiSpecUrl: URL to the OpenAPI specification (JSON or YAML)AuthType: Authentication method (none,basic,bearer,api_key,cognito)
Additional Auth Configuration
Set environment variables in cdk/openapi_mcp_stack.py for authentication:
Basic Auth:
AUTH_USERNAMEAUTH_PASSWORD
Bearer Token:
AUTH_TOKEN
API Key:
AUTH_API_KEYAUTH_API_KEY_NAMEAUTH_API_KEY_IN(header/query/cookie)
Cognito:
AUTH_COGNITO_CLIENT_IDAUTH_COGNITO_USERNAMEAUTH_COGNITO_PASSWORDAUTH_COGNITO_USER_POOL_IDAUTH_COGNITO_REGION
3. Get API URL
After deployment, CDK outputs the API Gateway URL:
# Output example:
# OpenApiMcpStack.ApiUrl = https://abc123.execute-api.us-east-1.amazonaws.com/Testing
Test the deployed Lambda function:
curl -X POST https://<api-url>/message \
-H "Content-Type: application/json" \
-d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}'Performance Considerations
Cold Start: ~1-2 seconds (initializes MCP server + loads OpenAPI spec)
Warm Start: ~100-300ms (reuses server instance)
Timeout: 30 seconds (configurable in stack)
Memory: 512 MB (configurable in stack)
Cost Optimization
Requests: Pay per invocation
Memory/Duration: 512 MB x execution time
API Gateway: HTTP API (cheaper than REST API)
Development
Run MCP server locally:
uv run awslabs.openapi-mcp-server \
--api-name MyAPI \
--api-url https://api.example.com \
--spec-url https://api.example.com/openapi.jsonCleanup
cd cdk
cdk destroyLicense
This project includes code from awslabs/mcp licensed under Apache-2.0. See LICENSE and NOTICE files.
Related MCP Connectors
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Remote MCP for 1,500+ APIs. Vault-managed credentials; OAuth or API key. Search, load, and execute.
Unified MCP Server is a remote MCP connector for AI agents and vertical AI products that provides access to 22,000+ authorized SaaS tools across 400+ integrations and 24 categories directly inside LLMs (Claude, GPT, Gemini, Cohere). Tools operate only on explicitly authorized customer connections, enabling agents to safely read and write against live third-party systems.