home / mcp / sample s3 mcp server
Provides access to AWS S3 data through Resources and enables S3 operations via MCP Tools.
Configuration
View docs{
"mcpServers": {
"aws-samples-sample-mcp-server-s3": {
"command": "uv",
"args": [
"s3-mcp-server"
]
}
}
}You run an MCP server that exposes AWS S3 data as Resources and provides tooling to list buckets, list objects, and fetch objects from S3. This enables you to load PDFs and other data into your context for use with your language model workflows, while keeping access controlled and scalable.
Set up your MCP client to connect to the S3 MCP server. You have two runtime options to run the server locally or remotely: use the stdio-based runtime exposed by your MCP tooling or connect to a remote MCP server endpoint. Once connected, you can browse and request Resources to access PDF documents stored in S3 and invoke the Tools to list buckets, list objects in a bucket, or retrieve an object by its key. Use Resources to load information into the model context and Tools to discover or fetch data from your S3 buckets.
Prerequisites: ensure you have a runtime that supports MCP servers (for example, the MCP runtime you use provides stdio or http connectivity). You will also need access to AWS credentials if you intend the server to access your S3 data directly.
Install or prepare the S3 MCP server package according to your environment. The server runs as a local process or can be hosted remotely. If you are running it locally, you will typically start it via a command tailored to your runtime (for example, a command that executes the server binary or script). If you are consuming the server via a remote endpoint, ensure your client is configured to reach that URL.
Resources provide access to AWS S3 data. Currently, only PDF documents are exposed through Resources and the total number of objects is capped at 1000 per load.
Tools exposed by the server include ListBuckets, ListObjectsV2, and GetObject. Use ListBuckets to retrieve all buckets owned by the authenticated user. Use ListObjectsV2 to fetch up to 1,000 objects from a bucket per request. Use GetObject to retrieve a specific object by its full key name. The server supports both virtual-hosted-style and path-style requests for GetObject.
Ensure you configure AWS credentials with appropriate read permissions for S3. Use standard AWS credential practices and keep your access keys secure. If you expose the server to external clients, implement proper authentication and access control around your MCP endpoints.
If you encounter connection or data loading issues, verify that AWS credentials are active and have S3 access, that the MCP server is reachable from your client, and that the requested Key/Objects exist in the target bucket. Check that the 1000-object load limit is not exceeded and review any error messages from the Tools calls for guidance.
Returns a list of all buckets owned by the authenticated sender of the request.
Returns up to 1,000 of the objects in a bucket per request, enabling you to enumerate objects stored in S3.
Retrieves an object by its full key name, supporting both virtual-hosted-style and path-style requests for S3.