Aws S3 MCP Server 943fab64

MCP运维云端

提供方 aliamirk

运维云端 stdio · 本地进程 无需鉴权 社区 / 第三方
查看接入方式

一个提供全面AWS S3管理功能的MCP服务器,支持存储桶操作、对象管理、访问控制、元数据标记和成本分析。

一句话选型结论

按资料字段整理

Aws S3 MCP Server 943fab64 属于运维云端类 MCP 服务器,stdio · 本地进程,无需鉴权,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类运维云端 传输方式stdio · 本地进程 鉴权无需鉴权 部署方式本地部署
GitHub 星标 0 仓库热度,无公开仓库时显示未标注
工具数 14 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

运维云端
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量14暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

适用场景

AWSS3Python本地部署云存储管理存储桶操作对象管理访问控制元数据标记

安装与配置

stdio · 本地进程 无需鉴权
客户端在本机拉起子进程,数据不出本机
pip install -r requirements.txt

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Node.js 等运行时,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后客户端会列出约 14 个工具,随便调一个只读工具确认能返回结果。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
云资源查询

查实例、存储、账单等云上资源状态。

部署与发布

把部署、重启、回滚这类操作接进对话。

监控与告警

拉取监控指标,异常时让模型帮你判断。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 资料标注 14 个工具,覆盖面较广,能满足多种调用。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 资料标注无需鉴权,装好就能连。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
Aws S3 MCP Server 943fab64当前 14 stdio · 本地进程 本地部署 有 2026-05-17
lobehub 未标注 stdio · 本地进程 本地部署 有 2026-04-11
TrendRadar 未标注 stdio · 本地进程 本地部署 有 2026-04-13
Ui Tars Desktop 8a825770 未标注 stdio · 本地进程 本地部署 有 2026-05-17
ruflo 未标注 stdio · 本地进程 本地部署 有 2026-04-13
FastGPT 未标注 stdio · 本地进程 本地部署 有 2026-04-11

服务器档案

运维云端
字段来自项目仓库与公开索引,中文说明由本站标注
提供方aliamirk上游标注的维护方 aliamirk
分类运维云端本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式无需鉴权远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时未标注 · 未标注本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-05-17上游最后核验时间

详细介绍

24.9 KB
来自项目仓库与上游目录的原文,未做删改

AWS S3 MCP Server

An MCP (Model Context Protocol) server that provides comprehensive AWS S3 management capabilities. Built with the fastmcp framework and boto3, this server exposes 14 tools for bucket operations, object management, access control, metadata tagging, and cost analysis.

Table of Contents

  • Features
  • Requirements
  • Installation
  • Configuration
  • AWS Credentials
  • Required IAM Permissions
  • Usage
  • Starting the Server
  • Using with MCP Clients
  • Tools Reference
  • Bucket Management
  • Object Operations
  • Access Control
  • Metadata & Tagging
  • Cost Analysis
  • Error Handling
  • Troubleshooting
  • Development
  • License

Features

Bucket Management

  • list_buckets: List all S3 buckets in your AWS account
  • create_bucket: Create new S3 buckets with optional region specification
  • delete_bucket: Delete empty S3 buckets
  • get_bucket_region: Retrieve the AWS region of a bucket

Object Operations

  • list_objects: List objects in a bucket with optional prefix filtering and pagination
  • get_object_metadata: Retrieve metadata for S3 objects
  • upload_object: Upload files to S3 with custom metadata and content types
  • delete_object: Delete objects from S3
  • copy_object: Copy objects within S3 (preserves metadata)
  • move_object: Move objects within S3 (atomic copy-then-delete)

Access Control

  • generate_presigned_download_url: Generate time-limited download URLs

Metadata & Tagging

  • add_tags: Add or update tags on S3 objects
  • search_by_tag: Search for objects by tag key and value

Cost Analysis

  • calculate_bucket_storage_cost: Calculate estimated monthly storage costs

