Cover image
Try Now
2025-03-26

⚙️用于访问Amazon S3存储桶的模型上下文协议(MCP)服务器。该服务器通过MCP提供了与S3存储的无缝集成,从而可以通过流媒体功能有效地处理包括PDF在内的大型文件。

3 years

Works with Finder

1

Github Watches

0

Github Forks

0

Github Stars

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Lists Tailwind CSS classes in monospaced font

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    3 (1)
    Avatar
    user_qes4GeT8
    2025-04-16

    I've been using the s3-mcp-server by Geun-Oh for a while now, and it's simply outstanding. The seamless integration and efficient performance make it a standout choice for any MCP application needs. Highly recommend checking it out on GitHub!