---
title: "Deploy AWS S3 MCP"
description: "Deploy and AWS S3 MCP with Railway"
category: "Automation"
url: https://railway.com/deploy/aws-s3-mcp
---

# Deploy AWS S3 MCP

Deploy and AWS S3 MCP with Railway

**[Deploy AWS S3 MCP on Railway](https://railway.com/template/aws-s3-mcp)**

- **Creator:** fournyp's Projects
- **Category:** Automation

## Template content

### AWS S3 MCP Gateway https://cdn.simpleicons.org/nginx

- **Source:** https://github.com/FournyP/aws-s3-mcp-railway-template
- **Health check:** /health
- **Public domain:** Yes

### AWS S3 MCP https://api.iconify.design/simple-icons:modelcontextprotocol.svg

- **Source:** https://github.com/FournyP/aws-s3-mcp-railway-template
- **Health check:** /health

## Documentation

![AWS S3 MCP logo](https://raw.githubusercontent.com/FournyP/aws-s3-mcp-railway-template/main/icon.svg)

# Deploy and Host AWS S3 MCP on Railway

AWS S3 MCP is a Model Context Protocol server that exposes S3 buckets to LLM clients as tools — `list-buckets`, `list-objects`, and `get-object`. This template deploys the MCP server behind an nginx bearer-token auth gateway, so an LLM can safely read objects from a publicly reachable endpoint.

## About Hosting AWS S3 MCP

The upstream project has no built-in authentication, so this template places an nginx service in front that validates every request against a comma-separated list of bearer tokens before proxying to the MCP over Railway's private network. The MCP can be pointed at any S3-compatible storage — AWS S3, a Railway bucket, MinIO, Cloudflare R2, or Backblaze B2.

## Common Use Cases

- Give Claude, Cursor, or other MCP clients read access to files in S3
- Retrieval-Augmented Generation (RAG) over documents stored in a bucket
- Agent workflows that need to inspect build artifacts, logs, or exports
- Secure sharing of an S3 tool endpoint with teammates via a bearer token

## Dependencies for AWS S3 MCP Hosting

The template ships the nginx auth gateway and the AWS S3 MCP server. You bring the storage: attach a Railway bucket after deploy, or point the MCP at an external S3-compatible provider.

### Deployment Dependencies

- Credentials for the target S3-compatible storage (access key, secret, endpoint, region, bucket name).

## Implementation Details

### Architecture Components

This template deploys two services:

- **Gateway**: `nginx:alpine` with a public Railway domain. Validates `Authorization: Bearer ` against `API_KEYS` and proxies the rest to the MCP over Railway's private network with SSE-friendly settings.
- **AWS S3 MCP**: the [samuraikun/aws-s3-mcp](https://github.com/samuraikun/aws-s3-mcp) server (pinned to `v0.4.0`) running in HTTP transport mode. No public domain — reachable only via `mcp.railway.internal:3000`.

### Authentication

Clients must send `Authorization: Bearer ` where ``is one of the comma-separated entries in `API_KEYS`. Generate keys with `openssl rand -hex 32`; rotating is a variable update + gateway redeploy.

### Service Configuration

- **MCP endpoint**: `https:///mcp`.
- **Storage**: set `AWS_ACCESS_KEY_ID`, `AWS_REGION`, and `S3_BUCKETS` on the MCP service. For a Railway bucket, use reference variables against the bucket's credentials.

## License Information

MIT (aws-s3-mcp) + BSD-2-Clause (nginx).

## Why Deploy AWS S3 MCP on Railway?

The auth gateway, private-network wiring, and SSE passthrough are all pre-configured — giving an MCP client secure read access to S3 is a one-click deploy instead of a custom nginx + reverse-proxy project.

## Notes

- Source repo: https://github.com/FournyP/aws-s3-mcp-railway-template
- Upstream MCP server: https://github.com/samuraikun/aws-s3-mcp
- Model Context Protocol: https://modelcontextprotocol.io

## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/aws-s3-mcp
