mcpField
S
S3 MCP Server

S3 MCP Server

Local
github.com/Geun-OhFiles & Storage5Updated 20w ago

About S3 MCP Server

S3 MCP Server provides MCP access to Amazon S3 buckets for users who need to work with stored objects through MCP. It supports prefix-filtered listings and streaming retrieval for large files.

Key features

  1. 01List objects with prefix filters
  2. 02Stream large file retrieval
  3. 03Return object content and metadata
  4. 04Configure server options through CLI

Use cases

  1. 01Find objects under a bucket prefix
  2. 02Read large files such as PDFs
  3. 03Provide S3 object access to MCP clients

MCP support

It exposes listObjects and getObject tools to MCP clients for listing bucket objects and retrieving their contents.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"s3-mcp-server-geun-oh": {
"command": "npx",
"args": [
"-y",
"@geunoh/s3-mcp-server"
]
}
}
}
Run commandnpx -y @geunoh/s3-mcp-server

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@geunoh/s3-mcp-server

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

S3 MCP Server

A Model Context Protocol (MCP) server for accessing Amazon S3 buckets. This server provides seamless integration with S3 storage through MCP, allowing efficient handling of large files including PDFs through streaming capabilities.

Features

  • S3 bucket object listing with prefix filtering
  • Efficient large file handling through streaming
  • Secure AWS credentials management
  • TypeScript support
  • CLI interface with customizable options

Installation

npx -y @geunoh/s3-mcp-server

Usage

Command Line Options
npx -y @geunoh/s3-mcp-server [options]

Options:

  • --port, -p: Server port (default: 3000)
  • --region, -r: AWS region (default: ap-northeast-2)
  • --bucket, -b: S3 bucket name (default: my-dancing-bucket)
  • --content-type, -t: Input file content type for uploads/downloads (default: application/octet-stream)
Environment Variables

Required:

export AWS_ACCESS_KEY_ID="your_access_key"
export AWS_SECRET_ACCESS_KEY="your_secret_key"

Optional:

export AWS_REGION="ap-northeast-2"
export S3_BUCKET_NAME="my-bucket-name"
export CONTENT_TYPE="application/octet-stream" # Optional: default MIME type for uploads/downloads
MCP Integration

Add to your mcp.json:

{
  "mcpServers": {
    "s3-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@geunoh/s3-mcp-server",
        "--region",
        "us-east-1",
        "--bucket",
        "my-test-bucket",
        "--content-type",
        "text/plain"
      ],
      "env": {
        "AWS_ACCESS_KEY_ID": "YOUR_AWS_ACCESS_KEY_ID",
        "AWS_SECRET_ACCESS_KEY": "YOUR_AWS_SECRET_ACCESS_KEY"
      }
    }
  }
}

Or like this way:

{
  "mcpServers": {
    "s3-mcp-server": {
      "command": "npx",
      "args": ["-y", "@geunoh/s3-mcp-server"],
      "env": {
        "AWS_ACCESS_KEY_ID": "YOUR_AWS_ACCESS_KEY_ID",
        "AWS_SECRET_ACCESS_KEY": "YOUR_AWS_SECRET_ACCESS_KEY",

        // optional
        "AWS_REGION": "us-east-1",
        "S3_BUCKET_NAME": "my-test-bucket"
      }
    }
  }
}

Available MCP Functions

listObjects

Lists objects in the S3 bucket.

Parameters:

  • prefix (optional): Filter objects by prefix
getObject

Retrieves an object from the S3 bucket. Optimized for large files through streaming.

Parameters:

  • key: The key of the object to retrieve

Returns:

  • stream: ReadableStream of the object content
  • contentType: MIME type of the object
  • contentLength: Size of the object in bytes
  • lastModified: Last modification timestamp
  • text: Text buffer of raw pdf ByteArray

AWS IAM Permissions

Minimum required permissions (see s3-policy.json):

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:ListBucket", "s3:GetObject"],
      "Resource": "arn:aws:s3:::my-bucket-name"
    }
  ]
}

Development

  1. Clone the repository:
git clone https://github.com/Geun-Oh/s3-mcp-server.git
cd s3-mcp-server
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run locally:
node dist/cli.js

Project Structure

.
├── src/              # TypeScript source files
├── dist/            # Compiled JavaScript files and runtime dependencies
├── tsconfig.json    # TypeScript configuration
└── package.json     # Project configuration and dependencies

Deployment

  1. Create a new version tag:
npm version patch
  1. Push to npm registry:
npm publish --access public

The GitHub Actions workflow will automatically publish the package when a new version tag is pushed.

License

MIT

Contributing

Issues and pull requests are welcome. Please ensure that your changes maintain the existing code style and include appropriate tests.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.