Skip to main content

A MCP server project

Project description

Sample S3 Model Context Protocol Server

An MCP server implementation for retrieving data such as PDF's from S3.

Features

Resources

Expose AWS S3 Data through Resources. (think of these sort of like GET endpoints; they are used to load information into the LLM's context). Currently only PDF documents supported and limited to 1000 objects.

Tools

  • ListBuckets
    • Returns a list of all buckets owned by the authenticated sender of the request
  • ListObjectsV2
    • Returns some or all (up to 1,000) of the objects in a bucket with each request
  • GetObject
    • Retrieves an object from Amazon S3. In the GetObject request, specify the full key name for the object. General purpose buckets - Both the virtual-hosted-style requests and the path-style requests are supported

Configuration

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
  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

Development/Unpublished Servers Configuration
{
  "mcpServers": {
    "s3-mcp-server": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/user/generative_ai/model_context_protocol/s3-mcp-server",
        "run",
        "s3-mcp-server"
      ]
    }
  }
}
Published Servers Configuration
{
  "mcpServers": {
    "s3-mcp-server": {
      "command": "uvx",
      "args": [
        "s3-mcp-server"
      ]
    }
  }
}

Development

Building and Publishing

To prepare the package for distribution:

  1. Sync dependencies and update lockfile:
uv sync
  1. Build package distributions:
uv build

This will create source and wheel distributions in the dist/ directory.

  1. Publish to PyPI:
uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:

  • Token: --token or UV_PUBLISH_TOKEN
  • Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /Users/user/generative_ai/model_context_protocol/s3-mcp-server run s3-mcp-server

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mseep_s3_mcp_server-0.1.0.tar.gz (40.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mseep_s3_mcp_server-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file mseep_s3_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: mseep_s3_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 40.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for mseep_s3_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 58a1208bc39b3baba630b970e937a38b88ced8e9028f85e66b9b69d90a5eb027
MD5 72b477d29f81eb91ed8cf68a35baa60b
BLAKE2b-256 016a501174f58eb67e3df7b7f8be97dc601a70b61428d6586b6b74dd281ee2f3

See more details on using hashes here.

File details

Details for the file mseep_s3_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mseep_s3_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 353f2698d922fd31522a55f9a9289eaccadcb7084f774ade9525a9cd8cb875f4
MD5 1508b6a979fd9c0e19f8886b73393993
BLAKE2b-256 b74e37645f14a95f187272ddab1b247919c1ab30e62c785e9e3668870f40dad5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page