Install in pi
Add Levirge Brain to pi with the pi-mcp-adapter extension and mcp.json, then sign in or use a token.
pi has no built-in MCP; the pi-mcp-adapter extension adds it.
1 · Install the adapter
Run this and restart pi:
pi install npm:pi-mcp-adapter2 · Add the server
Create ~/.pi/agent/mcp.json:
{
"mcpServers": {
"brain": { "url": "https://brain.levirge.com/mcp", "auth": "oauth" }
}
}3 · Sign in
Ask pi to "authorize the brain MCP server" and sign in when the browser opens.
4 · Verify
Ask for a read-only call: kb_overview returns your workspace's knowledge
summary.
Using a token instead
For machines that cannot open a browser (CI, a server). Get a
token first and put it in an environment
variable, for example export BRAIN_TOKEN=<your-token>. Then use bearer auth
instead of oauth in mcp.json:
{
"mcpServers": {
"brain": { "url": "https://brain.levirge.com/mcp", "auth": "bearer", "bearerTokenEnv": "BRAIN_TOKEN" }
}
}Troubleshooting
pi does not know about the mcp tool. Restart pi after
pi install npm:pi-mcp-adapter. Extensions load at startup.
The server is not listed. Check the file is at ~/.pi/agent/mcp.json (or
.pi/mcp.json in the project) and is valid JSON.
"401" or "Unauthorized" with a token. Check BRAIN_TOKEN is set in the shell
that starts pi, and that the token has not been revoked on
Profile → MCP Tokens.
Other clients
Every guide is listed under any MCP client. No workspace yet? Request access.