MCP Lambda Server
A Lambda Layer that allows a lambda to operate as an MCP server
Overview
MCP Lambda Server is a Node.js package that provides infrastructure for Model Context Protocol (MCP) servers on AWS Lambda, enabling Server-Sent Events (SSE) support.
To use MCP Lambda Server, install the package via npm and create a Lambda function that imports the MCPHandlerFactory to handle requests and responses.
- Adapts the MCP TypeScript SDK for AWS Lambda - Supports Server-Sent Events (SSE) through Lambda response streaming - Handles CORS and HTTP method validation - TypeScript support for better development experience
- Building real-time applications that require live updates via SSE.
- Implementing custom business logic in AWS Lambda functions.
- Creating APIs that utilize the Model Context Protocol for structured data handling.
Add to your AI client
Use these steps to connect MCP Lambda Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"mcp-lambda-layer-markvp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-lambda-layer-markvp"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"mcp-lambda-layer-markvp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-lambda-layer-markvp"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"mcp-lambda-layer-markvp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-lambda-layer-markvp"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"mcp-lambda-layer-markvp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-lambda-layer-markvp"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"mcp-lambda-layer-markvp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-lambda-layer-markvp"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"mcp-lambda-layer-markvp": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-mcp-lambda-layer-markvp"
]
}
}
}FAQ
What is required for Lambda response streaming?
Response streaming only works with Function URLs and requires Node.js runtime.
Can I use this with API Gateway?
No, API Gateway and Application Load Balancer do not support response streaming.
Is there TypeScript support?
Yes, the package is designed with TypeScript support for better type safety.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3088,"uuid":"4b0d4248-28d1-4ee8-8dd4-f563d68249f9","name":"mcp-lambda-layer","title":"MCP Lambda Server","description":"A Lambda Layer that allows a lambda to operate as an MCP server","avatar_url":"https://avatars.githubusercontent.com/u/6936351?v=4","created_at":"2025-03-17T04:59:05.347Z","updated_at":"2025-03-18T14:15:59.276Z","status":"created","author_name":"markvp","author_avatar_url":"https://avatars.githubusercontent.com/u/6936351?v=4","tags":"[]","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/markvp/mcp-lambda-layer","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"8\",\"license\":\"MIT license\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-31 20:20:20\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]