
Research
/Security News
Mini Shai-Hulud Campaign Hits Red Hat Cloud Services npm Packages
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.
A Middy middleware for Model Context Protocol (MCP) server integration with AWS Lambda functions.
Middy MCP is a middleware that enables seamless integration between AWS Lambda functions and Model Context Protocol servers. It provides a convenient way to handle MCP requests and responses within your Lambda functions using the Middy middleware framework. It supports requests sent to AWS Lambda from API Gateway (both REST API / v1 and HTTP API / v2) using the Proxy integration, as well as requests sent form an ALB.
Disclaimer: hosting your MCP server this way is only compatible with MCP clients using at least protocol version 2025-03-26.
pnpm install middy-mcp
This middleware can throw HTTP exceptions, so it can be convenient to use it in combination with the @middy/http-error-handler.
Hereafter is an exemple of a minimal Lambda function handler file. Deploy this lambda as a proxy integration on a POST route of your API Gateway and you're good to go.
import middy from "@middy/core";
import httpErrorHandler from "@middy/http-error-handler";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { z } from "zod";
import mcpMiddleware from "middy-mcp";
// Create an MCP server
const server = new McpServer({
name: "Lambda hosted MCP Server",
version: "1.0.0",
});
// Add an addition tool
server.tool("add", { a: z.number(), b: z.number() }, async ({ a, b }) => ({
content: [{ type: "text", text: String(a + b) }],
}));
export const handler = middy()
.use(mcpMiddleware({ server }))
.use(httpErrorHandler());
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to open an issue or to submit a pull request 🚀!
FAQs
Middy middleware for Model Context Protocol server
The npm package middy-mcp receives a total of 2,118 weekly downloads. As such, middy-mcp popularity was classified as popular.
We found that middy-mcp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.

Security News
The Rust project is moving toward formal rules on LLM use in contributions after months of internal debate over maintainer burden, code quality, and contributor experience.