agentleFS
Sign inSign up

Documentation

Connect an agent over MCP

Connecting over MCP

Agent clients read from agentleFS through the Model Context Protocol (MCP). The MCP server exposes tools like list_folders, retrieve_context, and filesystem navigation (list/read/…) — and enforces every call against the same grants you set in Permissions. Callers only ever see content they're authorized for.

Connecting as yourself

If a person is driving the client — Claude Code, Cursor, Claude Desktop — this is the path. There is no token to mint, paste, or rotate, and your access always reflects your current roles: change them in Permissions and the very next call sees it.

  1. 1Inside claude, install the plugin:
    /plugin marketplace add ContextHubApps/plugins
    /plugin install agentlefs@agentlefs
  2. 2Restart Claude Code. The plugin's MCP server only comes up on a fresh start — skipping this is the most common reason the tools never appear.
  3. 3Run /agentlefs:connect. It signs you in and then tells you what you can reach — including the case where that is nothing.
  4. 4A browser window opens. Sign in and pick this organization — the same login you used for this console.

The plugin also brings /agentlefs:seed, /agentlefs:permissions, /agentlefs:share and /agentlefs:who-can-see.

Stuck? Write to us with what you tried, and a person will answer. contact@agentlefs.com

Agent tokens — for agents, not people

A afs_… token exists for one reason: code that has no browser to redirect. Reach for it when the caller is an agent your application runs — an in-app assistant serving your users, a scheduled summarizer, a retrieval step inside your own product — plus the adjacent headless cases, CI jobs and scripts.

If a human is at the keyboard, you want browser sign-in above instead. A token is a long-lived secret you have to store and rotate; sign-in isn't.

Give each agent its own principal. In Permissions, create a principal for the agent, grant it only the roles that agent needs, then mint its token. Per-agent identity is what makes the audit trail attributable and lets you revoke one agent without touching the others. The token is shown once — treat it like a password.
Remote HTTP (Streamable HTTP) — afs_ header

POST to /mcp — one endpoint, the whole toolset. The token goes in a bearer header:

POST https://mcp.agentlefs.com/mcp
Authorization: Bearer afs_your_token_here
Content-Type: application/json
{
  "mcpServers": {
    "agentlefs": {
      "url": "https://mcp.agentlefs.com/mcp",
      "headers": {
        "Authorization": "Bearer afs_your_token_here"
      }
    }
  }
}
Every call is authorized and audited. Reads are filtered by the caller's grants — on the file, or on a folder above it — before results leave the server.