layven.

Connect Claude Code

One terminal command adds Layven to Claude Code, using an agent token you create in the console.

Last updated 4 August 2026

One terminal command adds Layven to Claude Code. It uses an agent token rather than a browser approval, so create one first.

Before you start: you need a Layven account with at least one workspace. If you have not made one yet, create your drive first.
  1. Create an agent token

    In the Layven console, open Agents and create a token. Scope it to the workspace you want Claude Code to reach, then copy the secret. It is shown once.

  2. Add Layven to Claude Code

    Run this in the project where you use Claude Code, with your own token in place of the placeholder:

    claude mcp add --transport http layven https://api.layven.io/mcp --header "Authorization: Bearer agd_your_agent_token"
  3. Confirm the server connected

    Inside a Claude Code session, run /mcp, or from your shell run claude mcp list. Layven should show up marked as connected.

  4. Keep the token out of version control

    The command above adds Layven to a local, per-project configuration for Claude Code, separate from any .mcp.json your project might commit to git for the whole team.

    Careful: if your project already commits a shared MCP config, do not paste your personal token into it. Give each teammate their own agent token instead of sharing yours.
  5. Write a test file to confirm it worked

    Ask Claude Code to create a file:

    Write a file called hello.md in my Layven workspace that says hello from Claude Code.

    Open the Layven console and look for hello.md at version 1, attributed to the token you created. If it is there, the connection works, and any other agent you connect reads that same file without you copying anything anywhere. You are done.

If it does not connect

Double-check the URL has no trailing slash and no path after /mcp, and that the token was pasted in full with no line breaks. If the server lists as connected but Claude Code sees no files, the token was granted a different workspace than the one you expected: check its grants under Agents in the console.

If you run Claude Code with sandboxing enabled, add api.layven.io and storage.layven.io to sandbox.network.allowedDomains in your Claude Code settings. Both hosts are needed: one carries the connection, the other carries file transfers.

Revoke access

Open Agents in the console and revoke the token. It stops working on the next request, and everything Claude Code wrote stays exactly where it is with its history intact.

Next

Connect a second client and point it at the same workspace. Two agents sharing one drive is the part that does not exist anywhere else: Claude, Cursor, or Gemini.