# sample-mcp-server-s3

> MCP Server

This repository provides an MCP server implementation for retrieving data, specifically PDF documents, from AWS S3, enabling integration with LLMs like Claude by exposing S3 data through resources and tools.

## Overview

- **Category:** AI
- **Language:** Python
- **Stars:** 78
- **Forks:** 4
- **Owner:** aws-samples
- **GitHub:** https://github.com/aws-samples/sample-mcp-server-s3
- **Created:** 2024-12-23T16:04:25+00:00
- **Updated:** 2025-03-22T13:08:25+00:00
- **Source:** https://model-context-protocol.com/servers/mcp-server-s3-pdf-data-retrieval

## Setup

## Setup

### Setting up AWS Credentials
1. Obtain AWS access key ID, secret access key, and region from the AWS Management Console and configure credentials files using **Default** profile as shown [**here**](https://docs.aws.amazon.com/cli/v1/userguide/cli-configure-files.html)
2. Ensure these credentials have appropriate permission READ/WRITE  permissions for S3.

### Usage with Claude Desktop

#### Claude Desktop

On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

<details>
  <summary>Development/Unpublished Servers Configuration</summary>

```json
{
  "mcpServers": {
    "s3-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/user/generative_ai/model_context_protocol/s3-mcp-server",
        "run",
        "s3-mcp-server"
      ]
    }
  }
}
```

</details>

<details>
  <summary>Published Servers Configuration</summary>

```json
{
  "mcpServers": {
    "s3-mcp-server": {
      "command": "uvx",
      "args": [
        "s3-mcp-server"
      ]
    }
  }
}
  ```
</details>

## Tools

## Available Tools

1.  Resources (Expose AWS S3 Data through Resources, currently only PDF documents supported and limited to 1000 objects).
2.  ListBuckets (Returns a list of all buckets owned by the authenticated sender of the request)
3.  ListObjectsV2 (Returns some or all (up to 1,000) of the objects in a bucket with each request)
4.  GetObject (Retrieves an object from Amazon S3, supporting both virtual-hosted-style and path-style requests)