Requirements

  • Python 3.8 or higher
  • AWS account with appropriate S3 permissions
  • AWS credentials configured (see Configuration section)

Installation

From Source```bash

Clone the repository

git clone <repository-url>
cd aws-s3-mcp-server

Install dependencies

pip install -r requirements.txt

Install the package in development mode

pip install -e .


### Using pip```bash
pip install aws-s3-mcp-server

Configuration

AWS Credentials

The server uses the standard AWS credential chain. Configure your credentials using one of these methods:

1. Environment Variables```bash

export AWS_ACCESS_KEY_ID=your_access_key
export AWS_SECRET_ACCESS_KEY=your_secret_key
export AWS_SESSION_TOKEN=your_session_token # Optional, for temporary credentials
export AWS_DEFAULT_REGION=us-east-1 # Optional


#### 2. AWS Credentials File

Create or edit `~/.aws/credentials`:```ini
[default]
aws_access_key_id = your_access_key
aws_secret_access_key = your_secret_key

Optionally, configure the default region in ~/.aws/config:```ini
[default]
region = us-east-1


#### 3. IAM Role (AWS Infrastructure)

When running on AWS infrastructure (EC2, ECS, Lambda), the server automatically uses the IAM role attached to the instance. No additional configuration is required.

### Required IAM Permissions

The AWS credentials must have the following S3 permissions:```json
{
  &quot;Version&quot;: &quot;2012-10-17&quot;,
  &quot;Statement&quot;: [
    {
      &quot;Effect&quot;: &quot;Allow&quot;,
      &quot;Action&quot;: [
        &quot;s3:ListAllMyBuckets&quot;,
        &quot;s3:CreateBucket&quot;,
        &quot;s3:DeleteBucket&quot;,
        &quot;s3:GetBucketLocation&quot;,
        &quot;s3:ListBucket&quot;,
        &quot;s3:GetObject&quot;,
        &quot;s3:GetObjectMetadata&quot;,
        &quot;s3:PutObject&quot;,
        &quot;s3:DeleteObject&quot;,
        &quot;s3:CopyObject&quot;,
        &quot;s3:GetObjectTagging&quot;,
        &quot;s3:PutObjectTagging&quot;
      ],
      &quot;Resource&quot;: &quot;*&quot;
    }
  ]
}

For production environments, consider restricting the Resource field to specific buckets:```json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": ["s3:ListAllMyBuckets"],
"Resource": ""
},
{
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:GetBucketLocation",
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::your-bucket-prefix-
"
},
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:GetObjectMetadata",
"s3:PutObject",
"s3:DeleteObject",
"s3:CopyObject",
"s3:GetObjectTagging",
"s3:PutObjectTagging"
],
"Resource": "arn:aws:s3:::your-bucket-prefix-/"
}
]
}


## Usage

### Starting the Server```bash
# Run the server
aws-s3-mcp-server

# Or run directly with Python
python -m aws_s3_mcp_server.server

The server will:
1. Load AWS credentials from the credential chain
2. Initialize the boto3 S3 client
3. Register all 14 tools
4. Start listening for MCP client connections

If credentials are not found, the server will log an error and exit with a non-zero status code.

Using with MCP Clients

Once the server is running, MCP clients can connect and invoke the available tools. Refer to your MCP client documentation for connection details.

Tools Reference

All tools return JSON-formatted responses with a consistent structure:

Success Response:```json
{
"success": true,
"data": {
// Tool-specific data
}
}


**Error Response:**```json
{
  &quot;success&quot;: false,
  &quot;error&quot;: {
    &quot;message&quot;: &quot;Descriptive error message&quot;,
    &quot;code&quot;: &quot;AWS_ERROR_CODE&quot;,
    &quot;type&quot;: &quot;ErrorType&quot;
  }
}

Bucket Management

list_buckets

List all S3 buckets in the AWS account.

Parameters: None

