Gemma 4 on an Amazon SageMaker Endpoint: AWS CLI, NVIDIA L4, and an MCP Server A developer published a step-by-step guide and open-source repository for deploying Google's Gemma 4 E2B model to an Amazon SageMaker real-time endpoint on a single NVIDIA L4 GPU using AWS's vLLM container. The project wraps every AWS CLI call in a Python MCP server so Claude Code can manage the deployment through annotated tools, with tests that run offline by faking the aws subprocess. This article provides a step by step deployment guide for Gemma 4 E2B to an Amazon SageMaker hosted GPU enabled system. A suite of Python MCP tools is built to simplify management of the vLLM hosted deployment with Claude Code. https://github.com/xbill9/sagemaker-gemma https://github.com/xbill9/sagemaker-gemma This project serves Gemma 4 E2B from a SageMaker real-time endpoint on one NVIDIA L4 GPU, using the vLLM container AWS publishes for SageMaker. Every AWS call is a plain aws CLI command, so each step can be run by hand or by the MCP server. A SageMaker real-time endpoint is a managed HTTPS inference server. SageMaker places the container on a GPU instance, health-checks it, routes requests to it and writes its logs to CloudWatch. There is no instance to patch, no security group to open and no load balancer to build. The strategy for starting MCP development for model management is a incremental step by step approach. First, the basic development environment is setup with the required system variables and a working Claude Code configuration. Then, the Python MCP server is brought up over stdio and validated with Claude Code in the local environment. The deployment follows as eight steps, each shown as the raw aws command and the MCP tool that runs it. aws login ml.g6.xlarge , ml.g6.2xlarge or ml.g6.4xlarge mcp 2.x jq for reading JSON replies Clone the repository and install the one requirement into the system Python: git clone https://github.com/xbill9/sagemaker-gemma cd sagemaker-gemma python3 -m pip install -r requirements.txt cp .env.example .env .env is gitignored. It holds the settings every tool reads: cat .env Copy to .env gitignored and edit. sm.py reads it, so the MCP server, CLI and Makefile all see it. AWS REGION=us-east-2 MODEL ID=google/gemma-4-E2B-it INSTANCE TYPE=ml.g6.xlarge ENDPOINT NAME=gemma-4-e2b ROLE NAME=sagemaker-gemma-execution-role MAX MODEL LEN=8192 Leave empty to use the newest SageMaker vLLM image in the region. IMAGE URI= Fallback instance types, highest priority first same GPU keeps runs comparable . INSTANCE POOLS=ml.g6.xlarge,ml.g6.2xlarge,ml.g6.4xlarge Gemma 4 is Apache-2.0 and ungated on Hugging Face, so no Hugging Face token is needed. The simplest MCP transport is stdio: the client launches the server as a local process and talks to it over stdin and stdout. In this project Claude Code is the MCP client. The server is one file, server.py , on the MCP Python SDK 2.x: mcp = MCPServer RIG NAME READ ONLY = ToolAnnotations readOnlyHint=True, idempotentHint=True WRITE = ToolAnnotations destructiveHint=False DESTRUCTIVE = ToolAnnotations destructiveHint=True Every tool carries one of the three annotations, so a client can tell a status check from a deploy from a delete. The tools do no AWS work themselves. They call sm.py , which runs each request as an aws CLI subprocess: php def aws args: str, region: str | None = REGION, parse: bool = True - Any: """Run aws