Create the account
The user signs up, activates billing through Stripe, then opens the Frege control plane.

Documentation
Frege is hosted. Users manage the browser app; agents install a small local CLI. The only MCP server customers run is frege mcp serve, and it only calls Frege APIs with a verified key.
https://brain.frege.devWhere users sign in, manage orgs, billing, roles, API keys, and memory review.https://frege.devWhat the CLI and MCP server call for /api/v1 routes unless Frege support gives another base.@frege-dev/cliPublic npm package that installs the frege and frege-mcp commands.frege mcp serveLocal stdio server used by Codex, Claude Code, and other MCP clients.The simplest successful setup is: create an account, create a valid API key, give the agent the install prompt, then verify MCP with frege_status. No one should hand-edit secrets into MCP JSON.
The user signs up, activates billing through Stripe, then opens the Frege control plane.
An admin creates a scoped key for an active org and a specific role. The raw key is shown once.
Give the agent the prompt below plus the key through a private channel. The agent installs the CLI and verifies the key.
The MCP client calls frege_status first, then searches, reads, builds context, and pushes approved docs.
The CLI can install without an API key, but Frege is not connected until frege connect verifies a valid key from an active org.
Installation is clearer when the browser work and terminal work are kept separate. The user owns billing, org setup, and keys. The agent owns local CLI setup after the user provides a key.
Browser appTerminalHosted APIAdmins use the protected control plane to create organizations, invite members, define roles, generate API keys, inspect sessions, and review memory proposals.
Every agent connects with a per-identity API key issued from the control plane. Keys inherit the role of the user they belong to, so an agent sees exactly what that role is allowed to see.
frg_live_... key immediately. It is shown once.The org must be active, the key must be unrevoked, and frege connectmust verify it before MCP tools can read or write Frege context.
This is the recommended customer workflow. Paste the prompt into Codex, Claude Code, or another local coding agent. Provide the API key separately and tell the agent not to echo it.
Frege MCP install promptInstall Frege MCP for this machine.
Inputs:
- API base: https://frege.dev
- I will provide FREGE_API_KEY separately. It starts with frg_live_.
Important:
- The browser app may open on https://brain.frege.dev. That is fine.
- MCP uses the API base above for /api/v1 calls.
- You may install the CLI without a key.
- Do not treat MCP as ready until frege connect and frege doctor both succeed.
- Do not print the full key or put it in MCP JSON, docs, screenshots, shell startup files, or chat summaries.
Steps:
1. Confirm Node.js 20+ and npm are available.
2. Run: npm install -g @frege-dev/cli
3. Verify: command -v frege && frege help
4. If npm reports EEXIST or frege is not found, use https://frege.dev/docs troubleshooting.
5. Connect with the key I provide:
frege connect https://frege.dev --token "$FREGE_API_KEY"
6. Run: frege doctor
7. Show me only org, orgStatus, role, and key prefix.
8. If connect or doctor fails, stop and ask for a valid key from an active org.
9. Register MCP:
frege agent install codex
frege agent install claude
If neither is available, configure command "frege" with args ["mcp", "serve"].
10. From the MCP client, call frege_status and confirm it matches frege doctor.Browser traffic may land on brain.frege.dev. MCP does not depend on that subdomain. It uses https://frege.dev for /api/v1 calls unless Frege support gives a customer-specific API base.
If you are doing the setup yourself instead of through an agent, install the public npm package and verify the command is on your path.
npm install -g @frege-dev/cli
command -v frege
frege helpfrege connect https://frege.dev --token "$FREGE_API_KEY"
frege doctorfrege connect verifies the key, saves local config at ~/.frege/mcp/config.json, prints org status, and tries to register MCP clients it can detect.
If zsh says frege: command not found, add npm's global bin directory to your shell path.
npm config get prefix
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
hash -r
command -v frege
frege helpGUI-launched MCP clients may still miss your shell path. In that case, use the full path from command -v frege as the MCP command.
Usually frege connect handles this for you. If a client was not detected, register it explicitly after frege doctor succeeds.
frege agent install codex
frege agent install claude{
"mcpServers": {
"frege": {
"command": "frege",
"args": ["mcp", "serve"]
}
}
}The API key belongs in ~/.frege/mcp/config.json, not MCP client JSON. If frege_status does not match frege doctor, the setup is not complete.
Agents should load user-approved markdown through the CLI. The terminal shows exactly what was pushed, and Frege records the write through the same org, role, and audit controls as MCP.
push docs into Frege# One file
frege docs push docs/INVESTOR_DEMO_WORKFLOW.md \
--sensitivity internal \
--tag frege-demo \
--tag operations
# Preview a directory before writing
frege docs push docs \
--include "**/*.md" \
--exclude "**/HANDOFF.md" \
--sensitivity internal \
--dry-run
# Repeatable manifest sync
frege docs sync frege.docs.yml --dry-run
frege docs sync frege.docs.yml
frege docs list
frege context "how does Frege signup work?"Markdown wikilinks such as [[hosted brain architecture]] are preserved. For canonical graph-connected brain pages, ask the agent to submit a reviewable wikilinked page proposal with frege_write_page_proposal.
Give these rules to an agent after Frege is connected. They keep day-to-day task activity in sessions while durable knowledge changes go through review.
frege_build_context.frege_search_pages and read specifics with frege_get_page.[[self-serve signup]] in approved markdown.frege_write_page_proposal; do not silently rewrite canonical memory.The MCP server calls Frege-hosted APIs with the scoped API key. It never reads the database directly.
frege_statusConfirm org, role, key prefix, and connectivity.frege_brain_statusInspect hosted brain status, indexed pages, and source counts.frege_list_sourcesList hosted brain sources visible to the caller.frege_search_pagesSearch brain pages the caller is allowed to see.frege_get_pageRead a specific page and its revisions.frege_list_vaultList visible pages with outgoing-link and backlink counts.frege_page_linksInspect outgoing links, backlinks, and unresolved links for a page.frege_traverseTraverse a visible neighborhood in the hosted page-link graph.frege_find_connectionsFind a visible link path between two hosted pages.frege_add_source_proposalPropose a new source for administrator review.frege_build_contextAssemble scoped, cited context for a task before answering.frege_create_documentCreate a document from user-approved markdown.frege_read_documentRead a visible document by slug.frege_list_documentsList documents visible to the current API key.frege_search_documentsSearch visible documents by text, title, path, or tag.frege_write_page_proposalSubmit a reviewable update instead of editing canonical knowledge.frege_propose_revisionPropose a revision to a visible legacy document.frege_propose_memory_from_sessionCreate a memory proposal backed by recorded session evidence.frege_start_sessionOpen a session ledger for a substantial workflow.frege_append_session_eventRecord task activity onto the active session.frege_get_sessionRead a visible agent session and its events.frege_search_sessionsSearch organization-visible sessions when the role permits it.frege_list_agentsList Frege-hosted agents available to this org and role.frege_run_agentQueue hosted agent work when the key has execution permission.frege_get_agent_runRead status and output for a hosted agent run.frege_audit_eventsList legacy audit events visible to the current role.frege_invoke_modelInvoke an organization-configured model with governed context.EEXIST during npm installnpm uninstall -g @frege/cli @frege-dev/cli
rm -f ~/.local/bin/frege ~/.local/bin/frege-mcp
npm install -g @frege-dev/clifrege connect https://frege.dev --token "$FREGE_API_KEY"
frege doctorIf frege doctor fails, the key may be invalid, revoked, expired, or attached to an inactive org. Create a new key in the control plane with the correct role, then reconnect. If Node is too old, install Node.js 20 or newer.
~/.frege/mcp/config.json is local secret state. Do not commit it.frege connect over storing FREGE_API_KEY in MCP JSON.