Returns:```json
{
"success": true,
"data": {
"buckets": [
{
"name": "my-bucket",
"creation_date": "2024-01-01T00:00:00+00:00"
}
]
}
}


**Example:**```python
result = list_buckets()

create_bucket

Create a new S3 bucket.

Parameters:
- bucket_name (string, required): Name of the bucket to create (must be globally unique)
- region (string, optional): AWS region for the bucket (default: us-east-1)

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-new-bucket",
"region": "us-west-2",
"message": "Bucket 'my-new-bucket' created successfully in region us-west-2"
}
}


**Example:**```python
# Create bucket in default region (us-east-1)
result = create_bucket(&quot;my-new-bucket&quot;)

# Create bucket in specific region
result = create_bucket(&quot;my-new-bucket&quot;, region=&quot;us-west-2&quot;)

Notes:
- Bucket names must be globally unique across all AWS accounts
- Bucket names must be 3-63 characters long
- Bucket names can contain lowercase letters, numbers, and hyphens
- Bucket names must start and end with a letter or number

delete_bucket

Delete an S3 bucket.

Parameters:
- bucket_name (string, required): Name of the bucket to delete

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-old-bucket",
"message": "Bucket 'my-old-bucket' deleted successfully"
}
}


**Example:**```python
result = delete_bucket(&quot;my-old-bucket&quot;)

Notes:
- The bucket must be empty before it can be deleted
- If the bucket contains objects, the operation will fail with a BucketNotEmpty error

get_bucket_region

Get the AWS region where a bucket is located.

Parameters:
- bucket_name (string, required): Name of the bucket

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"region": "us-west-2"
}
}


**Example:**```python
result = get_bucket_region(&quot;my-bucket&quot;)

Object Operations

list_objects

List objects in an S3 bucket.

Parameters:
- bucket_name (string, required): Name of the bucket
- prefix (string, optional): Filter objects by key prefix (default: "")
- max_keys (integer, optional): Maximum number of objects to return (default: 1000)

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"prefix": "docs/",
"objects": [
{
"key": "docs/file1.txt",
"size": 1024,
"last_modified": "2024-01-01T00:00:00+00:00"
}
],
"count": 1
}
}


**Example:**```python
# List all objects
result = list_objects(&quot;my-bucket&quot;)

# List objects with prefix
result = list_objects(&quot;my-bucket&quot;, prefix=&quot;docs/&quot;)

# List with limit
result = list_objects(&quot;my-bucket&quot;, prefix=&quot;docs/&quot;, max_keys=10)

get_object_metadata

Get metadata for an S3 object.

Parameters:
- bucket_name (string, required): Name of the bucket
- object_key (string, required): Key of the object

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"object_key": "docs/file.txt",
"content_type": "text/plain",
"size": 1024,
"last_modified": "2024-01-01T00:00:00+00:00",
"etag": "\"abc123...\"",
"metadata": {
"author": "John Doe",
"project": "demo"
}
}
}


**Example:**```python
result = get_object_metadata(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;)

upload_object

Upload a file to S3.

Parameters:
- bucket_name (string, required): Name of the bucket
- object_key (string, required): Key for the object in S3
- file_path (string, required): Local file path to upload
- content_type (string, optional): MIME type of the file
- metadata (string, optional): Custom metadata as JSON string

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"object_key": "docs/file.txt",
"message": "Successfully uploaded object 'docs/file.txt' to bucket 'my-bucket'"
}
}


**Example:**```python
# Simple upload
result = upload_object(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;, &quot;/tmp/file.txt&quot;)

# Upload with content type
result = upload_object(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;, &quot;/tmp/file.txt&quot;,
                       content_type=&quot;text/plain&quot;)

