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.
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.
- 1Inside
claude, install the plugin:/plugin marketplace add ContextHubApps/plugins /plugin install agentlefs@agentlefs - 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.
- 3Run
/agentlefs:connect. It signs you in and then tells you what you can reach — including the case where that is nothing. - 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
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.
afs_ headerPOST 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"
}
}
}
}
