Any MCP client

Put any stdio MCP server behind a person's approval in Claude Desktop, Cursor, VS Code or Claude Code: variantgate mcp-proxy lets look-only tools run and holds every other tool call until someone approves it.

Claude Code, Cursor and a few other agents can run a hook before a tool call. Claude Desktop, VS Code and most MCP clients cannot: they ask in their own window, or not at all. variantgate mcp-proxy works in all of them, because it sits in the server’s place. The client starts the proxy, the proxy starts the real server, and messages pass through as they are, except a tool call. Listing tools, reading resources and getting prompts are not asked about. A tool you named as look-only runs at once. Any other call becomes a request in your inbox, and reaches the server only after a person, or a rule an owner wrote, approves it.

The quick way: one command

For Claude Desktop, this signs you in, saves a key and puts every server already in claude_desktop_config.json behind the proxy, with the reading tools of the servers we have sorted filled in for you:

npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz setup claude-desktop

Use setup vscode for VS Code’s user mcp.json, or setup mcp --file PATH for any other file that lists servers under mcpServers or servers. --undo puts them back. The Claude Desktop guide shows the file before and after. The steps below do the same by hand.

1. Save a key

A desktop app does not read your shell profile, so save a key on the computer instead of exporting one:

npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz login

It opens the browser, you check a code and press Connect, and the key is saved in ~/.config/variantgate/credentials.json, readable only by you. A VARIANTGATE_KEY in the server’s env settings works too, and wins over the saved key; the proxy does not hand it on to the server it starts. The proxy reads the key when the client starts it, so restart the client after you log in.

2. Put the proxy in front of the server

Take the command the server’s README gives you and put the proxy before it, after --. For the reference filesystem server, in claude_desktop_config.json (Claude Desktop), ~/.cursor/mcp.json (Cursor) or another client that reads mcpServers:

{
  "mcpServers": {
    "files": {
      "args": [
        "-y",
        "https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
        "mcp-proxy",
        "--name",
        "files",
        "--look-only",
        "read_file,read_text_file,read_media_file,read_multiple_files,list_directory,list_directory_with_sizes,directory_tree,search_files,get_file_info,list_allowed_directories",
        "--",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/you/projects/app"
      ],
      "command": "npx"
    }
  }
}

VS Code keeps MCP servers under servers, in .vscode/mcp.json:

{
  "servers": {
    "files": {
      "type": "stdio",
      "args": [
        "-y",
        "https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz",
        "mcp-proxy",
        "--name",
        "files",
        "--look-only",
        "read_file,read_text_file,read_media_file,read_multiple_files,list_directory,list_directory_with_sizes,directory_tree,search_files,get_file_info,list_allowed_directories",
        "--",
        "npx",
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/Users/you/projects/app"
      ],
      "command": "npx"
    }
  }
}

In Claude Code, add the server with the proxy in front, and allow mcp__files in its permissions so it does not ask again in the terminal:

claude mcp add files -- npx -y https://variantgate.com/sdk/variantgate-agent-0.15.0.tgz mcp-proxy --name files --look-only read_file,read_text_file,read_media_file,read_multiple_files,list_directory,list_directory_with_sizes,directory_tree,search_files,get_file_info,list_allowed_directories -- npx -y @modelcontextprotocol/server-filesystem /Users/you/projects/app

Restart the client. It lists the same tools as before; the proxy only changes what happens when one is called. A desktop app runs no shell, so fill in any placeholder in angle brackets, such as a token, yourself.

Which tools run without asking

Only the ones you name with --look-only, by their exact name. Every other tool asks, including one a later version of the server adds. The proxy does not trust a server’s own readOnlyHint: in our tests, Playwright’s browser_snapshot, marked read-only, overwrote a file, and the Kubernetes server’s configuration_view, also marked read-only, returned the kubeconfig with its token in plain text. The filesystem example lets these 10 through: read_file, read_text_file, read_media_file, read_multiple_files, list_directory, list_directory_with_sizes, directory_tree, search_files, get_file_info, list_allowed_directories.

Our MCP server pages sort the tools of GitHub, Supabase, Stripe, Playwright and 20 more servers by what they can do, and each one ends with these settings filled in for that server.

What the model sees

An approved call reaches the server as it was asked, and the server’s answer goes back to the model. Anything else is answered by the proxy with a tool error the model reads; the server never sees the call:

Approved
The server's own result, such as: Successfully wrote to …/b.txt
Denied
Not approved: denied (keep a.txt). Nothing was done. Do not try another way to do this.
No answer yet
Waiting for a person to approve this call (request 01a207db-…). Nothing was done yet. Call this tool again with exactly the same arguments in a minute or two: it runs once approved, and is refused if denied.
Approved with changes
Approved only with changes by …: "the approved wording". Nothing was done. Do only the approved version, which will be asked about again.
No key, or the service is down
Not run: could not ask for approval (…).

One approval runs one call. When the server answers, the proxy records on the request whether it succeeded or failed, so the inbox shows what happened, not only what was allowed.

When nobody answers in time

Most MCP clients give a tool call about a minute; the official TypeScript SDK gives up after 60 seconds by default. So each call waits 45 seconds (--wait), then tells the model to call again. The request stays open for 15 minutes (--timeout). When the same tool is called again with exactly the same arguments, the proxy waits on that request instead of asking twice, and runs the call once it is approved. A call with other arguments is a new request. If your client waits longer, raise --wait to match.

Rules

Each call is asked as mcp.NAME.TOOL, with the tool’s arguments as the request’s details, so rules can answer the routine ones: allow mcp.files.create_directory, deny mcp.files.move_file, or ask about mcp.files.*. The same action names come from our hooks for Claude Code, Cursor and the rest, so one rule covers a server whichever client calls it. A rule matches on the agent key, never on the name the client gives itself.

When something goes wrong

  • No key, or the service cannot be reached: every call but the look-only ones is refused, and the model is told why. A missing key is also written to stderr when the proxy starts, which clients show as the server’s log.
  • The client closes, or the proxy is stopped: requests still open are withdrawn, so nobody approves a call that will never run. An approval nobody collects within the request’s lifetime is not used later.
  • The server stops: the proxy stops too, with the server’s exit code, so the client sees it. The server’s stderr goes straight to the client.
  • A line that is not valid JSON, a batch of messages, or a message nested more than 64 levels deep is refused, never passed on. The server gets each message as the proxy read it, written out again, so a message cannot mean one thing to the proxy and another to the server.
  • The inbox shows a call’s first 20 arguments, so a call with more is refused rather than approved unseen.

Options

--name NAME
The server's name in actions: mcp.NAME.TOOL. Letters, digits, - and _. Required.
--look-only TOOLS
Tools that run without asking, by exact name, separated by commas. Repeat it as often as you like.
--wait SECONDS
How long one call waits for an answer before the model is told to call again. 45 by default, at most 3600.
--timeout SECONDS
How long a request stays open for a person. 15 minutes by default, at most a day.
--agent NAME
The agent name requests show. By default the name the MCP client gives itself when it connects.

Limits

The proxy works with servers that run on your computer over stdio, which is how most open-source servers run. A remote server, reached over HTTP, is not started by the client, so there is nothing to stand in front of: use a client with a hook, such as Claude Code or Cursor, for those. We tested the proxy with the official MCP TypeScript SDK client and the reference filesystem server on macOS; on Windows, npx may need to be started through cmd /c, which we have not tested. Check one call in your own client before you rely on it.

Check that it works

Ask the agent to create a file. A request appears in the inbox; deny it and check that the file is not there. Then ask again and approve it.