# Upload with metadata
result = upload_object(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;, &quot;/tmp/file.txt&quot;,
                       content_type=&quot;text/plain&quot;,
                       metadata=&#x27;{&quot;author&quot;: &quot;John&quot;, &quot;project&quot;: &quot;demo&quot;}&#x27;)

Notes:
- The metadata parameter must be a valid JSON string representing a dictionary
- Custom metadata keys are automatically prefixed with x-amz-meta- by AWS

delete_object

Delete an object from S3.

Parameters:
- bucket_name (string, required): Name of the bucket
- object_key (string, required): Key of the object to delete

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"object_key": "docs/file.txt",
"message": "Successfully deleted object 'docs/file.txt' from bucket 'my-bucket'"
}
}


**Example:**```python
result = delete_object(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;)

Notes:
- This operation is idempotent - it succeeds even if the object doesn't exist

copy_object

Copy an object from one S3 location to another.

Parameters:
- source_bucket (string, required): Source bucket name
- source_key (string, required): Source object key
- dest_bucket (string, required): Destination bucket name
- dest_key (string, required): Destination object key

Returns:```json
{
"success": true,
"data": {
"source_bucket": "source-bucket",
"source_key": "source/file.txt",
"dest_bucket": "dest-bucket",
"dest_key": "dest/file.txt",
"message": "Successfully copied object from 'source-bucket/source/file.txt' to 'dest-bucket/dest/file.txt'"
}
}


**Example:**```python
# Copy within same bucket
result = copy_object(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;, &quot;my-bucket&quot;, &quot;archive/file.txt&quot;)

# Copy to different bucket
result = copy_object(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;, &quot;backup-bucket&quot;, &quot;file.txt&quot;)

Notes:
- All metadata from the source object is preserved in the copy
- The source object remains unchanged

move_object

Move an object from one S3 location to another.

Parameters:
- source_bucket (string, required): Source bucket name
- source_key (string, required): Source object key
- dest_bucket (string, required): Destination bucket name
- dest_key (string, required): Destination object key

Returns:```json
{
"success": true,
"data": {
"source_bucket": "source-bucket",
"source_key": "source/file.txt",
"dest_bucket": "dest-bucket",
"dest_key": "dest/file.txt",
"message": "Successfully moved object from 'source-bucket/source/file.txt' to 'dest-bucket/dest/file.txt'"
}
}


**Example:**```python
# Move within same bucket
result = move_object(&quot;my-bucket&quot;, &quot;temp/file.txt&quot;, &quot;my-bucket&quot;, &quot;archive/file.txt&quot;)

# Move to different bucket
result = move_object(&quot;my-bucket&quot;, &quot;temp/file.txt&quot;, &quot;backup-bucket&quot;, &quot;file.txt&quot;)

Notes:
- This operation is atomic: if the copy fails, the source object remains unchanged
- The move is implemented as a copy followed by a delete

Access Control

generate_presigned_download_url

Generate a presigned URL for downloading an S3 object.

Parameters:
- bucket_name (string, required): Name of the bucket
- object_key (string, required): Key of the object
- expiration (integer, optional): URL expiration time in seconds (default: 3600)

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"object_key": "docs/file.txt",
"presigned_url": "https://my-bucket.s3.amazonaws.com/docs/file.txt?...",
"expiration_seconds": 3600
}
}


**Example:**```python
# Generate URL with default expiration (1 hour)
result = generate_presigned_download_url(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;)

# Generate URL with custom expiration (2 hours)
result = generate_presigned_download_url(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;, expiration=7200)

Notes:
- The presigned URL grants temporary download access without requiring AWS credentials
- The URL expires after the specified duration
- Anyone with the URL can download the object until it expires

Metadata & Tagging

add_tags

Add or update tags on an S3 object.

Parameters:
- bucket_name (string, required): Name of the bucket
- object_key (string, required): Key of the object
- tags (string, required): Tags as JSON string (key-value pairs)

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"object_key": "docs/file.txt",
"tags_added": {
"project": "demo",
"env": "prod"
},
"message": "Successfully added tags to object 'docs/file.txt' in bucket 'my-bucket'"
}
}


