Skip to content

MCP and agent access

Connect Claude, Cursor or any MCP client to Fyle with fyle mcp. Each agent gets an agent grant: one workspace, the paths it may touch, read or write, and an expiry. It never gets your sign-in.

Last updated

Connect a client

Claude Code: edits go to review, only docs/ and src/
claude mcp add fyle -- fyle mcp --mode branch_only --paths 'docs/**' 'src/**'
Claude Desktop or Cursor (mcpServers)
{
  "mcpServers": {
    "fyle": {
      "command": "fyle",
      "args": ["mcp", "--workspace", "Projects", "--mode", "branch_only"]
    }
  }
}

fyle mcp runs over stdio. For a client that needs HTTP: fyle mcp --http 127.0.0.1:8765 (streamable HTTP at /mcp; bind it to localhost).

Agent grants

Without a grant, fyle mcp makes one when it starts, from your sign-in. To give an agent access without your sign-in (CI, a remote machine), create a grant and pass its secret:

fyle grant create --workspace Projects --mode branch_only --paths 'docs/**' --ttl 8h
FYLE_AGENT_GRANT=fyle_agt_… fyle mcp
read
List, read and search only.
branch_only (default)
New files apply; edits and deletes are kept as branches for review.
direct
Edits apply unless the file moved on meanwhile (then they branch). Owners and admins only.

Grants last from 30 minutes to a day. Create, list and revoke them in the dashboard (Agents → Access) or with fyle grant ls and fyle grant revoke ID. Revoking stops the agent at once.

Tools

What an agent can do through MCP
ToolDoes
list_workspaces, list_folder, get_file_metadataBrowse, with ids, versions and sizes
read_fileWhole file or a byte range, current or an old version
search_filesNames containing a query, under a folder
create_file, create_folderNew files (up to 64 MB) and folders
write_fileA new version from the version read; stale or branch-only writes become branches
move_file, restore_versionDirect grants only
delete_fileOne file (restorable); folders are never deleted through MCP
get_version_historyVersions, branches marked

Text read from files is treated as data, never as instructions to the agent.