Get the FREE Ultimate OpenClaw Setup Guide →

sample -s3

MCP server from aws-samples/sample-mcp-server-s3

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio aws-samples-sample-mcp-server-s3 uv --directory /Users/user/generative_ai/model_context_protocol/s3-mcp-server run s3-mcp-server

How to use

This MCP server provides access to AWS S3 data through MCP resources and tools. It enables you to expose S3 objects (primarily PDFs) as Resources that can be loaded into an LLM's context, and offers tooling to list buckets, list objects within a bucket, and retrieve objects. To use it, configure your AWS credentials so the server can access S3, then run the server using either the development UV-based command or the published UVX-based command described in the README. Once running, you can query the server for resources or invoke the S3 tools to enumerate buckets and objects or fetch specific objects by key. The inspector can be used for debugging MCP exchanges if you need to trace requests and responses.

How to install

Prerequisites:

  • Python environment with uv or uvx installed (as described in the README).
  • AWS credentials configured with permission to access S3 (ListBuckets, ListObjectsV2, GetObject).

Installation steps:

  1. Install uv/uvx if you haven't already. For development setup (uv):
    • Ensure uv is installed and available in your PATH.
  2. If you are publishing a server package via UV, ensure the s3-mcp-server package is built and accessible by UV/X (per your workflow).
  3. Verify Python environment if the server relies on Python dependencies and that the s3-mcp-server directory contains the entrypoint script or package as referenced by your uvx/uv configuration.
  4. Start the server using one of the configurations provided in the README (development or published).
  5. Optionally test connectivity to AWS S3 using standard AWS CLI or SDK calls to confirm permissions are correctly set before running the MCP server.

Example commands (from README):

  • Development (uv): uv --directory /Users/user/generative_ai/model_context_protocol/s3-mcp-server run s3-mcp-server
  • Published (uvx): uvx s3-mcp-server

Additional notes

Notes and tips:

  • Ensure AWS credentials are properly configured in your environment (variables or AWS config) with permissions for ListBuckets, ListObjectsV2, and GetObject.
  • For debugging MCP interactions, you can use the MCP Inspector tool as described in the README to monitor requests and responses.
  • When exposing PDFs as Resources, consider pagination limits (ListObjectsV2 returns up to 1,000 objects per request) and potential costs associated with S3 data transfer.
  • If you’re running locally, ensure your AWS region is correctly configured to match the buckets you intend to access.
  • The development configuration uses a local directory for the server source; the published configuration assumes the server is installed as a package available to UV/UVX.
  • If your environment uses a different path or packaging approach, adjust the --directory and run arguments accordingly.

Related MCP Servers

Sponsor this space

Reach thousands of developers