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.
The MCP server for S3 can be installed using npm:
npm install @mcpland/mcp-server-s3
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');
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
}
});
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.
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();
You can also configure the server using environment variables:
AWS_ACCESS_KEY_ID
: Your AWS access keyAWS_SECRET_ACCESS_KEY
: Your AWS secret keyAWS_REGION
: The AWS region to useAfter 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();
Always secure your AWS credentials and avoid hardcoding them in your application. Use environment variables or a secure credential management system for production deployments.
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.
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"
]
}
}
}
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.
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.