**Example:**```python
# Add tags to an object
result = add_tags(&quot;my-bucket&quot;, &quot;docs/file.txt&quot;,
                  &#x27;{&quot;project&quot;: &quot;demo&quot;, &quot;env&quot;: &quot;prod&quot;, &quot;owner&quot;: &quot;team-a&quot;}&#x27;)

Notes:
- If a tag key already exists, its value will be updated
- Existing tags not specified in the request are preserved
- The tags parameter must be a valid JSON string representing a dictionary

search_by_tag

Search for objects in a bucket by tag.

Parameters:
- bucket_name (string, required): Name of the bucket
- tag_key (string, required): Tag key to search for
- tag_value (string, required): Tag value to match

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"tag_key": "project",
"tag_value": "demo",
"matching_objects": [
{
"key": "docs/file1.txt",
"size": 1024
},
{
"key": "docs/file2.txt",
"size": 2048
}
],
"count": 2
}
}


**Example:**```python
# Search for objects with specific tag
result = search_by_tag(&quot;my-bucket&quot;, &quot;project&quot;, &quot;demo&quot;)

# Search for objects by environment
result = search_by_tag(&quot;my-bucket&quot;, &quot;env&quot;, &quot;prod&quot;)

Notes:
- This operation lists all objects in the bucket and checks their tags
- For large buckets, this operation may take some time
- Both the tag key and value must match exactly (case-sensitive)

Cost Analysis

calculate_bucket_storage_cost

Calculate the storage cost for an S3 bucket.

Parameters:
- bucket_name (string, required): Name of the bucket
- storage_class (string, optional): Storage class for pricing (default: "STANDARD")
- pricing_region (string, optional): AWS region for pricing (uses bucket region if not specified)

Supported Storage Classes:
- STANDARD - Standard storage (default)
- INTELLIGENT_TIERING - Intelligent-Tiering storage
- STANDARD_IA - Standard Infrequent Access
- ONEZONE_IA - One Zone Infrequent Access
- GLACIER - Glacier storage
- GLACIER_DEEP_ARCHIVE - Glacier Deep Archive

Returns:```json
{
"success": true,
"data": {
"bucket_name": "my-bucket",
"total_size_bytes": 1073741824,
"total_size_gb": 1.0,
"storage_class": "STANDARD",
"region": "us-east-1",
"price_per_gb": 0.023,
"estimated_monthly_cost_usd": 0.023
}
}


**Example:**```python
# Calculate cost with default storage class (STANDARD)
result = calculate_bucket_storage_cost(&quot;my-bucket&quot;)

# Calculate cost for Glacier storage
result = calculate_bucket_storage_cost(&quot;my-bucket&quot;, storage_class=&quot;GLACIER&quot;)

# Calculate cost for specific region
result = calculate_bucket_storage_cost(&quot;my-bucket&quot;,
                                       storage_class=&quot;STANDARD_IA&quot;,
                                       pricing_region=&quot;us-west-2&quot;)

Notes:
- The cost calculation is based on AWS S3 pricing as of the implementation date
- Actual costs may vary based on AWS pricing changes
- This calculation only includes storage costs, not request costs or data transfer costs
- For accurate billing, refer to your AWS billing dashboard

Error Handling

The server implements comprehensive error handling with structured error responses.

Common Error Types

Error Code Description Example
NoSuchBucket The specified bucket does not exist Attempting to list objects in a non-existent bucket
NoSuchKey The specified object does not exist Attempting to get metadata for a non-existent object
BucketAlreadyExists A bucket with this name already exists Creating a bucket with a name that's already taken
BucketNotEmpty Cannot delete bucket because it contains objects Attempting to delete a bucket that has objects
AccessDenied Insufficient permissions for the operation Attempting an operation without proper IAM permissions
InvalidBucketName The bucket name is invalid Using invalid characters in bucket name
FILE_NOT_FOUND Local file not found for upload Attempting to upload a non-existent local file
INVALID_METADATA Invalid metadata JSON format Providing malformed JSON for metadata
INVALID_TAGS Invalid tags JSON format Providing malformed JSON for tags
INVALID_STORAGE_CLASS Unsupported storage class Using an unsupported storage class name

