• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
c15r

c15r

ContextualLite

Public
Like
ContextualLite
Home
Code
9
README.md
deploy.ts
example.env
index.ts
mcp-config.json
package.json
test.ts
tools.ts
types.ts
Branches
2
Pull requests
Remixes
History
Environment variables
7
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.
Sign up now
Code
/
README.md
Code
/
README.md
Search
6/10/2025
Viewing readonly version of main branch: v14
View latest version
README.md

AWS MCP Server

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.

Features

Prompts

  • analyze-data: Analyze data from DynamoDB and S3 resources
  • data-summary: Generate a summary of available data sources

Resources

  • S3 Objects: Access and read objects from your S3 bucket
  • Automatic MIME type detection
  • Object metadata (size, last modified)

Tools

DynamoDB Operations

  • 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 Operations

  • s3-get: Download object content
  • s3-put: Upload object content
  • s3-delete: Delete an object
  • s3-move: Move/rename an object

Setup

Environment Variables

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"

Running the Server

deno run --allow-all index.ts

MCP Client Configuration

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}" } } } }

Usage Examples

DynamoDB Operations

// 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" } });

S3 Operations

// 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" });

Using Prompts

// Analyze specific data await getPrompt("analyze-data", { table_key: "user123", s3_key: "analytics/user-data.json" }); // Get data summary await getPrompt("data-summary");

Accessing Resources

// List all S3 resources await listResources(); // Read specific S3 object await readResource("s3://your-bucket/path/to/file.txt");

Security Considerations

  • 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

Required AWS Permissions

S3 Permissions

{ "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/*" ] } ] }

DynamoDB Permissions

{ "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" } ] }

Error Handling

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.

FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.