Mana
Guides · Connect your agentClaude Code
Connect your agent

Claude Code

Two commands and one sign-in. There is nothing to paste.

2 steps · 3 min readView as Markdown
Read this guide inclaude.aiChatGPT
On this page9 parts

If you added the Mana server by hand before, remove that setup first, as Remove Mana says: the server and its sign-in, the Mana block in ~/.claude/CLAUDE.md, and the Mana skills in ~/.claude/skills/. The plugin never updates an old copy of them.

  1. Install the plugin

    Run these two commands in a Claude Code session, one after the other:

    In a Claude Code session
    /plugin marketplace add mathieubrglt/mana-plugins
    In a Claude Code session
    /plugin install mana@mana-plugins

    Claude Code gets the plugin with git, so git must be on your machine.

  2. Sign in

    Run /mcp, select the Mana server, and sign in. Your browser opens once to confirm.

    The plugin connects the Mana server and installs the Mana skills. At the start of each session, it gives the agent the storing rules. With the plugin, you paste no prompt and the agent writes nothing into your instruction files.

    After 10 of your prompts, it asks the agent to store its work in Mana before the agent stops, at most twice in a session. The plugin reads the session transcript on your machine only to count your prompts. It sends nothing from the transcript.

    Then store your first memory.

Require it for every member

Admin only

Add these keys to the managed settings of Claude Code. Each member then gets the plugin, and a member cannot turn it off.

Configuration file
{
  "extraKnownMarketplaces": {
    "mana-plugins": {
      "source": {
        "source": "github",
        "repo": "mathieubrglt/mana-plugins"
      },
      "autoUpdate": true
    }
  },
  "enabledPlugins": {
    "mana@mana-plugins": true
  }
}

With autoUpdate, each member gets each new version at the next start of Claude Code, and no one reviews it first. The plugin hooks run with the privileges of the member, outside the sandbox. If your organization reviews each update, remove the autoUpdate key.

Or add the server by hand

Without the plugin, run these two commands in a terminal:

Terminal
claude mcp add -s user --transport http mana https://mcp.mana.scalarmind.com
claude mcp login mana

Or paste this line into Claude Code, and the agent runs the two commands for you:

Run these two commands for me: claude mcp add -s user --transport http mana https://mcp.mana.scalarmind.com and then claude mcp login mana. The second command opens my browser, and I sign in there.

The second command opens your browser to sign in and confirm. The mana_* tools appear from the next session.

Headless agents

A headless agent has no browser for the sign-in, for example a CI job or Claude Code on claude setup-token. Give it its own agent token. Open Settings, then Agent tokens, and create one for your own account. Choose a name, an access, and a number of days. The page shows the token once, so copy it before you leave. A read token searches and reads, a read_write token also stores, and neither holds more access than you. Keep the token in an environment variable such as MANA_TOKEN, never in a committed file, and add the server with it as a header:

Terminal
claude mcp add --transport http mana https://mcp.mana.scalarmind.com --header "Authorization: Bearer $MANA_TOKEN"

The token stops at its expiry, or when you select Revoke beside it on the Agent tokens page. A revoked token is refused on its next call.

Then paste the prompt

If you added the server by hand, start a new session and paste this prompt. It tells the agent to read the standing instructions, which carry the rules your organization keeps.

The prompt · after Mana is connected
I have connected the Mana MCP server to this assistant.
Call mana_standing_instructions and follow what it returns: it carries standard organization rules, and it says when to read it again.

If you pasted the line above, let the agent run the two claude mcp commands, then start a new session and paste this.

Then store your first memory.

Updating the plugin

Run these two commands in a terminal, then start Claude Code again:

Terminal
claude plugin marketplace update mana-plugins
claude plugin update mana@mana-plugins

When the connection is lost

Your browser opens to sign you in. Then a confirmation page names the client and the address it returns to. If you have not accepted the terms of service yet, that page asks you to. The token renews itself.

When Claude Code says the connection was lost, run /mcp, select the Mana server, and sign in again. Nothing in the store is lost.

Removing it

With the plugin, first run /mcp, select the Mana server, and clear its authentication. Then run this command:

In a Claude Code session
/plugin uninstall mana@mana-plugins

If the managed settings require the plugin, only an admin can turn it off there. If the agent wrote your organization's own skills under ~/.claude/skills/, Remove Mana says how to remove them.

Without the plugin, Remove Mana undoes the connection and anything the agent added to your instruction files.