You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+43-20Lines changed: 43 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -287,26 +287,6 @@ The deployment includes these containers:
287
287
2. **View MCP server metadata:**
288
288
Metadata about all MCP servers is available in`/opt/mcp-gateway/servers` directory. The metadata includes information gathered from `ListTools` as well as information provided during server registration.
289
289
290
-
3. **Test the Gateway and Registry:**
291
-
The repo includes a test agent that can connect to the Registry to discover tools and invoke them:
292
-
293
-
```bash
294
-
python agents/agent.py --mcp-registry-url http://localhost/mcpgw/sse --message "what is the current time in clarksburg, md"
295
-
296
-
# With Strands agent
297
-
# python agents/strands_agent.py --mcp-registry-url http://localhost/mcpgw/sse --message "what is the current time in clarksburg, md"
1. **Configure environment for user authentication:**
322
+
Copy the template and configure the environment variables:
323
+
324
+
```bash
325
+
cp agents/.env.template agents/.env.user
326
+
# Edit agents/.env.user with your Cognito configuration
327
+
```
328
+
329
+
2. **Authenticate with user identity:**
330
+
Run the CLI user authentication script which will prompt you to open a browser window to authenticate with Cognito:
331
+
332
+
```bash
333
+
python agents/cli_user_auth.py
334
+
```
335
+
336
+
This will save a cookie locally in`/home/ubuntu/.mcp` and this cookie will be used when you run the agent.
337
+
338
+
3. **Run the agent with session cookie:**
339
+
```bash
340
+
python agents/agent.py --use-session-cookie --mcp-registry-url your_registry_url --message "what is the current time in clarksburg, md"
341
+
```
342
+
343
+
### Run Agent with Its Own Agentic Identity
344
+
345
+
1. **Configure environment for agent authentication:**
346
+
Copy the template and configure the environment variables:
347
+
348
+
```bash
349
+
cp agents/.env.template agents/.env.agent
350
+
# Edit agents/.env.agent with your Cognito configuration
351
+
```
352
+
353
+
2. **Run the agent with agentic identity:**
354
+
The agent will communicate with Cognito to obtain a JWT token which will include information about the groups it is part of. This information is then used by the Auth server for authorization decisions.
355
+
356
+
```bash
357
+
python agents/agent.py --mcp-registry-url your_registry_url --message "what is the current time in clarksburg, md"
358
+
```
359
+
337
360
### Installation on EKS
338
361
339
362
For production deployments you might want to run this solution on EKS, the [Distributed Training and Inference on EKS](https://github.com/aws-samples/amazon-eks-machine-learning-with-terraform-and-kubeflow) repo contains the helm chart for running the gateway and registry on an EKS cluster. Refer to [Serve MCP Gateway Registry](https://github.com/aws-samples/amazon-eks-machine-learning-with-terraform-and-kubeflow/tree/master/examples/agentic/mcp-gateway-registry) README for step by step instructions.
0 commit comments