What to Do When Your .mcp.json Is Compromised
If a .mcp.json file with your AgentRQ workspace in it was committed to a public repository, pasted into a chat, shared in a screenshot or copied off a machine you no longer trust, treat the workspace token inside it as leaked. Go to the workspace's Settings, open Danger Zone, and click Reset ID. The screenshots below show every click. That gives the workspace a new ID and revokes every token issued for the old one, while keeping all your tasks and history. If you would rather throw the workspace away entirely, Purge Workspace revokes the token too, but deletes everything in it.
This page is one of our security guidelines. It was checked against the AgentRQ source on November 14, 2026, and updated on December 4, 2026, now that a machine writes the .mcp.json for you.
Why a Leaked .mcp.json Matters
When a machine starts a workspace's agent, agentrqd writes a .mcp.json into the workspace's working directory on that machine. It holds the workspace's MCP URL, and that URL ends in ?token=.... A .mcp.json copied by hand from an older version of AgentRQ holds the same thing. The token is how the workspace MCP server knows a caller is your agent. Whoever has it can do what your agent can do in that workspace: read and reply to tasks, create new ones, read and change the workspace's memory and skills, write Pano docs, and ask to run the site tools you shared with it.
The token is bound to the workspace ID and nothing else. It does not expire on its own, and there is no separate token to rotate. Changing the ID is what revokes it.
Step by Step: Open the Danger Zone
Open the workspace in AgentRQ. Each screenshot below marks the one button to click next, numbered in order.
1. Click the Settings gear at the top right of the workspace, next to New Task.
2. Choose the Danger Zone tab, the red tab at the bottom of the settings menu.
The Danger Zone shows two ways out. Pick one.
Option 1 (Recommended): Reset the Workspace ID
3. Click Reset ID on the Reset Workspace ID card.
4. Click Reset ID again in the dialog to confirm.
What happens:
- → The workspace gets a new ID, and every token issued for the old ID stops working at once. Any agent, script or person using the leaked
.mcp.jsonis cut off. - → Everything in the workspace is kept: tasks with their whole threads, attachments, memory, skills and settings all move to the new ID in a single step. If anything fails along the way, nothing changes and the old ID stays as it was.
- → The workspace's MCP URL changes, so your own agents are cut off too, until you start them again.
- → Links to the workspace and its tasks change, because they contain the ID. Old bookmarks and shared links stop working.
5. Start the agent again. After the reset, AgentRQ takes you to the workspace under its new ID. First, on each machine where an agent ran for this workspace, stop it if it still runs and delete the .mcp.json in the workspace's working directory, or just its agentrq-workspace entry: agentrqd keeps an entry it finds there rather than write over it, so the old address would stay. Then start the agent from the workspace page, and agentrqd writes a new .mcp.json with the new ID and token.
Option 2: Purge the Workspace
After steps 1 and 2 above:
3. Click Purge Permanent on the Purge Workspace card.
4. Click Delete in the dialog, only if you are sure you want the workspace gone.
What happens:
- → The workspace is deleted, so its ID and every token issued for it stop working, exactly like a reset.
- → Everything in it is deleted too: tasks, messages, attachments, memory, skills and configuration. This cannot be undone.
- → A workspace with forks cannot be purged until each fork is merged back into it.
Choose this only if you no longer need anything in the workspace, or you want to start over from a clean one. Otherwise, reset the ID.
Reset ID vs Purge at a Glance
| Reset Workspace ID | Purge Workspace | |
|---|---|---|
| Revokes the leaked token | Yes, immediately | Yes, immediately |
| Keeps tasks, memory and skills | Yes | No, all deleted |
| MCP URL | Changes, start agents again | Gone |
| Task and workspace links | Change | Gone |
| Can be undone | The old ID cannot come back | No |
| When to use it | Almost always | You want the workspace gone |
After the Reset: Clean Up the Leak
Revoking the token stops further access. These steps close the rest of the gap:
- Remove the old file everywhere. Delete the old
.mcp.jsonfrom every machine and directory that had it, including any copy outside the workspace's working directory. The old one no longer works, but there is no reason to keep it around, and in a working directory it would stopagentrqdwriting the new one. - Scrub it from git. If the file was committed, deleting it in a new commit leaves it in the history. Treat the history as public for good, which is why revoking comes first, and check that
.mcp.jsonis in.gitignoreso it is not committed again. - Look at what changed. Skim the workspace's recent tasks and replies, its memory and its skills for anything you or your agents did not write. A skill or memory entry is read by every agent that works in the workspace, so an injected instruction there matters more than a stray task.
- Check the other workspaces from the same file. One
.mcp.jsoncan list several MCP servers. Reset each AgentRQ workspace that appears in the leaked file, not just the first one.
How to Keep .mcp.json From Leaking Again
- → Keep
.mcp.jsonout of version control. When the working directory is in a git repository,agentrqdadds.mcp.jsonto the.gitignorein that folder before it writes the file, unless a.gitignorethere or above it already excludes it, and it writes the file readable by your user only. A.gitignoredoes nothing for a file git already tracks, so if your repository commits a.mcp.json, remove it from the repository. Do not take the line out of.gitignore. - → Do not paste the file, or the MCP URL, into chats, issues or screenshots. The token is the part after
?token=. - → Do not copy the file between folders or machines. A machine writes one for each workspace it starts, so there is never a reason to move it around.
- → Give each project its own workspace, so one leaked file exposes one workspace's tasks and not all of them.
FAQ
Does archiving the workspace revoke the token?
No. Archiving makes the workspace read-only and pauses connections, but keeps the same ID, so unarchiving it brings the leaked token back to life. Reset the ID or purge the workspace instead.
Do I lose my tasks when I reset the workspace ID?
No. Tasks, their threads, attachments, memory, skills and settings all move to the new ID. Only the ID, the MCP URL and the links change.
Can I go back to the old workspace ID?
No. The old ID is retired, which is the point: a token issued for it can never work again.
My agents stopped working after the reset. What now?
That is expected. On the machine, delete the old .mcp.json in the workspace's working directory (or its agentrq-workspace entry), then start the agent again from the workspace page. agentrqd writes a new .mcp.json with the new ID.