Skip to main content
Glama

MCP Lambda Server

by markvp

MCP Lambda 服务器

一个 Node.js 包,为支持 SSE 的 AWS Lambda 函数提供 MCP(模型上下文协议)服务器基础设施。

特征

  • 调整 MCP TypeScript SDK 以与 AWS Lambda 配合使用
  • 通过 Lambda 响应流支持服务器发送事件 (SSE)
  • 处理 CORS 和 HTTP 方法验证
  • TypeScript 支持

重要提示

  • Lambda 响应流仅适用于函数 URL 。它不适用于 API 网关或应用程序负载均衡器。
  • 仅 Node.js 运行时正式支持响应流。

安装

npm install @markvp/mcp-lambda-layer

用法

创建您的 Lambda 函数并导入包:

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();

所需的 Lambda 配置

  • 运行时:Node.js 18.x 或更高版本
  • 处理程序:index.handler
  • 内存:最低 128 MB(根据您的需要调整)
  • 超时:建议 120 秒
  • 函数 URL:必需,并且必须启用响应流
  • API 网关/ALB:不支持流式传输

包装内容

此套餐提供:

  • 使用 SSE 传输的 MCP 服务器实现
  • 协议处理(JSON-RPC)
  • 流式响应支持
  • 类型定义和接口

您的 Lambda 函数提供:

  • 工具和提示实现
  • 业务逻辑
  • 任何必要的 API 客户端或服务
  • 配置

执照

麻省理工学院

-
security - not tested
A
license - permissive license
-
quality - not tested

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Node.js 包为 AWS Lambda 函数提供模型上下文协议服务器基础设施,并通过服务器发送事件提供流响应功能。

  1. 特征
    1. 重要提示
      1. 安装
        1. 用法
          1. 所需的 Lambda 配置
          2. 包装内容
        2. 执照

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            Enables AI models to interact with AWS Lambda functions via the MCP protocol, allowing access to private resources, real-time data, and custom computation in a secure environment.
            Last updated -
            2
            107
            Python
            MIT License
            • Linux
            • Apple
          • A
            security
            A
            license
            A
            quality
            A comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.
            Last updated -
            7
            4
            JavaScript
            MIT License
          • A
            security
            F
            license
            A
            quality
            A Model Context Protocol server that integrates with AWS CodePipeline, allowing users to manage pipelines through Windsurf and Cascade using natural language commands.
            Last updated -
            12
            4
            TypeScript
          • -
            security
            A
            license
            -
            quality
            A Node.js package that provides Model Context Protocol server infrastructure for AWS Lambda functions with SSE support, enabling developers to implement MCP tools and prompts as serverless functions.
            Last updated -
            112
            11
            TypeScript
            MIT License

          View all related MCP servers

          MCP directory API

          We provide all the information about MCP servers via our MCP API.

          curl -X GET 'https://glama.ai/api/mcp/v1/servers/markvp/mcp-lambda-layer'

          If you have feedback or need assistance with the MCP directory API, please join our Discord server