Skip to content

Commit 0ca317b

Browse files
committed
chore(docs): Add individual docs for each example server
1 parent cbb2e5a commit 0ca317b

File tree

7 files changed

+169
-72
lines changed

7 files changed

+169
-72
lines changed

DEVELOP.md

Lines changed: 55 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ and using an example chatbot client to communicate with those Lambda-based MCP s
88

99
The example chatbot client will communicate with seven servers:
1010

11-
1. **time**: Ask "What is the current time?".
12-
2. **weather-alerts**: Ask "Are there any weather alerts right now?".
11+
1. **dad-jokes**: Ask "Tell me a good dad joke."
12+
2. **dog-facts**: Ask "Tell me something about dogs".
1313
3. **mcpdoc**: Ask "What is Strands Agents?".
1414
4. **cat-facts**: Ask "Tell me something about cats".
15-
5. **dad-jokes**: Ask "Tell me a good dad joke."
16-
6. **dog-facts**: Ask "Tell me something about dogs".
15+
5. **time**: Ask "What is the current time?".
16+
6. **weather-alerts**: Ask "Are there any weather alerts right now?".
1717
7. **fetch**: Ask "Who is Tom Cruise?".
1818

19-
| MCP server | Language | Runtime | MCP transport | Authentication | Endpoint |
20-
| -------------- | ---------- | ------------- | --------------------------------------------------- | -------------- | ------------------- |
21-
| time | Python | Lambda | Custom Lambda Invoke transport | AWS IAM | Lambda Invoke API |
22-
| weather-alerts | Typescript | Lambda | Custom Lambda Invoke transport | AWS IAM | Lambda Invoke API |
23-
| mcpdoc | Python | Lambda | Custom Streamable HTTP transport with SigV4 support | AWS IAM | Lambda Function URL |
24-
| cat-facts | Typescript | Lambda | Custom Streamable HTTP transport with SigV4 support | AWS IAM | Lambda Function URL |
25-
| dad-jokes | Python | Lambda | Streamable HTTP transport | OAuth | API Gateway |
26-
| dog-facts | Typescript | Lambda | Streamable HTTP transport | OAuth | API Gateway |
27-
| fetch | Python | Local process | stdio | N/A | N/A |
19+
| MCP server | Language | Runtime | MCP transport | Authentication | Endpoint |
20+
| --------------------------------------------------- | ---------- | ------------- | --------------------------------------------------- | -------------- | ------------------- |
21+
| [dad-jokes](/examples/servers/dad-jokes/) | Python | Lambda | Streamable HTTP transport | OAuth | API Gateway |
22+
| [dog-facts](/examples/servers/dog-facts/) | Typescript | Lambda | Streamable HTTP transport | OAuth | API Gateway |
23+
| [mcpdoc ](/examples/servers/mcpdoc/) | Python | Lambda | Custom Streamable HTTP transport with SigV4 support | AWS IAM | Lambda Function URL |
24+
| [cat-facts](/examples/servers/cat-facts/) | Typescript | Lambda | Custom Streamable HTTP transport with SigV4 support | AWS IAM | Lambda Function URL |
25+
| [time](/examples/servers/time/) | Python | Lambda | Custom Lambda Invoke transport | AWS IAM | Lambda Invoke API |
26+
| [weather-alerts](/examples/servers/weather-alerts/) | Typescript | Lambda | Custom Lambda Invoke transport | AWS IAM | Lambda Invoke API |
27+
| [fetch](https://pypi.org/project/mcp-server-fetch/) | Python | Local process | stdio | N/A | N/A |
2828

2929
### Setup
3030

@@ -74,7 +74,9 @@ Test the OAuth configuration with [oauth2c](https://github.com/cloudentity/oauth
7474
./test-automated-oauth.sh
7575
```
7676

77-
### Build the Python module
77+
### Build the run-mcp-servers-with-aws-lambda library
78+
79+
#### Build the Python module
7880

7981
Install the run-mcp-servers-with-aws-lambda Python module from source:
8082

@@ -92,7 +94,7 @@ uv run pyright
9294
uv run pytest # coverage report will be in htmlcov/index.html
9395
```
9496

95-
### Build the Typescript package
97+
#### Build the Typescript package
9698

9799
Build the @aws/run-mcp-servers-with-aws-lambda Typescript module:
98100

@@ -110,83 +112,95 @@ npm test # coverage report will be in coverage/index.html
110112
npm run lint
111113
```
112114

113-
### Deploy the example Python servers
115+
### Deploy the example remote MCP servers
114116

115-
Deploy the Lambda 'time' function - the deployed function will be named "mcp-server-time".
117+
#### Deploy dad-jokes MCP server
118+
119+
Deploy the Lambda 'dad-jokes' function - the deployed function will be named "mcp-server-dad-jokes".
116120

117121
```bash
118-
cd examples/servers/time/
122+
cd examples/servers/dad-jokes/
119123

120124
uv pip install -r requirements.txt
121125

122126
cdk deploy --app 'python3 cdk_stack.py'
123127
```
124128

125-
Deploy the Lambda 'mcpdoc' function - the deployed function will be named "mcp-server-mcpdoc".
129+
#### Deploy dog-facts MCP server
130+
131+
Deploy the Lambda 'dog-facts' function - the deployed function will be named "mcp-server-dog-facts".
126132

127133
```bash
128-
cd examples/servers/mcpdoc/
134+
cd examples/servers/dog-facts/
129135

130-
uv pip install -r requirements.txt
136+
npm install
131137

132-
cdk deploy --app 'python3 cdk_stack.py'
138+
npm link @aws/run-mcp-servers-with-aws-lambda
139+
140+
npm run build
141+
142+
cdk deploy --app 'node lib/dog-facts-mcp-server.js'
133143
```
134144

135-
Deploy the Lambda 'dad-jokes' function - the deployed function will be named "mcp-server-dad-jokes".
145+
#### Deploy the mcpdoc MCP server
146+
147+
Deploy the Lambda 'mcpdoc' function - the deployed function will be named "mcp-server-mcpdoc".
136148

137149
```bash
138-
cd examples/servers/dad-jokes/
150+
cd examples/servers/mcpdoc/
139151

140152
uv pip install -r requirements.txt
141153

142154
cdk deploy --app 'python3 cdk_stack.py'
143155
```
144156

145-
### Deploy the example Typescript servers
157+
#### Deploy the cat-facts MCP server
146158

147-
Deploy the Lambda 'weather-alerts' function - the deployed function will be named "mcp-server-weather-alerts".
159+
Deploy the Lambda 'cat-facts' function - the deployed function will be named "mcp-server-cat-facts".
148160

149161
```bash
150-
cd examples/servers/weather-alerts/
162+
cd examples/servers/cat-facts/
151163

152164
npm install
153165

154166
npm link @aws/run-mcp-servers-with-aws-lambda
155167

156168
npm run build
157169

158-
cdk deploy --app 'node lib/weather-alerts-mcp-server.js'
170+
cdk deploy --app 'node lib/cat-facts-mcp-server.js'
159171
```
160172

161-
Deploy the Lambda 'cat-facts' function - the deployed function will be named "mcp-server-cat-facts".
173+
#### Deploy the time MCP server
162174

163-
```bash
164-
cd examples/servers/cat-facts/
165-
166-
npm install
175+
Deploy the Lambda 'time' function - the deployed function will be named "mcp-server-time".
167176

168-
npm link @aws/run-mcp-servers-with-aws-lambda
177+
```bash
178+
cd examples/servers/time/
169179

170-
npm run build
180+
uv pip install -r requirements.txt
171181

172-
cdk deploy --app 'node lib/cat-facts-mcp-server.js'
182+
cdk deploy --app 'python3 cdk_stack.py'
173183
```
174184

175-
Deploy the Lambda 'dog-facts' function - the deployed function will be named "mcp-server-dog-facts".
185+
#### Deploy the weather-alerts MCP server
186+
187+
Deploy the Lambda 'weather-alerts' function - the deployed function will be named "mcp-server-weather-alerts".
176188

177189
```bash
178-
cd examples/servers/dog-facts/
190+
cd examples/servers/weather-alerts/
179191

180192
npm install
181193

182194
npm link @aws/run-mcp-servers-with-aws-lambda
183195

184196
npm run build
185197

186-
cdk deploy --app 'node lib/dog-facts-mcp-server.js'
198+
cdk deploy --app 'node lib/weather-alerts-mcp-server.js'
187199
```
188200

189-
### Run the example Python client
201+
### Run the chatbot
202+
203+
#### Run the example Python chatbot
190204

191205
Run the Python-based chatbot client:
192206

@@ -198,7 +212,7 @@ uv pip install -r requirements.txt
198212
python main.py
199213
```
200214

201-
### Run the example Typescript client
215+
#### Run the example Typescript chatbot
202216

203217
Run the Typescript-based chatbot client:
204218

examples/servers/cat-facts/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1-
# Cat Facts MCP Server
1+
# Cat Facts Remote MCP Server
22

3-
This example demonstrates an MCP server that provides cat facts through a Lambda Function URL and IAM authentication.
3+
This remote MCP server wraps the [@ivotoby/openapi-mcp-server](https://www.npmjs.com/package/@ivotoby/openapi-mcp-server)
4+
stdio-based MCP server in a Lambda function. The server is configured with a simplified OpenAPI specification for the
5+
[catfact.ninja](https://catfact.ninja/) API.
6+
7+
- Language: Typescript
8+
- Transport: Custom Streamable HTTP transport with SigV4 support
9+
- Authentication: AWS IAM
10+
- Endpoint: Lambda Function URL
11+
12+
### Deploy
13+
14+
```bash
15+
npm install
16+
17+
npm link @aws/run-mcp-servers-with-aws-lambda
18+
19+
npm run build
20+
21+
cdk deploy --app 'node lib/cat-facts-mcp-server.js'
22+
```

examples/servers/dad-jokes/README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1-
# Dad Jokes MCP Server
1+
# Dad Jokes Remote MCP Server
22

3-
This is an MCP (Model Context Protocol) server that provides access to dad jokes via the icanhazdadjoke.com API. It uses the mcp-openapi-proxy package to expose the API as MCP tools.
3+
This remote MCP server wraps the [mcp-openapi-proxy](https://pypi.org/project/mcp-openapi-proxy/)
4+
stdio-based MCP server in a Lambda function. The server is configured with a simplified OpenAPI specification for the
5+
[icanhazdadjoke](https://icanhazdadjoke.com/api) API.
6+
7+
- Language: Python
8+
- Transport: Streamable HTTP transport
9+
- Authentication: AWS IAM
10+
- Endpoint: API Gateway
11+
12+
### Deploy
13+
14+
```bash
15+
uv pip install -r requirements.txt
16+
17+
cdk deploy --app 'python3 cdk_stack.py'
18+
```

examples/servers/dog-facts/README.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1-
# Dog Facts MCP Server
1+
# Dog Facts Remote MCP Server
22

3-
This example demonstrates an MCP server that provides dog facts through an API Gateway and OAuth authentication.
3+
This remote MCP server wraps the [@ivotoby/openapi-mcp-server](https://www.npmjs.com/package/@ivotoby/openapi-mcp-server)
4+
stdio-based MCP server in a Lambda function. The server is configured with a simplified OpenAPI specification for the
5+
[dogapi.dog](https://dogapi.dog/) API.
6+
7+
- Language: Typescript
8+
- Transport: Streamable HTTP transport
9+
- Authentication: AWS IAM
10+
- Endpoint: API Gateway
11+
12+
### Deploy
13+
14+
```bash
15+
npm install
16+
17+
npm link @aws/run-mcp-servers-with-aws-lambda
18+
19+
npm run build
20+
21+
cdk deploy --app 'node lib/dog-facts-mcp-server.js'
22+
```

examples/servers/mcpdoc/README.md

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,17 @@
1-
# mcpdoc MCP Server Lambda Example
1+
# mcpdoc Remote MCP Server
22

3-
This example demonstrates running the [mcpdoc MCP server](https://github.com/langchain-ai/mcpdoc) in AWS Lambda.
4-
The mcpdoc server provides access to documentation via llms.txt files.
3+
This remote MCP server wraps the [mcpdoc](https://pypi.org/project/mcpdoc/) stdio-based MCP server in a Lambda function.
4+
The server is configured to fetch llms.txt documentation for the [Strands Agents SDK](https://strandsagents.com/).
55

6-
## Sample inputs
6+
- Language: Python
7+
- Transport: Custom Streamable HTTP transport with SigV4 support
8+
- Authentication: AWS IAM
9+
- Endpoint: Lambda Function URL
710

8-
```bash
9-
uv pip install -r function/requirements.txt
10-
11-
# Initialize
12-
$ python -c 'from function import index; print(index.handler({"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{"roots":{"listChanged":True}},"clientInfo":{"name":"mcp","version":"0.1.0"}},"jsonrpc":"2.0","id":0}, ""))'
11+
### Deploy
1312

14-
# List tools
15-
$ python -c 'from function import index; print(index.handler({"method":"tools/list","params":{"clientInfo":{"name":"mcp","version":"0.1.0"}},"jsonrpc":"2.0","id":0}, ""))'
16-
17-
# List documentation sources
18-
$ python -c 'from function import index; print(index.handler({"method":"tools/invoke","params":{"name":"list_doc_sources","parameters":{}},"jsonrpc":"2.0","id":0}, ""))'
13+
```bash
14+
uv pip install -r requirements.txt
1915

20-
# Fetch documentation
21-
$ python -c 'from function import index; print(index.handler({"method":"tools/invoke","params":{"name":"fetch_docs","parameters":{"url":"https://strandsagents.com/latest/llms.txt"}},"jsonrpc":"2.0","id":0}, ""))'
16+
cdk deploy --app 'python3 cdk_stack.py'
2217
```
23-
24-
## Configuration
25-
26-
The mcpdoc server is configured with the following options:
27-
28-
- `--urls`: Specifies the llms.txt files to use, in the format `Name:URL`. In this example, we use `Strands:https://strandsagents.com/latest/llms.txt`.
29-
- `--allowed-domains`: Specifies which domains the server is allowed to fetch documentation from. In this example, we allow `strandsagents.com`.
30-
31-
For more configuration options, see the [mcpdoc GitHub repository](https://github.com/langchain-ai/mcpdoc).

examples/servers/time/README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# Time Remote MCP server
2+
3+
This remote MCP server wraps the [time](https://pypi.org/project/mcp-server-time/) stdio-based MCP server in a Lambda function.
4+
5+
- Language: Python
6+
- Transport: Custom Lambda Invoke transport
7+
- Authentication: AWS IAM
8+
- Endpoint: Lambda Invoke API
9+
10+
### Deploy
11+
12+
```bash
13+
uv pip install -r requirements.txt
14+
15+
cdk deploy --app 'python3 cdk_stack.py'
16+
```
17+
18+
### Testing
19+
120
Sample inputs:
221

322
```bash

examples/servers/weather-alerts/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
1+
# Weather Alerts Remote MCP server
2+
3+
This remote MCP server wraps the [@ivotoby/openapi-mcp-server](https://www.npmjs.com/package/@ivotoby/openapi-mcp-server)
4+
stdio-based MCP server in a Lambda function. The server is configured with a simplified OpenAPI specification for the
5+
[National Weather Service API](https://www.weather.gov/documentation/services-web-api).
6+
7+
- Language: Typescript
8+
- Transport: Custom Lambda Invoke transport
9+
- Authentication: AWS IAM
10+
- Endpoint: Lambda Invoke API
11+
12+
### Deploy
13+
14+
```bash
15+
npm install
16+
17+
npm link @aws/run-mcp-servers-with-aws-lambda
18+
19+
npm run build
20+
21+
cdk deploy --app 'node lib/weather-alerts-mcp-server.js'
22+
```
23+
24+
### Testing
25+
126
Sample inputs:
227

328
```bash

0 commit comments

Comments
 (0)