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.
Want your agent to do the setup? Tell it to read /connect.md — install instructions written for the agent itself.
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.
- 1Run this in your terminal:
claude mcp add --transport http agentlefs https://agentlefsmcp-server-dev.up.railway.app/mcp - 2Start
claudeand run/mcp, then choose agentlefs and authenticate. - 3A browser window opens. Sign in and pick this organization — the same login you used for this console.
- 4Back in the terminal,
/mcpnow shows connected. Your agent can read everything you can.
Any other MCP client takes this URL directly — include the /mcp path.
https://agentlefsmcp-server-dev.up.railway.app/mcpStuck? Ask whoever runs this deployment, with what you tried and what came back.
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://agentlefsmcp-server-dev.up.railway.app/mcp
Authorization: Bearer afs_your_token_here
Content-Type: application/json{
"mcpServers": {
"agentlefs": {
"url": "https://agentlefsmcp-server-dev.up.railway.app/mcp",
"headers": {
"Authorization": "Bearer afs_your_token_here"
}
}
}
}
