Registry / aws / awslabs-aws-api-mcp-server

awslabs-aws-api-mcp-server

JSON →
library1.5.3pypypi✓ verified 23d ago

The AWS API Model Context Protocol (MCP) Server provides a Python implementation of the gRPC-based Model Context Protocol. It allows an external client to provide API models and context to the server, assisting in API construction. It is currently at version 1.3.29 and receives regular updates, primarily for patch and minor feature releases.

pip install awslabs-aws-api-mcp-server
INSTALL
IMPORT
SIG · AWSLABS-AWS-API-MC
A
awslabs-aws-api-mcp-server
awspythonv1.5.3
Install
19.7s avg
Import
Disk
342MB
Pass rate
8/ 10
Env Coverage8 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.5.3 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✓ —
✓ 22.5s
py 3.11
✓ —
✓ 21.7s
py 3.12
✓ —
✓ 17.5s
py 3.13
✓ —
✓ 17.2s
py 3.9
✕ build_error
✕ build_error
342MB installed
● package 342MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

McpServer
from awslabs.aws_api_mcp_server import McpServer
from awslabs.aws_api_mcp_server import McpServer

This quickstart demonstrates how to set up a basic MCP server using `awslabs-aws-api-mcp-server`. It implements a custom `ModelContextServiceServicer` and starts an asynchronous gRPC server. In a real application, you would implement the `AddContext` and `GetContext` methods to handle actual model context operations.

import asyncio from concurrent import futures import grpc from mcp.server import McpServer from mcp.service import ModelContextServiceServicer from mcp.server.models.mcp_pb2_grpc import add_ModelContextServiceServicer_to_server from mcp.server.models.mcp_pb2 import AddContextRequest, AddContextResponse class MyMcpService(ModelContextServiceServicer): """Example implementation of the ModelContextServiceServicer.""" async def AddContext(self, request: AddContextRequest, context: grpc.aio.ServicerContext) -> AddContextResponse: print(f"Received AddContext request for model: {request.model_name}") # Implement actual context logic here return AddContextResponse(success=True, message="Context added successfully") async def GetContext(self, request, context): # Implement GetContext logic return super().GetContext(request, context) async def serve(): server = grpc.aio.server(futures.ThreadPoolExecutor(max_workers=10)) add_ModelContextServiceServicer_to_server(MyMcpService(), server) server.add_insecure_port('[::]:50051') print('Starting MCP server on port 50051') await server.start() await server.wait_for_termination() if __name__ == '__main__': asyncio.run(serve())
Debug
Known issues
gotchaThe server runs as an asynchronous gRPC service. Ensure your custom `ModelContextServiceServicer` implementations are also `async def` functions and correctly handle asynchronous operations. Blocking calls within these methods can degrade performance.
fix
All service methods (e.g., `AddContext`, `GetContext`) overridden from `ModelContextServiceServicer` should be defined with `async def` and use `await` for any asynchronous operations.
affects: All versions
breakingMajor changes to the underlying Model Context Protocol definition (e.g., in `mcp.proto`) could introduce breaking changes to the gRPC service interface. While `awslabs` strives for backward compatibility, new major versions of the library might reflect such protocol updates.
fix
Always review the changelog for breaking changes when upgrading to new major versions. Re-generating client stubs based on the updated `.proto` definition and updating your `ModelContextServiceServicer` implementation might be necessary.
affects: Potentially future major versions (e.x., 2.0.0+)
gotchaCorrectly loading and managing API models and context is crucial for the server's function. The example provides a basic `AddContext`, but production implementations will require robust storage and retrieval mechanisms for the models and their associated context.
fix
Design a proper data store (e.g., database, S3) and logic within your `ModelContextServiceServicer` to persist and retrieve model context. Consider concurrency and consistency requirements.
affects: All versions
gotchaThe library relies on specific versions of `grpcio` and `protobuf`. Incompatibility issues can arise if other projects in your environment use different or conflicting versions of these dependencies.
fix
Use a virtual environment to isolate project dependencies. If encountering issues, check `pip freeze` for `grpcio` and `protobuf` versions and align them with what `awslabs-aws-api-mcp-server` expects or is known to work with.
affects: All versions
Upgrade
Version history
1.5.3latest on PyPI · released Aug 27, 2026
Audit
Dependencies
grpciorequiredCore dependency for gRPC communication.
protobufrequiredUsed for protocol buffer serialization.
boto3requiredAWS SDK for Python, potentially used for interacting with other AWS services or loading models.
pydanticrequiredUsed for data validation and parsing.
jsonschemarequiredUsed for JSON schema validation.
Agent activity
34 hits · last 30 days
node
30
OpenAI (training)
2
Resources
awslabs-aws-api-mcp-server — pip install awslabs-aws-api-mcp-server · libregistry