Skip to content

Commit 3aaedd5

Browse files
committed
Import ES module mcp-lambda into CommonJS code
1 parent 64b644b commit 3aaedd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import { Handler, Context } from 'aws-lambda';
2-
import { stdioServerAdapter } from 'mcp-lambda';
1+
import { Handler, Context } from "aws-lambda";
32

43
const serverParams = {
5-
command: 'npx',
6-
args: ['--offline', 'openapi-mcp-server', './weather-alerts-openapi.json'],
4+
command: "npx",
5+
args: ["--offline", "openapi-mcp-server", "./weather-alerts-openapi.json"],
76
};
87

98
export const handler: Handler = async (event, context: Context) => {
9+
const { stdioServerAdapter } = await import("mcp-lambda");
1010
return await stdioServerAdapter(serverParams, event, context);
1111
};

0 commit comments

Comments
 (0)