The DynamoDB MCP Server provides a Model Context Protocol interface for managing Amazon DynamoDB resources, allowing you to control tables, indexes, capacity, and perform data operations through natural language interactions with Claude.
Install dependencies:
npm install
Configure AWS credentials as environment variables:
export AWS_ACCESS_KEY_ID="your_access_key"
export AWS_SECRET_ACCESS_KEY="your_secret_key"
export AWS_REGION="your_region"
Build the server:
npm run build
Start the server:
npm start
You can also run the server using Docker:
docker build -t mcp/dynamodb-mcp-server -f Dockerfile .
docker run -i --rm -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -e AWS_REGION -e AWS_SESSION_TOKEN mcp/dynamodb-mcp-server
Add this to your claude_desktop_config.json
:
{
"mcpServers": {
"dynamodb": {
"command": "docker",
"args": [ "run", "-i", "--rm", "-e", "AWS_ACCESS_KEY_ID", "-e", "AWS_SECRET_ACCESS_KEY", "-e", "AWS_REGION", "-e", "AWS_SESSION_TOKEN", "mcp/dynamodb-mcp-server" ],
"env": {
"AWS_ACCESS_KEY_ID": "your_access_key",
"AWS_SECRET_ACCESS_KEY": "your_secret_key",
"AWS_REGION": "your_region",
"AWS_SESSION_TOKEN": "your_session_token"
}
}
}
}
Creates a new DynamoDB table with specified configuration.
Example request:
{
"tableName": "Users",
"partitionKey": "userId",
"partitionKeyType": "S",
"readCapacity": 5,
"writeCapacity": 5
}
Lists all DynamoDB tables in the account.
Example request:
{
"limit": 10
}
Gets detailed information about a DynamoDB table.
Example request:
{
"tableName": "Users"
}
Creates a global secondary index on a table.
Example request:
{
"tableName": "Users",
"indexName": "EmailIndex",
"partitionKey": "email",
"partitionKeyType": "S",
"projectionType": "ALL",
"readCapacity": 5,
"writeCapacity": 5
}
Updates the provisioned capacity of a global secondary index.
Example request:
{
"tableName": "Users",
"indexName": "EmailIndex",
"readCapacity": 10,
"writeCapacity": 10
}
Creates a local secondary index on a table (must be done during table creation).
Example request:
{
"tableName": "Users",
"indexName": "CreatedAtIndex",
"partitionKey": "userId",
"partitionKeyType": "S",
"sortKey": "createdAt",
"sortKeyType": "N",
"projectionType": "ALL"
}
Updates the provisioned capacity of a table.
Example request:
{
"tableName": "Users",
"readCapacity": 10,
"writeCapacity": 10
}
Inserts or replaces an item in a table.
Example request:
{
"tableName": "Users",
"item": {
"userId": "123",
"name": "John Doe",
"email": "[email protected]"
}
}
Retrieves an item from a table by its primary key.
Example request:
{
"tableName": "Users",
"key": {
"userId": "123"
}
}
Updates specific attributes of an item in a table.
Example request:
{
"tableName": "Users",
"key": {
"userId": "123"
},
"updateExpression": "SET #n = :name",
"expressionAttributeNames": {
"#n": "name"
},
"expressionAttributeValues": {
":name": "Jane Doe"
}
}
Queries a table using key conditions and optional filters.
Example request:
{
"tableName": "Users",
"keyConditionExpression": "userId = :id",
"expressionAttributeValues": {
":id": "123"
}
}
Scans an entire table with optional filters.
Example request:
{
"tableName": "Users",
"filterExpression": "age > :minAge",
"expressionAttributeValues": {
":minAge": 21
}
}
You can ask Claude natural language questions to interact with your DynamoDB database:
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.