MCP Lambda Server
Servidor Lambda MCP
Un paquete Node.js que proporciona infraestructura de servidor MCP (Protocolo de contexto de modelo) para funciones de AWS Lambda con soporte SSE.
Características
Adapta el SDK TypeScript de MCP para que funcione con AWS Lambda
Admite eventos enviados por el servidor (SSE) a través de la transmisión de respuestas Lambda
Maneja la validación de métodos CORS y HTTP
Compatibilidad con TypeScript
Related MCP server: Example MCP SSE Server
Notas importantes
La transmisión de respuestas Lambda solo funciona con URL de función . No funciona con API Gateway ni con Application Load Balancer.
Sólo el entorno de ejecución de Node.js es oficialmente compatible con la transmisión de respuestas.
Instalación
npm install @markvp/mcp-lambda-layerUso
Crea tu función Lambda e importa el paquete:
import { MCPHandlerFactory } from '@markvp/mcp-lambda-layer';
import { z } from 'zod';
// Create MCP handler factory with your configuration
const factory = new MCPHandlerFactory({
tools: {
summarize: {
params: {
text: z.string(),
},
handler: async ({ text }) => {
// Your implementation here - could be any service/model/API
const summary = await yourSummarizeImplementation(text);
return {
content: [{ type: 'text', text: summary }],
};
},
},
},
prompts: {
generate: {
description: 'Generate content based on a prompt',
handler: async extra => {
// Your implementation here - could be any service/model/API
const result = await yourGenerateImplementation(extra.prompt);
return {
content: [{ type: 'text', text: result }],
};
},
},
},
});
// Export the handler directly
export const handler = factory.getHandler();Configuración Lambda requerida
Tiempo de ejecución: Node.js 18.x o posterior
Manejador: index.handler
Memoria: 128 MB mínimo (ajuste según sus necesidades)
Tiempo de espera: se recomiendan 120 segundos
URL de función: Obligatoria y debe tener habilitada la transmisión de respuestas
API Gateway/ALB: no compatible con streaming
Contenido del paquete
Este paquete proporciona:
Implementación del servidor MCP con transporte SSE
Manejo de protocolos (JSON-RPC)
Soporte de respuesta en streaming
Definiciones de tipos e interfaces
Su función Lambda proporciona:
Implementaciones de herramientas y avisos
Lógica de negocios
Cualquier cliente o servicio API necesario
Configuración
Licencia
Instituto Tecnológico de Massachusetts (MIT)
This server cannot be deployed
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA server for Model Context Protocol (MCP) that uses Server-Sent Events (SSE) for streaming communication, enabling tools like the HackerNews API to be accessed through a secure HTTP+SSE transport.29-
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables real-time communication using Server-Sent Events (SSE), providing standardized model management and resource templating capabilities.-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that supports STDIO, SSE and Streamable HTTP protocols for AI model interactions.9 npm1MIT
- FlicenseNot gradedqualityNot gradedmaintenanceA Model Context Protocol (MCP) server implementation that uses Server-Sent Events (SSE) to enable real-time, server-pushed updates between AI models and tools over HTTP connections.1-