Remote
Create Remote MCP Server on Kubernetes (Amazon EKS)
claude mcp add --transport stdio saha-rajdeep-remote-mcp-server python server.py \ --env PORT="8000 (default unless overridden by container/runtime)" \ --env MCP_LOG_LEVEL="INFO (optional)"
How to use
This MCP server hosts a FastMCP-based calculator tool that exposes a single operation: add_numbers(a, b). The server is packaged in a container and is intended to run in Kubernetes (Amazon EKS) or locally via Docker. Clients connect over HTTP to the /mcp/ endpoint and interact with the MCP session using the standardized protocol: initialize a session, declare capabilities, list available tools, and then invoke add_numbers with two numeric inputs. The curl workflow in the documentation demonstrates how to initialize the session, announce readiness via notifications/initialized, list tools, and call add_numbers with arguments a and b. A Python test client is also provided to exercise the MCP server end-to-end. When you call add_numbers, the server returns a numeric result that is the sum of the two inputs.
How to install
Prerequisites:
- Docker (for building and running container locally)
- Python (optional if running outside container)
- kubectl and AWS CLI (for deploying to Amazon EKS)
Local development and testing (Docker):
- Build the container image:
docker build -t mcp-calculator:latest .
- Run the container locally:
docker run -p 8000:8000 mcp-calculator:latest
- The server will be available at http://localhost:8000
If you prefer to run directly with Python (outside Docker):
- Install Python dependencies from requirements.txt:
pip install -r requirements.txt
- Start the server:
python server.py
- The server will typically listen on port 8000 by default, or as configured in your environment.
Deploying to Amazon EKS (Kubernetes):
- Ensure AWS CLI, kubectl, and Docker are installed and configured.
- Build and push your container image to your registry (Docker Hub or ECR).
- Update k8s-deployment.yaml to point to your image registry.
- Deploy:
kubectl apply -f k8s-deployment.yaml
- Check deployment status and fetch the LoadBalancer service IP:
kubectl rollout status deployment/mcp-calculator
kubectl get services mcp-calculator-service
- Access the MCP endpoint via the LoadBalancer URL at /mcp/.
Prerequisites for EKS deployment are described in the README (AWS CLI, kubectl, Docker).
Additional notes
Notes and tips:
- The MCP protocol steps (especially notifications/initialized) are required after initialization.
- Sessions have a time-to-live generally around 30-60 seconds in this FastMCP setup; complete the workflow quickly or implement a keep-alive pattern if supported by your client.
- Use the provided test_mcp_client.py to validate your server locally before deploying to Kubernetes.
- If you modify the server image, update the Kubernetes deployment manifest (k8s-deployment.yaml) to reference the new image tag.
- The add_numbers tool expects inputs a and b as numbers; the response returns both a structured and plain text representation of the result.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP