Skip to content

Commit c9f8b4c

Browse files
committed
feat!: namespace the Typescript module
1 parent bc8b6bb commit c9f8b4c

File tree

10 files changed

+31
-31
lines changed

10 files changed

+31
-31
lines changed

.github/workflows/cdk-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ jobs:
4747
- name: Install CDK CLI
4848
run: npm install -g aws-cdk
4949

50-
- name: Build and link run-mcp-servers-with-aws-lambda package
50+
- name: Build and link local package
5151
run: npm ci && npm run build && npm link
5252
working-directory: ./src/typescript
5353

5454
- name: Install dependencies
55-
run: npm ci && npm link run-mcp-servers-with-aws-lambda
55+
run: npm ci && npm link @aws/run-mcp-servers-with-aws-lambda
5656
working-directory: ./examples/servers/weather-alerts
5757

5858
- name: Build

.github/workflows/typescript-checks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ jobs:
4242
with:
4343
node-version: 20
4444

45-
- name: Build and link run-mcp-servers-with-aws-lambda package
45+
- name: Build and link local package
4646
run: npm ci && npm run build && npm link
4747
working-directory: ./src/typescript
4848

4949
- name: Install dependencies
50-
run: npm ci && npm link run-mcp-servers-with-aws-lambda
50+
run: npm ci && npm link @aws/run-mcp-servers-with-aws-lambda
5151
working-directory: ./examples/chatbots/typescript
5252

5353
- name: Build

DEVELOP.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
# Development guide
22

3-
## Local tools
4-
5-
Install pre-commit hooks to ensure that your commits follow conventional commit guidelines:
6-
7-
```
8-
pip install pre-commit
9-
pre-commit install
10-
```
11-
123
## Deploy and run the examples
134

145
This guide will walk you through building the source code in this repository,
@@ -68,7 +59,7 @@ uv run pytest
6859

6960
### Build the Typescript package
7061

71-
Build the run-mcp-servers-with-aws-lambda Typescript module:
62+
Build the @aws/run-mcp-servers-with-aws-lambda Typescript module:
7263

