Copied to Clipboard
You can validate the final result by checking the messages:
Environment Status: mcp-server-eb-env
* Status: Ready
* Health: Green
* Platform: Docker running on 64bit Amazon Linux 2/4.8.2
* Deployed Version: app-260508_165941877951
* CNAME: mcp-server-eb-env.eba-ce3smmqd.us-east-1.elasticbeanstalk.com
Recent Events
The environment was recently created and updated successfully:
* 20:56:10: createEnvironment started.
* 20:59:32: Initial instance deployment completed.
* 20:59:38: Successfully launched environment.
* 21:00:03: Subsequent instance deployment completed successfully.
You can then get the endpoint:
>make endpoint
Retrieving Application Endpoint: Retrieving the public endpoint URL of the Elastic Beanstalk environment.
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ Shell make endpoint │
│ │
│ http://mcp-server-eb-env.eba-ce3smmqd.us-east-1.elasticbeanstalk.com │
│ │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ The public endpoint for your Elastic Beanstalk environment is:
http://mcp-server-eb-env.eba-ce3smmqd.us-east-1.elasticbeanstalk.com
The service will be visible in the AWS console:
Gemini CLI settings.json
Once you have the deployed endpoint — update the Gemini CLI MCP settings:
{"mcpServers":{"mcp-ebs-python-aws":{"httpUrl":"http://mcp-server-eb-env.eba-ce3smmqd.us-east-1.elasticbeanstalk.com/mcp/"}}}
Remote MCP Server Testing
Restart Gemini CLI and check for the new MCP tools:
xbill@penguin:~/gemini-cli-aws/mcp-ebs-python-aws$gemini
▝▜▄ Gemini CLI v0.41.2
▝▜▄
▗▟▀ Signed in with Google /auth
▝▀ Plan: Gemini Code Assist Standard /upgrade
🟢 mcp-ebs-python-aws - Ready (1 tool)
Tools:
- mcp_mcp-ebs-python-aws_greet
Then the remote MCP tool in EBS can be called:
>mcp_mcp-ebs-python-aws_greet Hello Beanstalk!
Topic: Executing the greet tool to verify the MCP server functionality.
╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✓ greet (mcp-ebs-python-aws MCP Server) {"param":"Hello Beanstalk!"} │
│ │
│ Hello, Hello Beanstalk!! │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✦ Hello, Hello Beanstalk!!
Gemini CLI can also summarize the deployment:
> summarize the deployment
✦ The mcp-ebs-python-aws project is a Python-based Model Context Protocol (MCP) server deployed to AWS Elastic Beanstalk (EB) using Docker.
Deployment Architecture
* Server Framework: Built with FastMCP and Starlette, providing an asynchronous foundation for MCP tools and standard HTTP endpoints.
* Infrastructure: Uses the Elastic Beanstalk Docker platform, which automatically handles capacity provisioning, load balancing, and
auto-scaling.
* Compute: Defaults to t3.micro instances in the us-east-1 region.
Deployment Workflow (make deploy)
The deployment is automated via a Makefile and deploy.sh script:
1. Validation: Runs unit tests using pytest to ensure code quality before deployment.
2. Initialization: Uses the EB CLI (eb init) to configure the project for the AWS Docker platform.
3. Provisioning: Creates the environment (eb create) if it doesn't exist, setting up the required AWS resources (ALB, ASG, EC2).
4. Updates: Deploys code changes (eb deploy), which triggers a Docker build and rolling update on the EB instances.
Key Endpoints
Once deployed, the environment provides:
* MCP SSE Transport: http://<eb-cname>/mcp
* Health Check: http://<eb-cname>/health (used by EB for monitoring)
* Root Info: http://<eb-cname>/
Management Commands
* make status: Displays the current health of the EB environment and recent deployment events.
* make endpoint: Retrieves the public URL of the deployed server.
* make aws-destroy: Terminates the environment and all associated AWS resources to stop billing.
Summary
The strategy for using Python for MCP development with Gemini CLI on Amazon EBS was validated with a incremental step by step approach.
This MCP server was then deployed to Amazon Elastic Bean Stalk. The local copy of Gemini CLI was used as a MCP client to validate the connection.
This approach can be extended to more complex deployments using other MCP transports and Cloud based options.