{"id":9536,"library":"awslabs-eks-mcp-server","title":"AWS Labs EKS Model Context Protocol (MCP) Server","description":"The `awslabs-eks-mcp-server` package provides a Python-based server implementation for the Model Context Protocol (MCP), designed specifically for AWS EKS environments. It enables machine learning models to be served and managed efficiently within Kubernetes. As an AWS Labs 'sample' project, it demonstrates best practices and patterns but may not carry the same long-term support or stability guarantees as official AWS SDKs. The current version is `0.1.27`, with a release cadence that reflects ongoing development in a pre-1.0 state.","status":"active","version":"0.1.27","language":"en","source_language":"en","source_url":"https://github.com/aws-samples/eks-model-context-protocol","tags":["aws","eks","kubernetes","mcp","server","fastapi","machine-learning","sample"],"install":[{"cmd":"pip install awslabs-eks-mcp-server","lang":"bash","label":"Install core library"},{"cmd":"pip install uvicorn[standard]","lang":"bash","label":"Install Uvicorn for running the server"}],"dependencies":[{"reason":"Used as the web framework for the MCP server.","package":"fastapi"},{"reason":"ASGI server required to run the FastAPI application.","package":"uvicorn"},{"reason":"AWS SDK for Python, often used for interacting with AWS services.","package":"boto3"},{"reason":"Kubernetes client for Python, for cluster interaction.","package":"kubernetes"},{"reason":"Required for the gRPC aspects of the Model Context Protocol.","package":"grpcio"},{"reason":"Required for Protocol Buffers used in gRPC communication.","package":"protobuf"}],"imports":[{"note":"This is the main class for instantiating and running an MCP server.","symbol":"ModelContextProtocolServer","correct":"from mcp_server.server import ModelContextProtocolServer"},{"note":"Abstract base class to be implemented by users providing models.","symbol":"ModelProvider","correct":"from mcp_server.provider import ModelProvider"}],"quickstart":{"code":"import uvicorn\nfrom mcp_server.server import ModelContextProtocolServer\nfrom mcp_server.provider import ModelProvider\n\nclass MyModelProvider(ModelProvider):\n    def __init__(self):\n        super().__init__('my-model-provider-id')\n\n    async def get_model_artifact_uri(self, model_id: str) -> str:\n        # In a real scenario, this would return an S3 URI or similar\n        print(f\"Request for model_id: {model_id}\")\n        return f\"s3://my-bucket/models/{model_id}/artifact.tar.gz\"\n\n    async def get_model_context(self, model_id: str) -> dict:\n        # Return context specific to the model, e.g., framework, version\n        return {\"framework\": \"pytorch\", \"version\": \"1.13.1\", \"device\": \"cuda\"}\n\n# Instantiate your model provider\nprovider = MyModelProvider()\n\n# Create the MCP server instance\napp = ModelContextProtocolServer(provider=provider, port=8000)\n\n# Run the FastAPI app using Uvicorn\n# In a real deployment, you'd use a proper process manager (e.g., systemd, Kubernetes deployment)\n# For local testing, you can run this file directly and access http://localhost:8000/docs\n\n# Example of running the app via uvicorn programmatically\nif __name__ == \"__main__\":\n    print(\"Starting MCP server on http://localhost:8000\")\n    # Use reload=True for development, remove in production\n    uvicorn.run(app.get_app(), host=\"0.0.0.0\", port=8000)","lang":"python","description":"This quickstart demonstrates how to create a basic MCP server. It involves defining a custom `ModelProvider` class that implements the necessary methods to serve model artifacts and context. The `ModelContextProtocolServer` wraps this provider, exposing a FastAPI application. The server is then run using `uvicorn`, typically accessible via `http://localhost:8000` (or the configured port). Remember to install `uvicorn` separately."},"warnings":[{"fix":"Be aware that breaking changes might occur more frequently, and community support might be limited. Consider forks or alternative solutions for production critical workloads requiring enterprise-level support.","message":"This library is part of `aws-samples` and might not have the same level of official support, stability, or long-term maintenance guarantees as core AWS SDKs or services. It's intended as a reference implementation.","severity":"gotcha","affected_versions":"All versions (0.1.x)"},{"fix":"Ensure `uvicorn` is installed separately using `pip install uvicorn[standard]` or `pip install uvicorn` alongside the main library.","message":"The `awslabs-eks-mcp-server` package provides the server logic but requires `uvicorn` (or another ASGI server) to actually run the FastAPI application it exposes. `uvicorn` is not installed as a direct dependency.","severity":"gotcha","affected_versions":"All versions (0.1.x)"},{"fix":"Always pin to specific patch versions (e.g., `awslabs-eks-mcp-server==0.1.27`) in `requirements.txt` or `pyproject.toml` and thoroughly test when upgrading to newer versions. Refer to the GitHub repository's commit history for changes.","message":"As a pre-1.0 version (0.1.x), the API surface of `awslabs-eks-mcp-server` is subject to breaking changes without adhering to strict semantic versioning. Methods, class names, or expected inputs may change between minor versions.","severity":"breaking","affected_versions":"All versions (0.1.x)"}],"env_vars":null,"last_verified":"2026-04-17T00:00:00.000Z","next_check":"2026-07-16T00:00:00.000Z","problems":[{"fix":"Ensure the package is installed in the active environment: `pip install awslabs-eks-mcp-server`. If using a virtual environment, ensure it's activated.","cause":"The `awslabs-eks-mcp-server` package is not installed or the Python environment is incorrect.","error":"ModuleNotFoundError: No module named 'mcp_server'"},{"fix":"Use `uvicorn.run(app.get_app(), host=\"0.0.0.0\", port=8000)` where `app` is an instance of `ModelContextProtocolServer`. Ensure `uvicorn` is installed.","cause":"Attempting to run `uvicorn.run()` directly with the `FastAPI` instance returned by `app.get_app()` without correctly passing it to `uvicorn.run` or calling a `run()` method on the server object (which isn't always available).","error":"TypeError: 'FastAPI' object is not callable"},{"fix":"Ensure you have the necessary build tools installed for your operating system (e.g., `build-essential` on Debian/Ubuntu, Xcode Command Line Tools on macOS, Visual C++ Build Tools on Windows). Consider installing `grpcio` and `grpcio-tools` first: `pip install grpcio grpcio-tools` to debug build issues separately.","cause":"Installing `grpcio` or `grpcio-tools` (a dependency of `awslabs-eks-mcp-server`) can fail on some systems if required build tools (like C++ compilers) are missing.","error":"Failed to build wheel for grpcio"}]}