
用于管理亚马逊迪纳摩DB资源的示范背景协议服务器
概览
一个用于管理Amazon DynamoDB资源的模型背景协议服务器. 该服务器为表格管理,容量管理和数据操作提供了工具. - 新建带有自定义配置的DynamoDB表格 - 列出已有表格 - 获取详细的表格信息 - 配置表格设置 - 创建和管理全球二级指数 -- -- 更新全球二级指数的能力 -- -- 创建地方二级指数 - 更新提供读/写容量单元 - 管理表格吞吐设置 - 在表格中插入或替换项目 - 按主密钥检索项目 - 更新特定项目属性 - 有条件查询表格 - 用过滤器扫描表格 : 不支持删除操作来防止意外数据丢失. 2. 将AWS证书配置为环境变量: 创建一个带有指定配置的新的 DynamoDB 表格.
概述(AI 翻译)
一个用于管理Amazon DynamoDB资源的模型背景协议服务器. 该服务器为表格管理,容量管理和数据操作提供了工具.
□ 作者( Y)
伊曼·卡米亚比([email protected])
□ 特性
表格管理
- 新建带有自定义配置的DynamoDB表格
- 列出现有表格
- 获得详细的表格信息
- 配置表格设置
索引管理
- 创建和管理全球二级指数
- 更新全球安全倡议的能力
- 创建本地二级指数(LSI)
能力管理
- 更新提供读写能力单位
- 管理表格通量设置
数据操作
- 在表格中插入或替换项目
- 按主钥匙检索物品
- 更新特定项目属性
- 有条件的查询表
- 用过滤器扫描表格
** 注**: 删除操作不支持防止意外数据丢失.
□ 设置
-
安装依赖性:
-
将AWS证书配置为环境变量:
-
构建服务器:
-
启动服务器:
□ 工具
QQ 创建( T) 创建一个带有指定配置的新的 DynamoDB 表格。
参数:
- [[T0]: 要创建的表格名称
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
DynamoDB MCP Server
A Model Context Protocol server for managing Amazon DynamoDB resources. This server provides tools for table management, capacity management, and data operations.
Author
Iman Kamyabi ([email protected])
Features
Table Management
- Create new DynamoDB tables with customizable configurations
- List existing tables
- Get detailed table information
- Configure table settings
Index Management
- Create and manage Global Secondary Indexes (GSI)
- Update GSI capacity
- Create Local Secondary Indexes (LSI)
Capacity Management
- Update provisioned read/write capacity units
- Manage table throughput settings
Data Operations
- Insert or replace items in tables
- Retrieve items by primary key
- Update specific item attributes
- Query tables with conditions
- Scan tables with filters
Note: Delete operations are not supported to prevent accidental data loss.
Setup
- 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
Tools
create_table
Creates a new DynamoDB table with specified configuration.
Parameters:
tableName: Name of the table to createpartitionKey: Name of the partition keypartitionKeyType: Type of partition key (S=String, N=Number, B=Binary)sortKey: (Optional) Name of the sort keysortKeyType: (Optional) Type of sort keyreadCapacity: Provisioned read capacity unitswriteCapacity: Provisioned write capacity units
Example:
{
"tableName": "Users",
"partitionKey": "userId",
"partitionKeyType": "S",
"readCapacity": 5,
"writeCapacity": 5
}
list_tables
Lists all DynamoDB tables in the account.
Parameters:
limit: (Optional) Maximum number of tables to returnexclusiveStartTableName: (Optional) Name of the table to start from for pagination
Example:
{
"limit": 10
}
describe_table
Gets detailed information about a DynamoDB table.
Parameters:
tableName: Name of the table to describe
Example:
{
"tableName": "Users"
}
create_gsi
Creates a global secondary index on a table.
Parameters:
tableName: Name of the tableindexName: Name of the new indexpartitionKey: Partition key for the indexpartitionKeyType: Type of partition keysortKey: (Optional) Sort key for the indexsortKeyType: (Optional) Type of sort keyprojectionType: Type of projection (ALL, KEYS_ONLY, INCLUDE)nonKeyAttributes: (Optional) Non-key attributes to projectreadCapacity: Provisioned read capacity unitswriteCapacity: Provisioned write capacity units
Example:
{
"tableName": "Users",
"indexName": "EmailIndex",
"partitionKey": "email",
安装
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配置
{
"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"
}
}
}
}