Nexara Connect docs0.1.0

Claude Code

Quickest: Connect your laptop (nexara login, then nexara connect) does everything on this page in one browser approval, and adds the hand-off hook. The manual steps follow.

Before you start

Add the server

User scope (all projects):

claude mcp add --transport http --scope user nexara https://app.nexara.ac/mcp \
  --header "Authorization: Bearer $NEXARA_KEY"

Or per project, in .mcp.json at the repo root. ${NEXARA_KEY} is expanded from your environment, so the key never lands in git:

{
  "mcpServers": {
    "nexara": {
      "type": "http",
      "url": "https://app.nexara.ac/mcp",
      "headers": { "Authorization": "Bearer ${NEXARA_KEY}" }
    }
  }
}

If you leave the header out, Claude Code runs the OAuth flow instead (loopback redirect, consent in your browser).

Load context at session start (optional)

Add a line to your project's CLAUDE.md:

Before starting, call the nexara `context_bundle` tool with the task as intent. Record decisions with `context_propose`.

Verify

Ask the agent to call context_whoami. It returns the agent name, workspace and grants. Or run:

curl -s https://app.nexara.ac/mcp \
  -H "Authorization: Bearer $NEXARA_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"context_whoami","arguments":{}}}'

Hand off automatically when a session ends

Agents are told to call context_handoff before they stop, but a session can end without one (closed window, /clear, out of context). A SessionEnd hook makes the note automatic. It runs the Nexara CLI, which writes an entry marked "Automatic note" to <scope>/handoff.md with your open tasks and the commits of the last 12 hours. If the agent already wrote a note in the last 10 minutes, nothing is added. The hook never fails or blocks Claude Code.

Add this to .claude/settings.json in the project (needs the nexara CLI and NEXARA_URL / NEXARA_KEY, or nexara login):

{
  "hooks": {
    "SessionEnd": [
      { "hooks": [ { "type": "command", "command": "NEXARA_HANDOFF_SCOPE=projects/billing nexara handoff --auto" } ] }
    ]
  }
}

Replace projects/billing with the folder the project works in. The key needs propose or collab on that folder.

Troubleshooting

SymptomCause
401 invalid, expired or revoked tokenWrong key, key revoked, or a workspace lockdown bumped the token epoch. Mint a new key
401 git tokens (nxg_) are not accepted on /mcpYou pasted a git token. Use an nxc_ agent key
403 forbidden host or originThe server has ALLOWED_HOSTS set and your Host header is not in it
Tool result forbidden: ...The agent's grant does not cover that Space, action or sensitivity. Widen it on the agent page
Tool result step_up_requiredThe change needs a human with step-up; it was turned into a proposal