dynamodb — Claude Code MCP server: what it does, how to install
Connects AI coding assistants to AWS DynamoDB or LocalStack with granular permission groups for reading, writing, and administration.
claude mcp add --env AWS_REGION=<AWS_REGION> --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --env DYNAMODB_ENDPOINT=<DYNAMODB_ENDPOINT> --env DYNAMODB_ENABLED_TOOL_GROUPS=<DYNAMODB_ENABLED_TOOL_GROUPS> --transport stdio dynamodb -- npx -y aws-dynamodb-mcp-serverWhat dynamodb does
The server exposes DynamoDB actions via aws-dynamodb-mcp-server. The agent can inspect table schemas, fetch items by key, execute query and scan filters, and handle batch operations. Administrative calls let it create, update, or drop tables.
Access is controlled through environment flags. You can restrict permissions to the readonly group or set an explicit whitelist with DYNAMODB_ENABLED_TOOLS. To limit the scope of changes, list target tables in DYNAMODB_ALLOWED_TABLES. Table name matching is case-sensitive: a mismatch in casing triggers an access denied error.
The server works with standard AWS regions and custom endpoints via DYNAMODB_ENDPOINT. The AWS_REGION variable is mandatory even when targeting local endpoints.
What it helps with
- query table items using key conditions and attribute filters
- inspect table schemas and secondary indexes
- isolate the agent to read-only access on specific tables
- run queries against a local LocalStack instance during development
Example prompts for the agent
- List all DynamoDB tables available in the current region.
- Query the Orders table for customer C123 records from the past month.
- Create a Users table with userId as the partition key using on-demand billing.
How to install dynamodb
Platform CLI
claude mcp add --env AWS_REGION=<AWS_REGION> --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --env DYNAMODB_ENDPOINT=<DYNAMODB_ENDPOINT> --env DYNAMODB_ENABLED_TOOL_GROUPS=<DYNAMODB_ENABLED_TOOL_GROUPS> --transport stdio dynamodb -- npx -y aws-dynamodb-mcp-serverReplace <…> with your own values. 4 more environment variables are in the server README
Platform CLI
codex mcp add dynamodb --env AWS_REGION=<AWS_REGION> --env AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> --env AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> --env DYNAMODB_ENDPOINT=<DYNAMODB_ENDPOINT> --env DYNAMODB_ENABLED_TOOL_GROUPS=<DYNAMODB_ENABLED_TOOL_GROUPS> -- npx -y aws-dynamodb-mcp-serverReplace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"mcpServers": {
"dynamodb": {
"command": "npx",
"args": [
"-y",
"aws-dynamodb-mcp-server"
],
"env": {
"AWS_REGION": "<AWS_REGION>",
"AWS_ACCESS_KEY_ID": "<AWS_ACCESS_KEY_ID>",
"AWS_SECRET_ACCESS_KEY": "<AWS_SECRET_ACCESS_KEY>",
"DYNAMODB_ENDPOINT": "<DYNAMODB_ENDPOINT>",
"DYNAMODB_ENABLED_TOOL_GROUPS": "<DYNAMODB_ENABLED_TOOL_GROUPS>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Config file
{
"servers": {
"dynamodb": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"aws-dynamodb-mcp-server"
],
"env": {
"AWS_REGION": "<AWS_REGION>",
"AWS_ACCESS_KEY_ID": "<AWS_ACCESS_KEY_ID>",
"AWS_SECRET_ACCESS_KEY": "<AWS_SECRET_ACCESS_KEY>",
"DYNAMODB_ENDPOINT": "<DYNAMODB_ENDPOINT>",
"DYNAMODB_ENABLED_TOOL_GROUPS": "<DYNAMODB_ENABLED_TOOL_GROUPS>"
}
}
}
}Replace <…> with your own values. 4 more environment variables are in the server README
Platform CLI
gemini mcp add -e AWS_REGION=<AWS_REGION> -e AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> -e AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> -e DYNAMODB_ENDPOINT=<DYNAMODB_ENDPOINT> -e DYNAMODB_ENABLED_TOOL_GROUPS=<DYNAMODB_ENABLED_TOOL_GROUPS> dynamodb npx -y aws-dynamodb-mcp-serverReplace <…> with your own values. 4 more environment variables are in the server README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about dynamodb
How to install dynamodb in Claude Code?
Run `claude mcp add dynamodb -e AWS_REGION=<AWS_REGION> -e AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> -e AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> -- npx -y aws-dynamodb-mcp-server`. Replace placeholder values with your actual AWS credentials.
What does the dynamodb MCP server do?
It provides tools for querying, scanning, updating, and administering DynamoDB tables. It also lets you enforce read-only policies or restrict operations to specific tables.
Does it support LocalStack or local DynamoDB?
Yes, pass the local URL into the DYNAMODB_ENDPOINT environment variable, such as http://localhost:8000.