Skip to content

Commit 5f9a670

Browse files
committed
feat: Migrate from deprecated openapi-mcp-server package to @ivotoby/openapi-mcp-server
1 parent c6b38ad commit 5f9a670

File tree

8 files changed

+560
-402
lines changed

8 files changed

+560
-402
lines changed

examples/servers/cat-facts/lib/cat-facts-mcp-server.function.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
import { Handler, Context } from "aws-lambda";
22

33
const serverParams = {
4-
command: "npx",
5-
args: ["--offline", "openapi-mcp-server", "./cat-facts-openapi.json"],
4+
command: "node",
5+
args: [
6+
"/var/task/node_modules/@ivotoby/openapi-mcp-server/bin/mcp-server.js",
7+
"--api-base-url",
8+
"https://catfact.ninja",
9+
"--openapi-spec",
10+
"./cat-facts-openapi.json",
11+
],
612
};
713

814
export const handler: Handler = async (event, context: Context) => {

examples/servers/cat-facts/lib/cat-facts-mcp-server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export class CatFactsMcpServer extends cdk.Stack {
5353
},
5454
layers: [mcpLambdaLayer],
5555
bundling: {
56-
nodeModules: ["openapi-mcp-server"],
56+
nodeModules: ["@ivotoby/openapi-mcp-server"],
5757
// For testing, the @aws/run-mcp-servers-with-aws-lambda package is bundled from local files using the Lambda layer above.
5858
// Remove the layer and this externalModules configuration if using the @aws/run-mcp-servers-with-aws-lambda package from npm.
5959
externalModules: ["@aws/run-mcp-servers-with-aws-lambda"],

0 commit comments

Comments
 (0)