aws-readonly-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aws-readonly-mcplist my DynamoDB tables and show me the first few items in the users table"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
aws-readonly-mcp
A small MCP server that lets an AI agent browse DynamoDB and S3 without being able to change anything.
Guardrails
Read-only at the SDK layer. A botocore hook blocks every AWS operation that is not on an explicit allowlist (
ListTables,Query,GetObject, ...). Writes fail before the request leaves your machine, even if the credentials could write. Keep IAM read-only too.Capped results. Item lists and object reads are limited (default 50 items, 100 KB). Large results come back with a
next_tokenfor paging.Optional scoping. Limit which tables and buckets the agent can see.
No binary dumps. Binary S3 objects return metadata only.
Redaction. Sensitive values are scrubbed before the agent sees them (see below).
Audit log. Every call is recorded to an append-only JSONL file (see below).
Related MCP server: mcp-dbserver
Tools
Service | Tools |
DynamoDB |
|
S3 |
|
Install and run
Once published: uvx aws-readonly-mcp. From source:
python -m venv .venv && . .venv/bin/activate
pip install -e ".[dev]"
aws-readonly-mcp # speaks MCP over stdioIt uses the standard AWS credential chain (AWS_PROFILE, env vars, SSO, ...).
Configuration (environment variables)
Variable | Default | Meaning |
|
| Max items per DynamoDB page / S3 listing |
|
| Max bytes returned by |
| (all) | Comma-separated table allowlist |
| (all) | Comma-separated bucket allowlist |
| (none) | Extra attribute/key names to redact, e.g. |
| (none) | JSON list of extra regexes to scrub from values, e.g. |
|
| Set |
|
| Audit log path, or |
|
|
|
Redaction
Applied to every result, recursively:
Key names. Any key containing
password,passwd,secret,token,apikey,privatekey,authorizationorcredentialhas its whole value replaced with[REDACTED]. Names fromAWS_MCP_REDACT_ATTRIBUTESare matched exactly.Value patterns. AWS access key IDs, PEM private keys and JWTs are scrubbed from any string, plus your own regexes.
Text secrets.
DB_PASSWORD=hunter2or"api_key": "abc"inside a text file (for example in S3) has its value scrubbed.
Limits: redaction hides values; it can't recognise a secret with no telltale name or shape, and an agent can still probe a hidden attribute through filter expressions. For anything truly off limits, use the table and bucket allowlists.
Audit log
One JSON object per line, written to a file only you can read (mode 0600):
{"ts": "2026-10-17T22:10:03.512+00:00", "tool": "s3_read_object",
"args": {"bucket": "cfg", "key": "app.env"}, "status": "ok", "duration_ms": 41.3,
"summary": {"redactions": 2, "size": 71, "bytes_returned": 71, "truncated": false}}statusisok,errororblocked(guardrail refusal).Arguments are logged after redaction; results are never logged, only a size summary.
Fails closed by default. The server refuses to start if the log isn't writable, and if an entry can't be written mid-session the call returns an error instead of data. Set
AWS_MCP_AUDIT_FAIL_CLOSED=0for best-effort logging (warning on stderr, calls still succeed).Fail closed means a full disk or a broken path takes the tool offline. That is the point, but monitor it.
Releasing to PyPI
One-time setup, then every GitHub Release publishes automatically:
On pypi.org, add a pending publisher for project
aws-readonly-mcp: your GitHub user/repo, workflowpublish.yml, environmentpypi.In the GitHub repo, create an environment named
pypi(Settings > Environments).Bump
versioninpyproject.tomlandsrc/aws_readonly_mcp/__init__.py, then create a GitHub Release.
After that, anyone can run it with uvx aws-readonly-mcp.
Use with Claude Desktop
{
"mcpServers": {
"aws-readonly": {
"command": "/absolute/path/to/.venv/bin/aws-readonly-mcp",
"env": {
"AWS_PROFILE": "my-readonly-profile",
"AWS_MCP_ALLOWED_BUCKETS": "my-data-bucket"
}
}
}
}Tests
pytestTests run against moto, so no AWS account is needed.
Ideas for next versions
Step Functions and CloudWatch Logs tools, a --profile flag, and log rotation.
This server cannot be deployed
Maintenance
Related MCP Connectors
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Discover Frontier inference capabilities and read sanitized usage through read-only tools.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
AWS cloud security scanners for AI agents — S3, IAM, EC2, EKS, RDS, CloudTrail, CloudWatch Logs
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA read-only Model Context Protocol server that exposes over 60 AWS tools across services like EC2, S3, and IAM for AI agent interaction. It features multi-region support, resource caching, and audit logging to provide secure, AI-ready access to AWS infrastructure data.138 npmISC
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to securely query PostgreSQL with pgvector, DynamoDB, and MongoDB Atlas with Vector Search through a read-only, allowlisted MCP interface.MIT
- AlicenseAqualityAmaintenanceEnables AI agents to run read-only AWS security audits and receive normalized, severity-ranked findings about account posture, such as stale access keys, missing MFA, public buckets, open security groups, and CloudTrail coverage.11MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to inspect schemas, walk Delta table history, run read-only DuckDB queries, and check data-quality and job-run status safely.MIT