S3 MCP Server

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.

Geun-Oh

Cloud Storage
Visit Server

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)

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"

MCP Integration

Add to your mcp.json:

{
  "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": "ap-northeast-2",
        "S3_BUCKET_NAME": "my-bucket-name",
      }
    }
  }
}

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.

Recommended Servers

Google Drive MCP Server

Google Drive MCP Server

Enables integration with Google Drive for listing, reading, and searching over files, supporting various file types with automatic export for Google Workspace files.

Local
JavaScript
AWS MCP Server

AWS MCP Server

A Model Context Protocol server implementation that enables Claude to perform AWS operations on S3 and DynamoDB services through natural language commands.

Local
Python
mcp-gsuite

mcp-gsuite

MCP server to interact with Google produts.

Local
Python
Filesystem MCP Server

Filesystem MCP Server

A Model Context Protocol server that provides file system operations, analysis, and manipulation capabilities through a standardized tool interface.

Local
TypeScript
Google Drive MCP Server

Google Drive MCP Server

Integrates with Google Drive to enable listing, searching, and reading files, plus reading and writing to Google Sheets.

Local
TypeScript
MCP TODO Checklist Server

MCP TODO Checklist Server

A server that implements a checklist management system with features like task creation, progress tracking, data persistence, and item comments.

Local
TypeScript
s3-tools

s3-tools

An MCP server that provides tools for interacting with AWS S3 buckets, enabling direct access to S3 operations through the Model Context Protocol.

Python
Azure MCP Server

Azure MCP Server

This server implements the Model Context Protocol for seamless interaction with Azure Blob Storage and Cosmos DB, enabling automatic logging and audit tracking of operations.

Python
Box MCP Server

Box MCP Server

The Box MCP Server facilitates searching and reading PDF and Word files in Box using Developer Token authentication.

JavaScript
MCP JSON Document Collection Server

MCP JSON Document Collection Server

A Model Context Protocol server that allows creation and management of multiple Fireproof JSON databases with CRUD operations, querying capabilities, and cloud synchronization for sharing databases with others.

JavaScript