7364
```bash
7465
cd src/typescript/
@@ -101,7 +92,7 @@ cd examples/servers/weather-alerts/
10192

10293
npm install
10394

104-
npm link run-mcp-servers-with-aws-lambda
95+
npm link @aws/run-mcp-servers-with-aws-lambda
10596

10697
npm run build
10798

@@ -129,9 +120,18 @@ cd examples/chatbots/typescript/
129120

130121
npm install
131122

132-
npm link run-mcp-servers-with-aws-lambda
123+
npm link @aws/run-mcp-servers-with-aws-lambda
133124

134125
npm run build
135126

136127
npm run start
137128
```
129+
130+
## Development tools
131+
132+
Install pre-commit hooks to ensure that your commits follow conventional commit guidelines:
133+
134+
```
135+
cd src/python
136+
uv run pre-commit install
137+
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ const serverParams = {
133133
export const handler: Handler = async (event, context: Context) => {
134134
// Dynamically import ES module into CommonJS Lambda function
135135
const { stdioServerAdapter } = await import(
136-
"run-mcp-servers-with-aws-lambda"
136+
"@aws/run-mcp-servers-with-aws-lambda"
137137
);
138138

139139
return await stdioServerAdapter(serverParams, event, context);
@@ -174,7 +174,7 @@ with the MCP protocol and returns the function's response to the caller.
174174
import {
175175
LambdaFunctionParameters,
176176
LambdaFunctionClientTransport,
177-
} from "run-mcp-servers-with-aws-lambda";
177+
} from "@aws/run-mcp-servers-with-aws-lambda";
178178
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
179179

180180
const serverParams: LambdaFunctionParameters = {

e2e_tests/run_integ_test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ npm link
2525

2626
cd ../../examples/servers/weather-alerts/
2727
npm ci
28-
npm link run-mcp-servers-with-aws-lambda
28+
npm link @aws/run-mcp-servers-with-aws-lambda
2929
npm run build
3030
cdk deploy --app 'node lib/weather-alerts-mcp-server.js'
3131

@@ -42,6 +42,6 @@ python main.py
4242
# Run the Typescript integ test
4343
cd ../typescript/
4444
npm ci
45-
npm link run-mcp-servers-with-aws-lambda
45+
npm link @aws/run-mcp-servers-with-aws-lambda
4646
npm run build
4747
npm test

e2e_tests/typescript/src/server_clients/lambda_function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
LambdaFunctionParameters,
33
LambdaFunctionClientTransport,
4-
} from "run-mcp-servers-with-aws-lambda";
4+
} from "@aws/run-mcp-servers-with-aws-lambda";
55
import { Server } from "./server.js";
66
import logger from "../logger.js";
77

examples/chatbots/typescript/src/server_clients/lambda_function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {
22
LambdaFunctionParameters,
33
LambdaFunctionClientTransport,
4-
} from "run-mcp-servers-with-aws-lambda";
4+
} from "@aws/run-mcp-servers-with-aws-lambda";
55
import { Server } from "./server.js";
66
import logger from "../logger.js";
77

examples/servers/weather-alerts/lib/weather-alerts-mcp-server.function.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const serverParams = {
88
export const handler: Handler = async (event, context: Context) => {
99
// Dynamically import ES module into CommonJS Lambda function
1010
const { stdioServerAdapter } = await import(
11-
"run-mcp-servers-with-aws-lambda"
11+
"@aws/run-mcp-servers-with-aws-lambda"
1212
);
1313

1414
return await stdioServerAdapter(serverParams, event, context);

examples/servers/weather-alerts/lib/weather-alerts-mcp-server.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ export class WeatherAlertsMcpServer extends cdk.Stack {
1515
) {
1616
super(scope, id, props);
1717

18-
// For testing, the run-mcp-servers-with-aws-lambda package is bundled from local files.
19-
// Remove this layer if using the run-mcp-servers-with-aws-lambda package from npm.
18+
// For testing, the @aws/run-mcp-servers-with-aws-lambda package is bundled from local files.
19+
// Remove this layer if using the @aws/run-mcp-servers-with-aws-lambda package from npm.
2020
const mcpLambdaLayer = new LayerVersion(this, "McpLambdaLayer", {
2121
code: Code.fromAsset(path.join(__dirname, "../../../../src/typescript"), {
2222
bundling: {
@@ -25,8 +25,8 @@ export class WeatherAlertsMcpServer extends cdk.Stack {
2525
"bash",
2626
"-c",
2727
[
28-
"mkdir -p /asset-output/nodejs/node_modules/run-mcp-servers-with-aws-lambda",
29-
`cp -r /asset-input/* /asset-output/nodejs/node_modules/run-mcp-servers-with-aws-lambda/`,
28+
"mkdir -p /asset-output/nodejs/node_modules/@aws/run-mcp-servers-with-aws-lambda",
29+
`cp -r /asset-input/* /asset-output/nodejs/node_modules/@aws/run-mcp-servers-with-aws-lambda/`,
3030
].join(" && "),
3131
],
3232
},
@@ -53,9 +53,9 @@ export class WeatherAlertsMcpServer extends cdk.Stack {
5353
layers: [mcpLambdaLayer],
5454
bundling: {
5555
nodeModules: ["openapi-mcp-server"],
56-
// For testing, the run-mcp-servers-with-aws-lambda package is bundled from local files using the Lambda layer above.
57-
// Remove the layer and this externalModules configuration if using the run-mcp-servers-with-aws-lambda package from npm.
58-
externalModules: ["run-mcp-servers-with-aws-lambda"],
56+
// For testing, the @aws/run-mcp-servers-with-aws-lambda package is bundled from local files using the Lambda layer above.
57+
// Remove the layer and this externalModules configuration if using the @aws/run-mcp-servers-with-aws-lambda package from npm.
58+
externalModules: ["@aws/run-mcp-servers-with-aws-lambda"],
5959
commandHooks: {
6060
beforeBundling(inputDir: string, outputDir: string): string[] {
6161
return [];

src/typescript/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "run-mcp-servers-with-aws-lambda",
2+
"name": "@aws/run-mcp-servers-with-aws-lambda",
33
"description": "Run Model Context Protocol (MCP) servers with AWS Lambda",
44
"version": "0.0.2",
55
"type": "module",

0 commit comments

Comments
 (0)