AgentFS

MCP

Connect Claude Code, Cursor, or another MCP client to the hosted AgentFS server.

Connect an MCP client to:

https://mcp.agentfs.cloud/v1/mcp-oauth

No API key or headers are needed. https://agentfs.cloud/mcp also works the same way.

That URL is all you need. The first time your client connects, it opens AgentFS in your browser. Sign in if you are not already, pick the team the connection should use, and click Allow. Your client gets access and keeps it; there is no API key to copy.

Claude Code

claude mcp add --transport http agentfs https://mcp.agentfs.cloud/v1/mcp-oauth

Then run /mcp in Claude Code and choose agentfs to sign in.

Cursor

Add the server to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):

{
  "mcpServers": {
    "agentfs": { "url": "https://mcp.agentfs.cloud/v1/mcp-oauth" }
  }
}

Cursor asks you to log in to the server. Click the login button next to it and approve in the browser.

Other MCP clients

Choose the client's HTTP or remote-server option and set the URL to https://mcp.agentfs.cloud/v1/mcp-oauth. Clients that support MCP sign-in open the browser for you.

Headless and CI

Where no browser is available, send an API key instead. Create one in the dashboard under API keys, or run agentfs login, and pass it as a header:

claude mcp add --transport http agentfs https://agentfs.cloud/mcp \
  --header "Authorization: Bearer $AGENTFS_KEY"

Keep AGENTFS_KEY in your client's environment or secret store; do not paste it into a committed configuration file.

Available tools

ToolWhat it does
upload_fileWrite a file from text, content_base64, or a source url, and return its hosted URL. Takes path or project + prefix, if_exists, visibility, expires_in, label, and idempotency_key (send the same value when retrying a call, and the retry returns the first file instead of creating another).
list_filesList files, newest first. Filters: project, prefix, q, run_id, and status (trashed lists deleted files). Pages with limit and cursor.
read_fileRead a text file's content by ID or path.
get_fileGet a file object and its hosted URL by ID.
rename_fileRename a file, keeping its ID and hosted URL.
delete_fileDelete a file by ID. It stays in the trash for 30 days.
restore_fileBring a deleted file back from the trash, with the same path, ID, and hosted URL.
create_access_urlCreate a time-limited URL for a private file.

Without a connection, only upload_file is available; see MCP for agents. A browser connection can use all files in the team you picked. An API key keeps its own permissions.

Updating a file

To change a file it wrote earlier, an agent sends the same path to upload_file with if_exists=replace. The ID and URL stay the same. Without it, a path already in use is an error.

When the agent only knows the path, read_file accepts a path, and list_files with a path filter returns the file object with its ID and ETag.

Reading content

read_file returns text inline, up to 64 KiB per call. Pass offset to continue from where the last call stopped; the result carries offset, length, size_bytes, and eof. A binary file is not returned inline — use create_access_url for a link to it instead.

See Uploads, Files, and Sharing for the same operations over HTTP.

On this page