# How to Connect Claude Code to AWS S3: Fast MCP Setup and Storage Sync

Connecting Claude Code to AWS S3 enables command-line agents to inspect buckets and retrieve files using the Model Context Protocol. While direct S3 tools query raw object trees over standard cloud APIs, combining object archives with indexed workspaces prevents context saturation and accelerates agent tool loops. This guide covers direct MCP configuration, Roo Code integration, and indexed hybrid search.

Source: https://fast.io/resources/claude-code-aws-s3-connector/
Author: [Tom Langridge](https://fast.io/authors/tom-langridge/)
Last reviewed: 2026-11-04

## Why Direct S3 Object Retrieval Slows Down Claude Code

When a command-line coding agent connects directly to an Amazon Simple Storage Service (AWS S3) bucket, every unindexed object listing consumes tool-call round trips and floods the agent's context window. S3 stores objects in flat key spaces, which forces agents to parse massive multi-gigabyte directory trees or execute repetitive list requests before locating target files.

A Claude Code AWS S3 connector allows Anthropic's command-line agent to query, inspect, and retrieve data objects from AWS S3 buckets through the Model Context Protocol. By giving the model structured tools to discover buckets, read file payloads, and inspect prefixes, developers hope to grant the agent direct access to company datasets, build artifacts, server logs, and architectural diagrams. Using a dedicated Claude Code object storage integration bridges the gap between local terminal tools and cloud data.

In common enterprise environments, project assets do not live in one central bucket. Developers keep production logs, training data, and database dumps in AWS S3 object storage. Simultaneously, product managers, designers, and business colleagues keep specification documents, customer feedback, and contractual agreements across cloud drives like Google Drive, Dropbox, Box, and OneDrive. When deploying Claude Code to implement features or troubleshoot defects, the agent often needs to cross-reference code changes against both unstructured cloud drive documents and raw S3 object storage assets.

Most online tutorials recommend bridging this gap by writing custom Python scripts with the boto3 library or running basic wrapper servers that download entire bucket directories to a local folder. This approach breaks down quickly in real-world development workflows. AWS S3 standard API requests add cumulative round-trip latency to agent tool loops, and context windows fill rapidly when agents parse unindexed multi-gigabyte object trees. When Claude Code executes a tool call that retrieves a full multi-megabyte log file or a long PDF specification from S3, the raw byte stream consumes thousands of input tokens in a single exchange. The model quickly exhausts its context allocation, driving up session expenses and slowing down agent reasoning.

In benchmark testing published at [Fast.io Benchmarks](/benchmarks/), Fastio was measured the fastest and the lowest cost of the providers tested. Understanding how to configure direct connections while pairing them with indexed workspace retrieval helps software engineering teams keep agent execution efficient.

### The Impact of Flat Key Namespaces on Context Windows

Autonomous agents like Claude Code operate through continuous observation and action cycles. To find information in a standard S3 bucket, the agent issues an S3 list objects request. If the bucket holds thousands of objects divided by dates, tenants, or pipeline runs, the response containing object keys and timestamps stretches across hundreds of lines.

Because standard S3 buckets lack native semantic indexing, Claude Code cannot search by meaning. The agent must inspect object keys sequentially, guessing which filename matches the prompt. If the agent needs to inspect three candidate error logs, it must execute three separate read calls, downloading each complete file into the conversation context. This repetitive retrieval loop burns the agent's context budget on raw, unparsed text before it writes a single line of application code.

## How to Configure a Claude Code AWS S3 Connector with Direct MCP

The Model Context Protocol (MCP) provides an open specification that connects language models directly to external data sources. Developers can register an S3 MCP server with Claude Code or Roo Code to expose bucket operations as native agent tools. When setting up a Claude Code AWS S3 MCP environment, developers can choose between local stdio wrappers and remote HTTP endpoints.

Anthropic introduced Claude Platform on AWS to help enterprise engineering teams run Anthropic models with cloud access controls. According to official Claude Code documentation, developers can configure Claude Code to use the Anthropic-operated Claude API with AWS authentication, IAM access control, and AWS Marketplace billing. Regardless of whether Claude Code authenticates through standard Anthropic API keys or AWS credentials, connecting to external S3 storage requires declaring an MCP server in the client configuration.

### Registering an S3 Server with the Claude Code CLI

To connect Claude Code to S3 using command-line tools, Claude Code includes built-in commands to register MCP tools directly from your terminal. When configuring a direct Claude Code S3 connector, use the `claude mcp add` command to define the transport and executable:

```bash
claude mcp add s3-connector -- npx -y aws-s3-mcp
```

This command saves the server definition to your local configuration. You can specify the configuration scope depending on your project needs:

* **Local scope (default):** Available only within the current working directory.
* **User scope (`--scope user`):** Available globally across all projects on your machine.
* **Project scope (`--scope project`):** Writes the configuration to a `.mcp.json` file inside your project root, allowing teammates to share the same MCP definitions through version control.

A project-level `.mcp.json` file for direct S3 access takes this structure:

```json
{
  "mcpServers": {
    "s3-connector": {
      "command": "npx",
      "args": ["-y", "aws-s3-mcp"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "YOUR_AWS_ACCESS_KEY_ID",
        "AWS_SECRET_ACCESS_KEY": "YOUR_AWS_SECRET_ACCESS_KEY"
      }
    }
  }
}
```

### Configuring a Roo Code AWS S3 Connector

Developers working in VS Code often rely on Roo Code for inline code generation and task orchestration. A Roo Code AWS S3 connector brings object storage discovery into the editor sidebar, allowing the agent to reference bucket contents while editing code. Configuring a Roo Code S3 connector follows a similar JSON configuration pattern in Visual Studio Code.

To connect Roo Code to S3, open the Roo Code settings panel, select the MCP Servers tab, and edit either the global `mcp_settings.json` or project-level `.roo/mcp.json` file. A Roo Code AWS S3 MCP configuration adds the server entry:

```json
{
  "mcpServers": {
    "roo-s3-storage": {
      "command": "npx",
      "args": ["-y", "aws-s3-mcp"],
      "env": {
        "AWS_REGION": "us-east-1",
        "AWS_ACCESS_KEY_ID": "YOUR_AWS_ACCESS_KEY_ID",
        "AWS_SECRET_ACCESS_KEY": "YOUR_AWS_SECRET_ACCESS_KEY"
      }
    }
  }
}
```

Once configured, the Roo Code object storage integration displays available tools in the prompt interface, such as `list-buckets`, `list-objects`, and `get-object`. The agent can invoke these tools when tasked with inspecting cloud data.

### Security Risks and Credential Management with Direct S3 Tools

While a direct Claude Code S3 connector works for rapid local testing, storing static AWS credentials in configuration files introduces significant security hazards. If an agent executes an uncontrolled tool call or encounters untrusted repository data during an automated evaluation, static credentials stored on developer disk can be exposed.

Standard AWS Identity and Access Management (IAM) permissions granted to direct S3 MCP servers are often overly broad. An agent with `s3:GetObject` and `s3:ListBucket` permissions across an entire bucket can inadvertently read confidential files, database credentials, or private customer records located under adjacent folder prefixes. To maintain security, organizations must enforce tight IAM bucket policies or adopt intermediate workspace layers that restrict agent visibility.

## Bridging S3 and Enterprise Storage into an Indexed Workspace

Direct S3 tool connections force Claude Code to function as an ad-hoc search engine, parsing raw files and burning tokens to find relevant passages. An alternative architecture connects object storage and company documentation into an intelligent workspace before the agent begins its work.

Rather than querying raw S3 buckets over standard REST APIs, teams synchronize relevant documentation, test suites, and data exports into a Fast.io workspace. Fast.io functions as an intelligent workspace layer for agentic teams, automatically indexing uploaded files for full-text search, semantic vector retrieval, and structured metadata queries. Learn more about workspace architecture in the [Fast.io agent storage guide](/storage-for-agents/).

### The 4-Step Process for Configuring Remote MCP Storage

To configure an indexed cloud workspace for Claude Code, follow this four-step procedure:

1. **Import or synchronize storage assets:** Connect your cloud repositories to Fast.io. Cloud Sync connects Google Drive, Dropbox, Box and OneDrive folders to a workspace, one-way or two-way, on a schedule or on demand. SharePoint document libraries synchronize directly through the OneDrive connector. For raw S3 datasets, build packages, or archived releases, use URL import to transfer assets directly into the workspace without local disk intermediate copies.
2. **Enable workspace Intelligence Mode:** Once documents land in the workspace, activate Intelligence Mode. Fast.io automatically generates semantic embeddings and keyword indexes for text files, PDF specifications, spreadsheets, code files, and presentations.
3. **Register the remote Fast.io MCP endpoint:** Connect Claude Code or Roo Code to Fast.io using the remote Streamable HTTP transport at `https://mcp.fast.io/mcp/code`. No local binaries, Docker daemons, or Python environments are required. See the [Fast.io MCP setup steps](https://mcp.fast.io/docs) for client instructions.
4. **Query indexed context with hybrid search:** When Claude Code needs to inspect technical requirements or past system logs, the agent invokes semantic search queries instead of downloading multi-megabyte objects. The server returns only the specific paragraphs or code snippets relevant to the prompt, preserving context tokens.

### Extracting Structured Data with Metadata Views

When software projects involve thousands of structured records, such as API response logs, vendor agreements, or architectural blueprints, standard text search can still require manual filtering. Fast.io solves this with [Metadata Views](/product/document-data-extraction/).

Metadata Views turn workspace files into a live, queryable database. Users describe the fields they want extracted in natural language, and artificial intelligence designs a typed schema spanning text, integer, decimal, boolean, URL, date, and JSON types. Fast.io matches files across the workspace and populates an interactive spreadsheet without requiring manual OCR templates. Claude Code can query Metadata Views programmatically through the MCP server, filtering documents by exact metadata values before retrieving specific file contents.

### Comparing Direct S3 MCP Tools with Workspace Retrieval

The architectural differences between connecting Claude Code directly to raw AWS S3 buckets and querying an indexed workspace influence agent speed, token usage, and team security.

| Architectural Dimension | Direct AWS S3 MCP Connector | Indexed Fast.io Workspace |
| --- | --- | --- |
| Storage Interface | Raw S3 REST API calls | Streamable HTTP remote MCP |
| Search Capability | Prefix and exact key matching | Hybrid semantic, full-text, and metadata |
| Context Token Impact | Downloads full files into prompt | Returns concise snippets and citations |
| Multi-Cloud Support | AWS S3 buckets only | URL import, Google Drive, Dropbox, Box, OneDrive |
| Security Model | Static AWS IAM access keys | Scoped OAuth tokens and workspace roles |
| Setup Maintenance | Local Node process or Docker container | Zero local installation or daemons |

By moving search and indexing into the workspace layer, Claude Code retrieves accurate answers in fewer tool calls, avoiding context saturation.

## Connecting Claude Code and Roo Code to Fast.io Remote MCP

Fast.io provides a dedicated remote MCP endpoint for coding agents. Unlike local stdio servers that require compiling binaries or maintaining container runtimes, Fast.io operates over modern Streamable HTTP. This maintains consistent tool access across terminal sessions, continuous integration pipelines, and team developer workstations.

### Step 1: Connect Claude Code Using the CLI

To connect Claude Code to your Fast.io workspace, run the `claude mcp add` command with the remote HTTP transport:

```bash
claude mcp add --transport http fast-io https://mcp.fast.io/mcp/code
```

After adding the server, launch Claude Code and run the `/mcp` command to complete the interactive OAuth sign-in flow in your browser:

```bash
claude
/mcp
```

A browser window will open displaying the Fast.io Review Permissions screen. Select whether Claude Code receives Read Only or Read & Write permissions, and choose which organizations and workspaces the agent can reach. Once confirmed, Claude Code stores the authorization token securely and enables the workspace tools.

For team repositories, you can commit a project-level `.mcp.json` file in your repository root:

```json
{
  "mcpServers": {
    "fast-io": {
      "type": "http",
      "url": "https://mcp.fast.io/mcp/code"
    }
  }
}
```

### Step 2: Configure Roo Code with a Scoped API Key

Roo Code supports remote MCP servers using Streamable HTTP. Because Roo Code runs inside VS Code and does not initiate the interactive browser OAuth flow, you supply a scoped Fast.io API key in the connection headers.

Open `.roo/mcp.json` in your project or edit `mcp_settings.json` in your global VS Code user directory. Add the Fast.io server definition:

```json
{
  "mcpServers": {
    "fast-io": {
      "type": "streamableHttp",
      "url": "https://mcp.fast.io/mcp/code",
      "headers": {
        "Authorization": "Bearer YOUR_FASTIO_API_KEY"
      }
    }
  }
}
```

Replace `YOUR_FASTIO_API_KEY` with an API key generated from your Fast.io workspace settings. Once saved, Roo Code detects the endpoint and populates its tool panel with workspace capabilities.

### How Coding Agents Interact with Workspace Tools

On the `/mcp/code` endpoint, Fast.io exposes a consolidated MCP toolset designed specifically for coding agents: `auth`, `auth_manage`, `upload`, `upload_manage`, `search`, `execute`, `execute_manage`, and `how-to`.

When Claude Code or Roo Code needs to locate an architectural requirement, it calls the `search` tool:

```json
{
  "query": "authentication session timeout and token refresh logic",
  "files_scope": ["docs/architecture/"]
}
```

The workspace responds with relevant document excerpts and precise file paths. If the agent needs to read or write specific file data, read requests run through `execute`, while write and file modification operations route through `execute_manage`.

To coordinate concurrent edits across multiple agents or human engineers, Fast.io supports advisory file locks. An agent acquires a temporary lease using `lock-acquire` on `storage_manage`, verifies active holds with `lock-status` on `storage`, and releases its hold via `lock-release` on `storage_manage`. Advisory locks expire automatically unless heartbeated, alerting collaborators to active edits without blocking emergency manual saves.

### Verifying Tool Connectivity in the Terminal

After configuring your MCP server, verify that Claude Code recognizes the newly registered tools. Inside the Claude Code terminal, type `/mcp` to inspect connected servers. You should see `fast-io` marked with an active connected status.

Test the integration by asking Claude Code to discover workspace files:

```text
Find the AWS S3 migration checklist in the project workspace and summarize the security requirements.
```

Claude Code calls the `search` tool against the remote endpoint, reads the relevant sections, and provides a sourced answer without downloading unneeded files.

## Operational Governance, Versioning, and Team Collaboration

Deploying autonomous coding agents in production codebases requires clear operational guardrails. When agents connect to cloud storage, organizations must maintain strict audit trails, control access scopes, and protect source files from accidental corruption.

### Role-Based Access Controls

In contrast to cloud object storage where misconfigured IAM roles can grant broad bucket traversal rights, Fast.io enforces role-based access permissions. Permissions are established per organization, workspace, and share, through defined member roles. Every member of a workspace reaches its files according to their assigned role.

When an organization needs to provide an external consultant or client access to a specific project folder without exposing the broader workspace, administrators create a dedicated Share holding those files. Shares can be configured as durable or expiring links, with download permissions enabled or disabled to safeguard intellectual property.

Communication with Fast.io is protected with encryption in transit and at rest. Fastio runs on cloud infrastructure partners, including Google Cloud Platform and Cloudflare, that are certified to industry security standards.

### Per-File Version History and Change Tracking

When Claude Code or Roo Code modifies files programmatically, automated refactoring can introduce unintended regressions. Fast.io maintains comprehensive per-file version history across all workspace documents. Every save or update creates a distinct version while preserving previous iterations. If an agent overwrites critical code or alters a specification erroneously, human team members can review changes and restore earlier versions immediately.

For accountability, Fast.io maintains a detailed activity log of all workspace modifications. The detailed activity log records changes to organization assets, specifically uploads, edits, file moves, and deletions, alongside administrative events like membership updates and share creation. Team leads can inspect the detailed activity log to see exactly which agent or team member performed each modification. Fast.io focuses the log on state changes, providing a verified record of who modified project assets.

### Collaborative Notes and Ownership Transfer

Engineering teams often need to pair human documentation with automated agent outputs. Fast.io includes Collaborative Notes kept beside workspace files. Notes feature version-checked saves rather than real-time co-editing, allowing engineers and agents to draft release notes, technical briefs, and migration checklists in a shared context.

When technical consultants build automated S3 analysis pipelines or workspace structures for external clients, handing over administrative control is straightforward. With Fast.io ownership transfer, an agent or contractor can create an organization, configure workspace folders, set up Cloud Sync connections, and transfer organizational ownership to a client executive via a claim link.

### Transparent Subscription Pricing

Fast.io provides predictable subscription tiers for software engineering teams and agentic workflows. Creating an account is free; doing real work requires an organization on a paid subscription. Monthly plans start with a 14-day free trial, which requires a credit card. Subscription plans on [Fast.io pricing](/pricing/) include Starter at `$9.99/mo`, Business at `$49.99/mo`, and Enterprise at `$199.99/mo`.

## Troubleshooting S3 Connectors and Context Efficiency

Integrating command-line agents with AWS S3 and remote MCP endpoints can occasionally encounter operational roadblocks. Understanding common failure modes helps developers maintain resilient workflows.

### Resolving 403 AccessDenied and IAM Policy Errors

When using a direct AWS S3 MCP server, the most frequent failure is an `AccessDenied` response during bucket discovery. This typically stems from one of three configuration issues:

* **Missing ListBucket permissions:** S3 requires `s3:ListBucket` on the bucket ARN (`arn:aws:s3:::bucket-name`) to discover keys, and `s3:GetObject` on the object prefix (`arn:aws:s3:::bucket-name/*`) to retrieve file data. Granting only `s3:GetObject` causes list commands to fail.
* **KMS decryption limits:** If objects in S3 are encrypted using AWS Key Management Service (AWS KMS) customer managed keys, the IAM role must also hold `kms:Decrypt` permissions on the corresponding key ARN.
* **Expired session tokens:** If using temporary AWS credentials via AWS STS (`AWS_SESSION_TOKEN`), credentials expire after their configured duration, causing agent queries to fail silently mid-task.

When connecting through Fast.io, authentication errors are resolved by verifying the OAuth authorization status via the `/mcp` command in Claude Code or confirming that the scoped API key header in Roo Code matches an active workspace credential.

### Preventing Context Saturation from Large Objects

When an agent downloads raw files directly from S3, large log files, database dumps, or minified JavaScript bundles can overwhelm the model's context window. Symptoms of context saturation include:

* Sudden degradation in Claude Code's reasoning quality or adherence to instructions.
* High latency during agent response generation.
* Reaching session token limits prematurely, forcing unexpected session resets.

To avoid context exhaustion, configure agents to retrieve targeted snippets using workspace semantic search rather than requesting full object payloads. When raw S3 inspection is unavoidable, write specific prompt instructions directing the agent to sample file head contents or specify byte ranges rather than reading entire keys.

### Handling Network Latency and Tool Execution Timeouts

Standard AWS S3 API requests introduce network latency that compounds across iterative agent loops. If Claude Code must list a bucket, inspect five candidate files, and read each object sequentially, cumulative network round trips can stall terminal execution.

Remote MCP connections over Streamable HTTP reduce local execution overhead by offloading index searches to cloud infrastructure. Verify that your local network allows outbound HTTPS traffic to `mcp.fast.io`. If working behind an enterprise proxy, configure standard `HTTPS_PROXY` environment variables in your terminal session to maintain tool connectivity.

## Frequently asked questions

### Can Claude Code access AWS S3 buckets?

Claude Code cannot access AWS S3 buckets out of the box because Anthropic command-line agents do not natively parse s3:// URIs. To access S3 data, Claude Code requires an integration through the Model Context Protocol (MCP). Developers can either configure a local S3 MCP server that makes direct AWS API calls using local credentials, or connect Claude Code to an intelligent workspace like Fast.io, which indexes S3 files and exposes them over a remote Streamable HTTP MCP endpoint.

### How do I connect Claude Code to cloud storage?

To connect Claude Code to cloud storage, use the `claude mcp add` command to register an MCP server. For remote cloud workspaces like Fast.io, run `claude mcp add --transport http fast-io https://mcp.fast.io/mcp/code`, then start Claude Code and run `/mcp` to complete the interactive OAuth sign-in. For local S3 tools, provide the command and environment variables holding your cloud credentials in your project `.mcp.json` file.

### What is the best MCP server for AWS S3?

The best MCP server depends on your workflow requirements. For single developers needing quick, raw bucket access, open-source stdio servers like `aws-s3-mcp` provide direct object listing and retrieval. For software engineering teams requiring fast retrieval, multi-cloud synchronization across Google Drive, Dropbox, Box, and OneDrive, and low token usage, a remote intelligent workspace MCP server like Fast.io at `https://mcp.fast.io/mcp/code` is recommended because it pre-indexes files for hybrid semantic search.

### Can Roo Code connect to AWS S3 using MCP?

Yes. Roo Code connects to AWS S3 by declaring an MCP server in `.roo/mcp.json` or its global `mcp_settings.json` file. Developers can configure direct S3 access by specifying local Node or Docker commands with AWS credentials, or configure remote Streamable HTTP access to Fast.io using `https://mcp.fast.io/mcp/code` with a scoped API key in the authorization header.

### Why does querying raw S3 buckets exhaust Claude Code's context window?

Standard AWS S3 stores data as unindexed byte streams. When Claude Code queries a raw bucket, S3 tools stream entire file contents directly into the prompt context. Reading several multi-megabyte log files or documentation PDFs consumes tens of thousands of tokens on boilerplate text. An indexed workspace solves this by extracting relevant passages through hybrid semantic search, passing only concise excerpts into the context window.

### How does remote Streamable HTTP MCP differ from local stdio servers?

Local stdio MCP servers execute as child processes on your workstation, communicating through standard input and output streams. They require local runtimes like Node.js or Docker and store static AWS credentials on disk. Remote Streamable HTTP MCP servers run in the cloud, require zero local binary installations, support secure OAuth or Bearer token authentication, and allow team members to share indexed data without distributing cloud IAM keys.

### Does Fast.io sync with Google Drive and AWS S3?

Fast.io syncs with Google Drive, Dropbox, Box and OneDrive folders (one-way or two-way, on a schedule or on demand), but does not sync directly with AWS S3. Files from AWS S3 buckets can be imported directly into the workspace using URL import, making them available for hybrid search and Claude Code MCP queries.

## Sources

- [Claude Code Docs: Claude Code on Claude Platform on AWS](https://code.claude.com/docs/en/claude-platform-on-aws): Claude Platform on AWS enables developers to configure Claude Code with AWS authentication, IAM access controls, and AWS Marketplace billing.
- [Anthropic: Introducing the Model Context Protocol](https://www.anthropic.com/news/model-context-protocol): The Model Context Protocol establishes an open standard for connecting AI assistants and agents to external data sources.

## About Fast.io

Fast.io provides shared workspaces where people and AI agents work on the same files, with built-in semantic search and citation-backed chat over what they hold. Agents reach it through a remote MCP server, a REST API at https://api.fast.io/current/, and a command line client published on npm as @vividengine/fastio-cli. MCP setup is at https://mcp.fast.io/docs: Claude and most MCP clients connect to https://mcp.fast.io/mcp/tools, ChatGPT to https://mcp.fast.io/mcp/operations, and coding agents to https://mcp.fast.io/mcp/code.
