Human-in-the-Loop Task Manager for AI Agents
Checked December 4, 2026 | All Security guides

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.

Step 1: the AgentRQ workspace page, with an arrow pointing at the Settings gear icon at the top right, next to New Task

2. Choose the Danger Zone tab, the red tab at the bottom of the settings menu.

Step 2: workspace Settings, with an arrow pointing at the Danger Zone tab at the bottom of the left 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.

Step 3: the Danger Zone tab, with an arrow pointing at the Reset ID button on the Reset Workspace ID card

4. Click Reset ID again in the dialog to confirm.

Step 4: the Reset Workspace ID confirmation dialog, with an arrow pointing at the red Reset ID button

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.json is 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.

Option 2, step 3: the Danger Zone tab, with an arrow pointing at the red Purge Permanent button

4. Click Delete in the dialog, only if you are sure you want the workspace gone.

Option 2, step 4: the Purge Workspace confirmation dialog, with an arrow pointing at the red Delete button

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:

  1. Remove the old file everywhere. Delete the old .mcp.json from 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 stop agentrqd writing the new one.
  2. 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.json is in .gitignore so it is not committed again.
  3. 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.
  4. Check the other workspaces from the same file. One .mcp.json can 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.json out of version control. When the working directory is in a git repository, agentrqd adds .mcp.json to the .gitignore in that folder before it writes the file, unless a .gitignore there or above it already excludes it, and it writes the file readable by your user only. A .gitignore does 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.

Start Free