Connect Your Agent
Connecting your own AI assistant to Nirvai is like giving it a company badge: you set it up once, and from then on it can use your Nirvai memory, databases, and tools — and everything it does shows up in your account for you to review.
You keep using the assistant you already trust (Claude Code, Codex, or another). Nirvai becomes its shared, long-term brain.
Before you start
- A Nirvai account.
- One supported assistant installed: Claude Code, OpenAI Codex, or any assistant that speaks MCP (the open standard most coding assistants now support).
- A terminal — you'll paste one command or config block.
Step 1 — Create your connection token
- In Nirvai, open Settings → Connections.
- Click New connection, give it a name (e.g. "My laptop"), pick which assistant it's for, and choose what it may do: Read, Run, Write, Create.
- Copy the token that appears — it starts with
nrv_pat_and is shown only once.
Treat the token like a password. It's the only secret that lives on your machine — your account passwords and connected-app logins never leave Nirvai.
Step 2 — Connect your assistant
Pick your assistant and replace nrv_pat_... with the token from Step 1.
Claude Code
claude mcp add --transport http nirvai \
https://nirvana-ai.app/nirvai/mcp \
--header "Authorization: Bearer nrv_pat_..."
OpenAI Codex
Set the token as an environment variable, then add the server to ~/.codex/config.toml:
export NIRVAI_PAT="nrv_pat_..."
[mcp_servers.nirvai]
url = "https://nirvana-ai.app/nirvai/mcp"
bearer_token_env_var = "NIRVAI_PAT"
Codex's remote-server settings change between versions. If these keys don't match your Codex, check its MCP docs for the current field names — the address and token stay the same.
Another assistant
Any assistant that speaks MCP connects to the same address:
- MCP address:
https://nirvana-ai.app/nirvai/mcp - Header:
Authorization: Bearer nrv_pat_...
If your assistant can't speak MCP but can call a web service, point it at the machine-readable description at https://nirvana-ai.app/nirvai and use the same header.
Step 3 — Make Nirvai the default
Connecting gives your assistant the ability to use Nirvai. This step makes it the habit — so when you say "remember this for next time," it saves to Nirvai instead of a throwaway local file.
- Install the Nirvai skill (recommended) — copy the
nirvaiskill folder into your assistant's skills directory (for Claude Code that's~/.claude/skills/). It teaches the assistant when to reach for your memory, databases, and tools. - Add one line to the file your assistant reads on every launch —
CLAUDE.mdfor Claude Code,AGENTS.mdfor Codex and most others:
This machine is connected to Nirvai — my long-term memory, databases, and tools.
When something should last beyond this session, be shared, or be reviewed later,
I save it to Nirvai instead of a local file or my own notes.
Your assistant doesn't "remember" that it's connected — it re-reads these files every session. That's why setting it up once keeps working every time you open it.
Try it
Open your assistant and ask for something that should stick around:
"Remember that our brand voice is warm and concise, for next time."
It should save that to Nirvai. Open Settings → Connections → Agent Activity and you'll see the action, with a link straight to what it created.
Troubleshooting
| Problem | Fix |
|---|---|
| "Unauthorized" / 401 | The token is wrong, revoked, or missing the Bearer prefix. Create a new one under Settings → Connections. |
| Assistant can't see the tools | Make sure the address is exactly https://nirvana-ai.app/nirvai/mcp, then restart the assistant. |
| It refuses to write or create | The token's permissions are too narrow. Create one with Write / Create enabled. |
| It saved to a local file anyway | Add the Step 3 line to CLAUDE.md / AGENTS.md — that's what makes Nirvai the default. |
| Nothing shows in Agent Activity | The action may have been a read (reads aren't always listed). Try a "remember this" prompt. |
What's next
- Databases — the structured records your assistant can now read and update.
- Agents — the AI employees it can run on your behalf.
- Automations — schedule that work to run on its own.