Public
Like
ContextualLite
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v14View latest version
A Model Context Protocol (MCP) server that provides access to AWS services including DynamoDB and S3. This server exposes prompts, resources, and tools for interacting with your AWS infrastructure.
- analyze-data: Analyze data from DynamoDB and S3 resources
- data-summary: Generate a summary of available data sources
- S3 Objects: Access and read objects from your S3 bucket
- Automatic MIME type detection
- Object metadata (size, last modified)
- dynamodb-get: Get an item by key
- dynamodb-put: Store an item
- dynamodb-delete: Delete an item by key
- dynamodb-query: Query items with conditions
- s3-get: Download object content
- s3-put: Upload object content
- s3-delete: Delete an object
- s3-move: Move/rename an object
Set the following environment variables:
export AWS_REGION="us-east-1" export AWS_ACCESS_KEY_ID="your-access-key" export AWS_SECRET_ACCESS_KEY="your-secret-key" export S3_BUCKET="your-bucket-name" export DYNAMODB_TABLE="your-table-name"
deno run --allow-all index.ts
Add this to your MCP client configuration (e.g., Claude Desktop):
{ "mcpServers": { "aws-mcp-server": { "command": "deno", "args": ["run", "--allow-all", "/path/to/index.ts"], "env": { "AWS_REGION": "us-east-1", "AWS_ACCESS_KEY_ID": "${AWS_ACCESS_KEY_ID}", "AWS_SECRET_ACCESS_KEY": "${AWS_SECRET_ACCESS_KEY}", "S3_BUCKET": "${S3_BUCKET}", "DYNAMODB_TABLE": "${DYNAMODB_TABLE}" } } } }
// Get an item
await callTool("dynamodb-get", {
key: { id: "user123" }
});
// Put an item
await callTool("dynamodb-put", {
item: { id: "user123", name: "John Doe", email: "john@example.com" }
});
// Query items
await callTool("dynamodb-query", {
keyConditionExpression: "id = :id",
expressionAttributeValues: { ":id": "user123" }
});
// Delete an item
await callTool("dynamodb-delete", {
key: { id: "user123" }
});
// Get object content
await callTool("s3-get", {
key: "documents/report.txt"
});
// Upload content
await callTool("s3-put", {
key: "documents/new-file.txt",
content: "Hello, World!",
contentType: "text/plain"
});
// Move/rename object
await callTool("s3-move", {
sourceKey: "old-location/file.txt",
destinationKey: "new-location/file.txt"
});
// Delete object
await callTool("s3-delete", {
key: "documents/old-file.txt"
});
// Analyze specific data
await getPrompt("analyze-data", {
table_key: "user123",
s3_key: "analytics/user-data.json"
});
// Get data summary
await getPrompt("data-summary");
// List all S3 resources
await listResources();
// Read specific S3 object
await readResource("s3://your-bucket/path/to/file.txt");
- Use IAM roles with minimal required permissions
- Consider using temporary credentials (STS) for enhanced security
- Ensure your S3 bucket and DynamoDB table have appropriate access policies
- Never commit AWS credentials to version control
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:GetObject", "s3:PutObject", "s3:DeleteObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::your-bucket-name", "arn:aws:s3:::your-bucket-name/*" ] } ] }
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:DeleteItem", "dynamodb:Query", "dynamodb:Scan" ], "Resource": "arn:aws:dynamodb:region:account:table/your-table-name" } ] }
The server includes comprehensive error handling for:
- Missing environment variables
- AWS service errors
- Invalid parameters
- Network connectivity issues
All errors are properly formatted and returned to the MCP client with descriptive messages.