Amazon S3 MCP server

Provides a bridge to Amazon S3 storage services for listing buckets, browsing objects, retrieving file contents, uploading, downloading, and deleting files directly from conversations.
Back to servers
Provider
c4pt0r
Release date
Mar 31, 2025
Language
Python
Stats
2 stars

This MCP server enables an MCP client to access the AWS S3 object storage. The server uses a key and secret to authenticate with the AWS S3 API, connecting clients to their storage resources while handling all the security and integration details.

Installation

The MCP server for S3 can be installed using npm:

npm install @mcpland/mcp-server-s3

Usage

Setting up the server

To initialize the MCP server with S3 integration:

import { MCPServerS3 } from '@mcpland/mcp-server-s3';

// Create the server instance
const server = new MCPServerS3({
  s3: {
    credentials: {
      accessKeyId: 'YOUR_AWS_ACCESS_KEY',
      secretAccessKey: 'YOUR_AWS_SECRET_ACCESS_KEY'
    },
    region: 'YOUR_AWS_REGION' // e.g., 'us-east-1'
  }
});

// Start the server
server.start({
  port: 3000 // optional, defaults to 3000
});

console.log('MCP Server started on port 3000');

Configuration options

The server accepts the following configuration parameters:

const server = new MCPServerS3({
  // S3 configuration
  s3: {
    credentials: {
      accessKeyId: string,
      secretAccessKey: string
    },
    region: string,
    endpoint: string, // optional: custom endpoint for S3-compatible services
    forcePathStyle: boolean // optional: for S3-compatible services
  },
  
  // Optional: Server configuration
  cors: {
    origin: string | string[], // Allowed origins for CORS, defaults to '*'
    methods: string | string[] // Allowed methods, defaults to standard methods
  }
});

Working with buckets

The server provides access to S3 buckets through the MCP protocol. Clients can list, create, and delete buckets as well as upload, download, and manage objects within buckets.

Server methods

Start the server with optional configuration:

server.start({
  port: number, // The port to listen on, defaults to 3000
  host: string  // The host to bind to, defaults to '0.0.0.0'
});

Stop the server:

server.stop();

Environment variables

You can also configure the server using environment variables:

  • AWS_ACCESS_KEY_ID: Your AWS access key
  • AWS_SECRET_ACCESS_KEY: Your AWS secret key
  • AWS_REGION: The AWS region to use

Connecting with MCP clients

After your server is running, MCP clients can connect to it using the server's URL. For example:

// In your client application
import { MCPClient } from '@mcpland/mcp-client';

const client = new MCPClient('http://localhost:3000');

// Now you can use the client to interact with S3
const buckets = await client.listBuckets();

Security considerations

Always secure your AWS credentials and avoid hardcoding them in your application. Use environment variables or a secure credential management system for production deployments.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later