Error Response Format

All errors follow this structure:```json
{
"success": false,
"error": {
"message": "Human-readable error description",
"code": "ERROR_CODE",
"type": "ErrorType"
}
}


### Example Error Responses

**Bucket Not Found:**```json
{
  &quot;success&quot;: false,
  &quot;error&quot;: {
    &quot;message&quot;: &quot;Bucket &#x27;non-existent-bucket&#x27; does not exist&quot;,
    &quot;code&quot;: &quot;NoSuchBucket&quot;,
    &quot;type&quot;: &quot;NoSuchBucket&quot;
  }
}

Bucket Not Empty:```json
{
"success": false,
"error": {
"message": "Cannot delete bucket 'my-bucket': bucket must be empty",
"code": "BucketNotEmpty",
"type": "BucketNotEmpty"
}
}


**Access Denied:**```json
{
  &quot;success&quot;: false,
  &quot;error&quot;: {
    &quot;message&quot;: &quot;Access denied to bucket &#x27;my-bucket&#x27;&quot;,
    &quot;code&quot;: &quot;AccessDenied&quot;,
    &quot;type&quot;: &quot;AccessDenied&quot;
  }
}

Troubleshooting

Server Won't Start

Problem: Server exits immediately with credential error

Solution:
1. Verify AWS credentials are configured:bash aws configure list
2. Test credentials:bash aws s3 ls
3. Check environment variables:bash echo $AWS_ACCESS_KEY_ID echo $AWS_SECRET_ACCESS_KEY

Permission Denied Errors

Problem: Operations fail with AccessDenied error

Solution:
1. Verify IAM permissions include required S3 actions
2. Check bucket policies don't deny access
3. Verify credentials have access to the specific bucket
4. Test with AWS CLI:bash aws s3 ls s3://your-bucket-name

Bucket Creation Fails

Problem: create_bucket fails with BucketAlreadyExists or InvalidBucketName

Solution:
1. Ensure bucket name is globally unique
2. Verify bucket name follows naming rules:
- 3-63 characters long
- Lowercase letters, numbers, and hyphens only
- Must start and end with letter or number
3. Try a different bucket name with a unique prefix

Object Upload Fails

Problem: upload_object fails with FILE_NOT_FOUND error

Solution:
1. Verify the file path is correct and absolute
2. Check file exists:bash ls -la /path/to/file
3. Verify read permissions on the file

Metadata/Tags JSON Errors

Problem: upload_object or add_tags fails with INVALID_METADATA or INVALID_TAGS

