You can code and run your MCP server remotely on Kubernetes. Here's how: 1. Write code which conforms to the MCP standards. What does this mean? it means, it should work with JSON RPC 2.0 and can process standard MCP methods such as tools/list should send the name and description of the tools, tools/call should be able to invoke the tools etc. These standards are defined by Anthropic 2. You can either code the methods for MCP yourself, which can be tedious. Or use MCP implementation with library like FastMCP 3. Run Dockerfile to create a container and save it in ECR 4. Deploy to the Kubernetes cluster such as in Amazon EKS, and expose it using a ALB via service or ingress. ALB and container support streamable HTTP out of the box, and works nicely 5. Invoke your MCP Server using the ALB Url. For Streamable HTTP, you need to initialize a session, and then use the sessionID for subsequent calls to do tool discovery, and tool calls Check out detailed step by step demo, along with related codes, and pros-cons of local vs remote MCP server: https://lnkd.in/eXKENy6R --- Get byte sized system design, behavioral, Gen AI, and other interview and career switch tips in weekly newsletter : https://lnkd.in/eG7XdHmN #genai #ai #systemdesign
Thanks Rajdeep, do you think deploying MCP servers and gateway via Bedrock Agentcore would be another recommended route?
That's super insightful Rajdeep! We have built a workshop showcasing this exact flow with Java and Spring AI: https://catalog.workshops.aws/java-spring-ai-agents/en-US/deploy-to-aws/deploy-to-eks
Love this, Rajdeep
Great breakdown, Rajdeep Saha Thank you for sharing 😍
This is a excellent guide for MCP server on Kubernetes coding to MCP standards, containerizing, and leveraging EKS with ALB makes remote management seamless. Thanks for sharing the demo and resources; these will be super helpful for anyone looking to set up scalable, standards-compliant MCP services!
很喜欢这个,Rajdeep
Like your expertise in Kubernetes and solutions built on top of it !
☁️Cloud/Platform Engineer at Ocado Technology | AWS, GitLab, Terraform | DevOps & AI Automation♾️
3moRajdeep Saha, implementing server design with Kubernetes amplifies operational efficiency significantly. Great insights shared.