Documentation
Agents & MCP
Connect Claude Code, Cursor, ChatGPT and other MCP clients to your vault, and use the browser extension.
Cette page n'est pas encore disponible dans votre langue ; elle s'affiche donc en anglais.
Create an API token
Open a vault and go to Agents & MCP. In the Connect your AI tools step, click Generate token: the setup commands below fill in with your new token, ready to copy. The token is shown once, so copy it right away. As soon as your AI tool reads the vault for the first time, the tab confirms the connection.
Right after your first build, the reveal screen offers the same in one click: Add to Cursor and Add to VS Code open the editor's install prompt with the server already configured, and the Claude Code command is ready to copy.
A folder share link (Team) opened in a browser shows a guest page: who shared which folder, until when, and the same one-click setup for the guest's own agent. A guest's agent starts at the shared folder: its map lists that folder and the subfolders the link may open. A guest's agent never counts as yours: it does not trigger your "agent connected" moment or pause your browser extension. Share links stop working if their creator or an owner of the vault is suspended (see Teams & organizations).
The sample vault cannot be connected to agents: it holds demo data about someone else. Connect your agents to your own vault.
You can also create tokens with a chosen role (Owner, Admin or Member), access and expiry in the API tokens card. Every call is filtered by the folders that role is allowed to read. Access is one of:
- Full access: reads and writes like the role allows.
- Review-only: reads, and every write (facts and lessons) waits in Quarantine for your approval.
- Read-only: only the read tools are offered.
One-click keys (the Connect your AI tools step and the reveal screen) state their role and expiry, which you can change (90 days by default; Member in team vaults). A vault can have up to 50 active tokens: revoke one you no longer use to make room. The browser extension signs in to your account instead of using a key (see below); connected with a key, it needs a full-access owner or admin key.
The gateway is a Streamable HTTP endpoint at https://app.tovriq.com/api/mcp, authenticated with Authorization: Bearer tvq_…. Self-hosted nodes use https://your-domain/api/mcp.
ChatGPT connectors cannot send headers, so they connect with a ChatGPT link (/api/mcp/k/…): click Create ChatGPT link in the ChatGPT setup. The link carries its own limited token, review-only (read-only on plans without agent writes), and expires after 90 days. Full-access tokens are never accepted in a link, because links end up in logs, browser history and screenshots. Keep the link private and revoke it in the API tokens card like any token.
The Agents & MCP tab generates ready-to-paste snippets for Claude Code, Claude Desktop, Cursor, Windsurf, ChatGPT and any other MCP client, plus a Test connection button. The test does not count as agent activity: it never pauses your browser extension or adds to your agent calls.
The tools
| Tool | What it does |
|---|---|
get_master_map | Returns AGENTS.md and SOUL.md, filtered to the folders your role can see |
read_folder_readme | Returns a folder's index: purpose, routing rule and files with their TL;DRs |
read_context_file | Reads one Markdown file (long files in 40,000-character parts: offset and limit), ending with its contentSha256 |
search | Finds the files that best match a question (ranked locally, no AI cost, tolerant of typos), with the best-matching section of each |
fetch | Opens one search result by its path or file id, with its TL;DR, tags and contentSha256 |
propose_context_update | Saves new facts; sovereign files, low-confidence facts and team members' writes go to Quarantine. With expectedSha256 it changes only the version the agent read |
remember | Saves one fact without choosing a file: the vault routes it like propose_context_update |
record_agent_feedback | Appends corrections and mistakes to Lessons_And_Mistakes.md so future sessions learn from them |
search and fetch follow the shape ChatGPT connectors and deep-research agents expect. Agents are told the language your vault is written in (English unless you chose another), so they search in that language and translate names and terms from other languages first.
Changes never overwrite a newer version. read_context_file and fetch give the file's contentSha256. An agent that passes it to propose_context_update as expectedSha256 only changes the version it read: if the file changed since (you edited it, or another agent wrote to it), nothing is written or sent to Quarantine, and the agent gets CONFLICT with the current text of that section so it can redo its change on the new version.
"Tokens served" counts the text that read_context_file, fetch and search hand to your agents. The other tools count as agent calls only.
On the Free plan the gateway is read-only: the read tools (get_master_map, read_folder_readme, read_context_file, search, fetch) work, while writing facts needs Pro, an active Import Pack month, or Team.
In a team vault, writes from a member's token (facts and lessons) always wait in Quarantine until an owner or admin approves them; owner and admin tokens write directly, except to sovereign files. Agents only ever see the folders their token's role can open: maps, folder indexes and the Changelog are rebuilt for that role, so they never mention folders it cannot read. Paths with .. segments or hidden control and text-direction characters are refused, and earlier versions of every changed file are kept (see Privacy & storage).
Agents never write the files Tovriq maintains: routing maps, folder README.md indexes, .cursorrules, .windsurfrules and Changelog.md are refused, and so are hidden and .git folders. A fact aimed at another name the vault reserves (such as Historical_Archive.md, or Lessons_And_Mistakes.md inside a folder) is saved with a _Notes suffix instead (Historical_Archive_Notes.md). Secrets in anything an agent sends (facts, reasons, section and agent names) are replaced with placeholders such as [REDACTED_SECRET_1] before anything is stored.
Each channel drops its own duplicates before any AI call, so they never cost tokens: MCP ignores the same facts proposed again for the same file and section, and the extension ignores chat messages it has already captured. The two channels do not deduplicate each other: if an agent summarizes a chat over MCP and the extension also captures that chat, it can be distilled twice.
Each token and each share link has its own rate limit (240 and 120 calls a minute), so a busy guest never locks you out. A share link can have at most 25 proposals waiting in Quarantine (a token 100), and every Quarantine card shows which token or share link made the proposal.
Activity log
The Activity log at the bottom of the Agents & MCP tab lists every call your AI tools and the browser extension made to the vault with its API tokens and share links: the time, the token or share link and the AI tool's name, the tool called, how it went (succeeded, not found, refused, conflict, invalid request or failed), the vault paths it read, searched or wrote, the tokens served and, for searches and section updates, what was searched or which section changed. Calls refused before they reach a tool (a wrong or revoked token, a rate limit) and connection tests are not listed.
- Filter by token or share link, tool, outcome and dates, and export what you see as CSV or JSON (up to 5,000 rows per file part; cells are written so spreadsheets never run them as formulas).
- Revoke a token or share link straight from one of its rows.
- Only the vault owner can read it, and admins of vaults without owner-only folders.
- Entries are kept for 30 days, and at most the newest 20,000 per vault. Search terms and section names are stored only after secrets are removed and are encrypted with the vault's key; locking the vault with a passphrase erases them. Deleting the vault deletes its log, and moving a vault to a team starts a new one.
Browser extension
The extension adds your vault's map to your chats on ChatGPT, Claude, Gemini, Grok, Kimi, DeepSeek, Perplexity, Qwen, Le Chat (Mistral), Poe and Microsoft Copilot, and captures the chats your context was sent in back into the vault. On any other site it inserts your context where you ask for it.
- It caches
AGENTS.mdandSOUL.mdlocally, so adding them is instant and free. - Your context goes out with your first message. The message box of a new chat stays empty, and a small pill next to it says Tovriq: Context ON. When you send your first message (Enter, or the site's send button), your context is placed above what you typed, and the message goes out once. On most sites your own key press or click sends it. On ChatGPT (signed in) and Claude the extension holds that key press or click for a moment, until the site has taken your context, and then passes it on once in your place. A message is only ever sent when you send it.
- Click the pill to switch the context off for one chat (a quick question that needs none). The small button beside it writes the context into the message box right away, if you want to see it before you send. In every other chat the pill offers Insert context. The pill says Context added only once your context is in the message box you see; if it could not be put there, it says Not inserted and asks you to click in the message box and try again.
- Every new chat starts with the context on, also when you click New chat without reloading the page, and whatever you chose in the chat before. If you delete an inserted context from the message box before sending, the context is on again for that chat's first message: click the pill to switch it off.
- In the extension's options you choose how your context reaches a new chat: Inject automatically on send (the default), Prefill when opening a new chat (your context is written into the empty message box and the cursor waits on the empty line below it: type your message there and send), or Manual only (nothing is added until you ask).
- Context is added once per conversation, only into the chat's own message box (never into posts, direct messages or other editors on the page), also when you switch chats without reloading. If your message could not be changed at the moment you sent it, it goes out as you typed it and the pill says the context was not added.
- On any other site (a new AI tool, your company's assistant), right-click a text field and choose Insert Tovriq Context, or press the keyboard shortcut (
Ctrl+Shift+Y, orCommand+Shift+Yon a Mac; you can change it on your browser's extension shortcuts page). The popup offers the same with Insert context on this page. The extension has no access to those sites: it touches a page only at the moment you ask, and only the field you are typing in. - It skips injection only on the site whose own MCP connector is active (for example ChatGPT with a ChatGPT link), so context is never added twice. Agents outside the browser, such as Cursor, Claude Code or VS Code, never pause it, and capturing never depends on MCP.
- Only a chat your context was sent in is captured. Opening a chat never saves it. A new chat that got your context with its first message is captured from that message. In a chat that existed before, click Insert context and send a message: the chat is captured from that message on, and never the turns before it. The extension links a chat once its messages have stayed on the page for three seconds, so that a quick click from one chat to the next never files one chat under another; a chat you leave sooner is captured the next time you open it. For a chat that is not saved, the popup's Last capture says Not saved and how to start.
- Captured chats are scrubbed for secrets in the browser. A capture is sent after a quiet period of 5–10 minutes, or at once when you hide or close the tab or move to another chat, as the page shows the chat at that moment. Only new or edited messages are sent, not the whole conversation again. The extension keeps that record for the 200 chats it captured most recently in each browser: a chat beyond those, or one you open in another browser, is sent and distilled once more from the message that carried your context, as far as the page shows it. Chats captured within 10 minutes of each other are distilled together.
- Your own context never comes back with a captured chat: the extension takes it out of your first message before the chat is sent, and the server does the same for older versions of the extension and for imported chats. Only what you and the AI wrote is distilled, so your context never costs tokens a second time.
- Temporary, incognito and private chats never get your context and are never captured, on any of these sites. A new chat that only offers such a mode (the button that would start it) is an ordinary chat.
- Capturing chats needs the owner or admin role. Signed in, the extension acts with your own role on each vault (below). Connected with an access key, it needs a full-access owner or admin key: with a Member key it only adds your context to chats, and captures are refused. Owners and admins create one under Or connect this vault with an access key on the extension card in the Agents tab (Create a key for the extension); the card also shows the Server URL. Members sign in instead.
- A capture waits in a local outbox until the server has taken it. While you are offline, the server has an error or your token pool is used up, it is tried again for up to 7 days; after that it is dropped, and those messages go out the next time you open that chat. A capture the server has taken stays in the outbox, for up to 35 days, until the server says it was distilled into your vault; if its build could not run (for example because the pool was used up first), it is sent again. A capture that two builds could not distill is given up: the popup says Not distilled, and that part is not sent again. The popup shows what is waiting, and Last capture says Distilled into your vault once it is there. Changing the server URL, the key or the account, or signing out, drops the chats still waiting, so a chat never reaches another vault or server. Choosing another vault in the popup drops nothing: what waits still goes to its own vault.
- Each chat stays with the vault it started with. When you choose another vault in the popup, connect another key or server, or sign out, your open chat tabs drop the previous vault's context at once: the first message of a new chat gets the new vault's context, or none. A chat that started with another vault is never captured into the one connected now. When you open such a chat, the pill says Not saved here · another vault's chat for a few seconds, and the popup's Page check says the same and names the vault connected now. Choose or connect that chat's vault again and its new messages are captured from where they left off. A chat that holds the context of two vaults (you sent one vault's context in another vault's chat) is never captured. Only what is sent counts: a context that was in a new chat's message box and left it before you sent (a site showing the previous chat's message there for a moment, as signed-in ChatGPT does, or one you deleted) does not tie that chat to its vault. The server refuses a capture meant for another vault as well.
- A message box that holds another vault's context says so. If the message box of a new chat already holds the context of a vault other than the one you chose (a draft the site restored, or text that was in the box when you switched), the pill says Another vault's context in the box, in amber, and the popup's Page check says the same and names the vault connected now. It never reads as "context inserted". Delete that text, and the context of the vault you chose is on for the chat's first message. Nothing is removed for you there.
- A leftover of a message you already sent is removed (ChatGPT). Signed-in ChatGPT sometimes opens a new chat with the whole first message of an earlier chat still in the message box, your context included, and leaves it there. The extension removes it only when it is exactly a first message it sent with your context and saw answered, and only from a message box you have not typed in: the pill says Leftover draft removed, and one Undo (
Ctrl+Z, orCommand+Zon a Mac) brings the text back, after which the extension leaves it alone for good. Everything else stays as it is: a draft with anything changed in it, a context you inserted and did not send, a message that got no answer, and any box you typed or pasted into. To recognize such a leftover, the extension keeps a one-way hash of up to 20 such first messages for 14 days in the browser; no message text is stored. - A passphrase-locked vault's context is not added to chats until you unlock it, and captured chats wait until then.
- On a self-hosted Tovriq server, chats from the seven sites added in extension 0.5.0 (Kimi, DeepSeek, Perplexity, Qwen, Le Chat, Poe, Copilot) are captured once the server has been updated to know them; until then the extension only adds your context there.
- The server URL is the app's address, not the MCP endpoint (a pasted
/api/mcpaddress is corrected, and an address where no Tovriq server answers is reported). It must usehttps://(plainhttp://only forlocalhost). The popup's Page check is about the tab you are looking at: whether the extension found the chat's message box there, and where your context stands (on for the first message, sent with it, or in the message box). Each tab has its own check, so a problem on one site never shows on another. Last capture is about the chat on the screen as well (on any other page, it is the last capture into the vault in use). A warning about the server appears only while the server really cannot be reached or refuses your key or sign-in; your cached context keeps working meanwhile. - When captured chats change your vault, the bell says where they came from and how many facts and files changed ("Captured from Gemini"). It is one notice per vault that grows until you read it, and chats that changed nothing cause none. Turn it off, or get it as a push notification, in Settings → Notifications.
Install it (early access)
The extension's Chrome Web Store listing is in review. Until it is live, install the packaged build in developer mode. It works in Chrome, Edge and Brave:
- In your vault, open Agents and click Download for Chrome, Edge & Brave, then unzip the file. The card shows the version and the SHA-256 checksum of the package.
- Open
chrome://extensions(oredge://extensions,brave://extensions) and turn on Developer mode. - Click Load unpacked and select the unzipped folder.
- Click the extension's icon and choose Sign in with Tovriq. A tab opens on your Tovriq account (sign in there first if you need to): check the account and the browser it names, then click Connect. The tab closes by itself and the popup lists your vaults. On a self-hosted server, enter its address in the extension's options first and choose Sign in with Tovriq there.
Developer-mode extensions do not update automatically: download the new package from the Agents tab when a new version is announced. Once the store listing is live, the Agents tab links to it instead.
Your account and your vaults
Signed in, the extension works with every vault you can open, with your current role on each, and one click in the popup chooses the vault new chats use.
- Switch in one click. The popup lists your vaults under Vault for new chats: your personal vaults first, then each team's. New chats get the chosen vault's context. Open chats stay with the vault they started with: they are captured only while that vault is the one in use, and chats already waiting to be sent still go to their own vault.
- Many vaults stay one click away. With more than five vaults (or vaults spread over several teams), the popup shows the vault in use as one button. Open it to search your vaults and teams by name (Arabic names match however they are spelled, with or without hamza or vowel marks), pick one of the three you chose last under Recent, or browse each team. The arrow keys move through the list without switching; Enter or a click chooses.
- The extension's icon tells you when it needs you. Until you choose a vault for new chats, and when the server has ended your sign-in, the icon shows an amber ! and its tooltip says why. New chats get no context meanwhile.
- Your role counts on every request. As an owner or admin you capture chats; as a member a vault's maps reach your new chats and chats are not saved to it (Read only). A team owner acts as an admin in the extension, so owner-only folders never reach a chat site. When you leave a team or lose your role, or a vault is deleted, the extension stops using that vault and asks you to choose another one; it never switches to another vault by itself. A locked vault, or one your plan does not include, cannot be chosen until you unlock it or change your plan.
- A vault that is read-only on your plan (beyond your plan's vault limit after a downgrade) still adds its maps to new chats. Chats are not saved to it, and the popup says why, with See plans. Upgrade, or delete a vault you no longer need, and captures start again within a few minutes (Refresh in the popup checks at once).
- Your browsers are listed under Settings → Security → Browser extension, each with its extension version and when it was last used. Disconnect signs that browser out at its next request, and Disconnect all browsers signs out every one. Signing out all other sessions, a password reset, and a password change that signs out your other devices disconnect them too; signing out of the app in one browser does not. A sign-in lasts up to 90 days (30 days without use), and you get a notice when a browser connects.
- An access key still works. For a server that does not offer the sign-in yet, or to connect one vault only, open the extension's options and choose Connect with a vault access key instead: paste the Server URL shown on the extension card and the key from Create a key for the extension (under Or connect this vault with an access key), or one an owner or admin gave you. Saving a key signs the account out: the extension uses one or the other.
Toujours bloqué ? Contactez le support et nous vous aiderons.