The `awslabs-dynamodb-mcp-server` is an official Model Context Protocol (MCP) server for Amazon DynamoDB, designed to provide expert design guidance and data modeling assistance. It integrates with AI-powered assistants (like Amazon Q Developer) by exposing specialized tools. This server facilitates the design of DynamoDB data models through natural language conversations, validates proposed models, and can generate infrastructure-as-code resources (e.g., CDK applications). As of version 2.x, its primary focus is on data modeling and design; operational tasks like CRUD and table management have been transitioned to the generic AWS API MCP Server.
pip install awslabs-dynamodb-mcp-serverNo compatibility data collected yet for this library.
The `awslabs-dynamodb-mcp-server` is primarily designed to be run as a server and configured within an MCP client (e.g., Amazon Q Developer CLI, Kiro, Cursor). This quickstart provides an example JSON configuration snippet typically placed in a client's `mcp.json` file. The `command` and `args` specify how the client should launch the DynamoDB MCP server, often utilizing `uvx` (a runtime for MCP servers) or Docker. Environment variables like `AWS_REGION` and AWS credentials (e.g., `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`) are crucial for the server to interact with AWS services, usually sourced from your environment or AWS configuration.
For operational DynamoDB management, migrate to using the AWS API MCP Server. If you absolutely require the legacy operational tools, pin your dependency to version 1.0.9, though this is not recommended for new projects.
Review the telemetry RFC (GitHub issue #2382) for full details on data collected. Users can opt-out of telemetry collection if desired; instructions are typically provided in the official documentation or GitHub README.
Ensure your AWS credentials (environment variables, shared credentials file, or IAM role) have appropriate, least-privilege permissions for DynamoDB. Specifically, use read-only permissions if modification is not intended.
When enabling MySQL integration, set `MYSQL_CLUSTER_ARN`, `MYSQL_SECRET_ARN`, `MYSQL_DATABASE`, and `AWS_REGION` environment variables in your MCP server configuration. `MYSQL_MAX_QUERY_RESULTS` is optional.
Install the module using pip: 'pip install awslabs-dynamodb-mcp-server'.
Use the correct import statement: 'from awslabs.dynamodb_mcp_server import <module_or_function>'.
Ensure the 'mcp' module is installed using pip: 'pip install mcp'. Also, check for any local modules named 'mcp' and rename them to avoid conflicts.
Use the correct import statement: 'from boto3.dynamodb.conditions import Key'.
Use the 'import_table' method from the 'boto3' DynamoDB service resource: 'dynamodb = boto3.resource('dynamodb'); dynamodb.import_table(...)'.