Solution:
1. Ensure JSON is properly formatted
2. Use double quotes for keys and string values
3. Test JSON validity:python import json json.loads(&#x27;{&quot;key&quot;: &quot;value&quot;}&#x27;) # Should not raise error

Cost Calculation Shows Zero

Problem: calculate_bucket_storage_cost returns zero cost

Solution:
1. Verify the bucket contains objects:python list_objects(&quot;my-bucket&quot;)
2. Check if the storage class is supported
3. Verify the region is supported in the pricing table

Logging Issues

Problem: Not seeing expected log output

Solution:
1. Check log level configuration
2. Ensure logging is configured before server starts
3. Check if logs are being written to a file instead of console

Connection Issues

Problem: MCP client cannot connect to server

Solution:
1. Verify server is running
2. Check server logs for startup errors
3. Verify MCP client configuration
4. Check network connectivity and firewall rules

Development

Setup Development Environment```bash

Clone the repository

git clone <repository-url>
cd aws-s3-mcp-server

Install development dependencies

pip install -e ".[dev]"

Run tests

pytest

Run tests with coverage

pytest --cov=src --cov-report=html

Format code

black src/ tests/

Lint code

ruff check src/ tests/

Type check

mypy src/


### Project Structure```
aws-s3-mcp-server/
├── src/
│   └── aws_s3_mcp_server/
│       ├── __init__.py
│       ├── server.py              # Main server implementation
│       ├── cost_calculator.py     # Cost calculation logic
│       ├── tools/
│       │   ├── __init__.py
│       │   ├── bucket_tools.py    # Bucket management tools
│       │   └── object_tools.py    # Object management tools
│       └── utils/
│           ├── __init__.py
│           ├── error_handler.py   # Error handling utilities
│           └── logging_config.py  # Logging configuration
├── tests/
│   ├── unit/                      # Unit tests
│   ├── property/                  # Property-based tests
│   └── integration/               # Integration tests
├── .kiro/
│   └── specs/                     # Specification documents
├── pyproject.toml                 # Project configuration
├── requirements.txt               # Dependencies
└── README.md                      # This file

Running Tests```bash

Run all tests

pytest

Run unit tests only

pytest tests/unit/

Run property-based tests only

pytest tests/property/

Run specific test file

pytest tests/unit/test_server_initialization.py

Run with verbose output

pytest -v

Run with coverage report

pytest --cov=src --cov-report=term-missing

Run specific test

pytest tests/unit/test_bucket_tools.py::test_list_buckets_success
```

Testing Strategy

The project uses a dual testing approach:

  1. Unit Tests: Verify specific examples and edge cases
  2. Property-Based Tests: Verify universal properties across randomized inputs using Hypothesis

All tests use the moto library to mock AWS S3 services, allowing tests to run without actual AWS credentials or infrastructure.

Logging

The server logs all operations with appropriate levels:

  • INFO: Normal operations (tool invocations, successful operations)
  • WARNING: Recoverable errors (object not found, bucket not empty)
  • ERROR: Serious errors (credential failures, AWS API errors)
  • DEBUG: Detailed information for troubleshooting

Important: Logs never contain sensitive information such as AWS credentials or file contents.

Contributing

Contributions are welcome! Please follow these guidelines:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Write tests for new functionality
  4. Ensure all tests pass (pytest)
  5. Format code (black src/ tests/)
  6. Lint code (ruff check src/ tests/)
  7. Commit your changes (git commit -m &#x27;Add amazing feature&#x27;)
  8. Push to the branch (git push origin feature/amazing-feature)
  9. Open a Pull Request

License

MIT License - see LICENSE file for details

Support

For issues, questions, or contributions, please open an issue on the GitHub repository.

Acknowledgments

  • Built with fastmcp framework
  • Uses boto3 for AWS S3 interactions
  • Property-based testing with Hypothesis
  • AWS S3 mocking with moto

Additional Resources

  • AWS S3 Documentation
  • AWS S3 Pricing
  • Model Context Protocol (MCP) Specification
  • fastmcp Documentation
  • boto3 S3 Documentation

常见问题

7 问
答案由本站依据条目字段整理,不引用上游原文
Aws S3 MCP Server 943fab64 怎么安装?

在客户端按下面的安装命令接入:pip install -r requirements.txt。装完在客户端配置里引用同一个包或端点。

Aws S3 MCP Server 943fab64 怎么在客户端里配置?

它的传输方式未标注,在客户端 MCP 配置里按官方文档填写启动命令和参数,保存后重启客户端生效。

Aws S3 MCP Server 943fab64 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Aws S3 MCP Server 943fab64 需要 API Key 吗?

资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Aws S3 MCP Server 943fab64 能提供哪些能力?

资料显示约 14 个工具;能力标签包括 Python、访问控制、云端部署。具体工具清单以官方文档为准。

Aws S3 MCP Server 943fab64 需要什么运行环境?

属于本地进程,需要在本机装好运行环境。

Aws S3 MCP Server 943fab64 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-05-17。