@@ -53,6 +53,15 @@ flowchart LR
5353 T2 -->|"Authorize"| T3
5454```
5555
56+ This solution is compatible with most MCP clients that support the streamable HTTP transport.
57+ MCP servers deployed with this architecture can typically be used with off-the-shelf
58+ MCP-compatible applications such as Cursor, Cline, Claude Desktop, etc.
59+
60+ You can choose your desired OAuth server provider for this solution. The examples in this
61+ repository use Amazon Cognito, or you can use third-party providers such as Okta or Auth0
62+ with API Gateway custom authorization. Alternatively, you can issue bearer tokens such as API keys
63+ to your clients and use API Gateway custom authorization to validate the request bearer token.
64+
5665## Using a Lambda function URL
5766
5867``` mermaid
@@ -64,6 +73,13 @@ flowchart LR
6473 T2 -->|"Invoke"| T1
6574```
6675
76+ This solution uses AWS IAM for authentication, and relies on granting
77+ [ Lambda InvokeFunctionUrl permission] ( https://docs.aws.amazon.com/lambda/latest/dg/urls-auth.html#urls-auth-iam ) to your
78+ IAM users and roles to enable access to the MCP server. Clients must use an extension to the MCP Streamable
79+ HTTP transport that signs requests with [ AWS SigV4] ( https://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html ) .
80+ Off-the-shelf MCP-compatible applications are unlikely to have support for this custom transport,
81+ so this solution is more appropriate for service-to-service communication rather than for end users.
82+
6783## Using the Lambda Invoke API
6884
6985``` mermaid
@@ -73,6 +89,15 @@ flowchart LR
7389 App -->|"Custom MCP Transport<br>(Lambda Invoke API)"| T1
7490```
7591
92+ Like the Lambda function URL approach, this solution uses AWS IAM for authentication.
93+ It relies on granting
94+ [ Lambda InvokeFunction permission] ( https://docs.aws.amazon.com/lambda/latest/dg/lambda-api-permissions-ref.html )
95+ to your IAM users and roles to enable access to the MCP server.
96+ Clients must use a custom MCP transport that directly calls the
97+ [ Lambda Invoke API] ( https://docs.aws.amazon.com/lambda/latest/api/API_Invoke.html ) .
98+ Off-the-shelf MCP-compatible applications are unlikely to have support for this custom transport,
99+ so this solution is more appropriate for service-to-service communication rather than for end users.
100+
76101<details >
77102
78103<summary ><b >Python server example</b ></summary >
@@ -238,19 +263,19 @@ await client.connect(transport);
238263 the [ sqlite MCP server] ( https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite ) ,
239264 the [ filesystem MCP server] ( https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem ) ,
240265 and the [ git MCP server] ( https://github.com/modelcontextprotocol/servers/tree/main/src/git ) .
241- - The server adapters do not provide mechanisms for managing any secrets needed by the wrapped
266+ - This library does not provide mechanisms for managing any secrets needed by the wrapped
242267 MCP server. For example, the [ GitHub MCP server] ( https://github.com/modelcontextprotocol/servers/tree/main/src/github )
243268 and the [ Brave search MCP server] ( https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search )
244269 require API keys to make requests to third-party APIs.
245- You can configure these API keys as
270+ You may configure these API keys as
246271 [ encrypted environment variables] ( https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars-encryption.html )
247272 in the Lambda function's configuration. However, note that anyone with access to invoke the Lambda function
248273 will then have access to use your API key to call the third-party APIs by invoking the function.
249274 We recommend limiting access to the Lambda function using
250275 [ least-privilege IAM policies] ( https://docs.aws.amazon.com/lambda/latest/dg/security-iam.html ) .
251276 If you use an identity-based authentication mechanism such as OAuth, you could also store and retrieve API keys per user but there are no implementation examples in this repository.
252277
253- ### Deploy and run the examples
278+ ## Deploy and run the examples
254279
255280See the [ development guide] ( DEVELOP.md ) for instructions to deploy and run the examples in this repository.
256281
0 commit comments