Setting up the MCP proxy
The MCP proxy puts StackJack between your people's AI tools and a remote MCP server you approved. A tool calls the server's proxy address with a StackJack key instead of calling the server directly.…
Written By Christopher Scaminaci
Last updated 13 days ago
The MCP proxy puts StackJack between your people's AI tools and a remote MCP server you approved. A tool calls the server's proxy address with a StackJack key instead of calling the server directly. StackJack checks each tool call against your tool list and your data-loss rules, holds the server's credential (or each person's own sign-in), and passes the call on. Your people never see the server's credential.
At a glance
- What it does: checks each tool call to a remote MCP server you approved, and holds the server's credential.
- Plan: Business and above.
- Who: an Administrator.
- Where you set it up: AI Governance → AI traffic → MCP proxy.
- Where you see the data: Activity → Activity explorer and Activity → Findings.
The proxy needs the Business plan or higher. It uses the same personal keys and the same AI edge as the AI gateway, so read that page first. The AI edge is the set of StackJack servers that run the gateway and the proxy.
Add a server
- Approve the server first. On AI Governance → AI inventory → Inventory, the MCP server must be approved and must have a remote address. The address must be an
httpsname on the public internet. An IP address,localhost, a name that ends in.local,.internal,.localhostor.localdomain, and StackJack's own control addresses are refused. - Open AI Governance → AI traffic → MCP proxy. You need the governance administrator role. If the proxy is switched off for your organization, the page says so; switch it on under Lanes on the AI gateway page. Servers you add start serving as soon as it is on.
- Open Add a server and choose the approved server. A server that already has a proxy, or whose address is not allowed, is not on the list. An organization can have up to 100 proxied servers.
- Choose How StackJack signs in to it (the next section) and the tools it may use (the section after).
- Select Add the server. The AI edge picks it up within a minute or two.
The list then shows the server with its proxy address (https://ai.stackjack.io/mcp/ and a random id in the United States region, https://ai-eu.stackjack.io/mcp/ and an id in the Europe region), its status, how it signs in and its tool setting. The proxy id is random, so it cannot be guessed from the inventory.
How StackJack signs in to the server
Choose one of three.
- No sign-in. The server needs no credential. StackJack forwards the call as it is.
- One stored header. The server wants one fixed header, for example an API key. Give the header name and the header value. The value goes to StackJack's vault when you save and is not shown again: the list shows only the header name and whether a value is stored. The name is 1 to 100 letters, digits or hyphens, and not a header StackJack or the connection sets itself (such as
Host,Content-Type,Acceptor any name that starts withMcp-). The value is 1 to 4,096 printable characters on one line. To rotate it, select Change on the server and give a new value; leave the box empty to keep the stored one. - Each person signs in. The server signs each person in with OAuth, so each person uses their own account on it. StackJack is the OAuth client: it needs the server to offer the standard sign-in with PKCE. When you add the server StackJack looks up its sign-in service, and if it cannot find one it saves nothing: "StackJack could not find the sign-in service of that server. Nothing was saved." Each person then connects their own account once (the next section). StackJack keeps a token for the server on their behalf in its vault, refreshes it in the background, and uses it only for that person's calls.
At the server's sign-in, StackJack presents itself as a public client. It uses its own published client document where the server accepts one, and registers itself where the server allows that. A server that offers neither, or that insists on a client secret, cannot be connected: "This server does not let StackJack sign you in, so it cannot be connected." StackJack never sends the server a person's StackJack key, and it never passes a token from a person's tool on to the server. The token the server receives was issued by the server for StackJack.
The tool list
Under Tools choose what the server's tools may do:
- Every tool.
- Only the tools I list. An allow list needs at least one name.
- Every tool except the ones I list.
Give the names one per line. A name is exact, and capital letters count: Read_File and read_file are two tools. A name is 1 to 128 letters, digits and _ . : / -, and a list holds up to 500 names. Change the setting at any time with Change.
The list runs on every call, whatever the capture level, and before anything is sent to the server. The server is never called for a tool the list does not allow, and the caller sees: "The tool 'name' is not allowed on this MCP server." The tool list the server announces is filtered too, so a tool that is not allowed is not even offered to the AI.
Connect your own account
This is for a server where each person signs in. A person needs a personal key (see Your personal AI key) and a key that may use the server.
- The person opens My AI activity, then My activity. The card Your MCP server connections shows each server that asks for a sign-in, with its state: Not connected, Connected or Needs to reconnect. The card appears only when the person has a key, the proxy is on for the organization and at least one server asks for a sign-in.
- They select Connect (or Reconnect).
- They sign in to StackJack first. The next page is StackJack's own and needs their StackJack sign-in. A person who reached their page through the single-person link in their email is asked to sign in at this step, so that StackJack knows the connection is theirs.
- StackJack's consent page says which server and host it is about, which permissions it will ask for, that StackJack keeps a token for the server on their behalf, the exact address the server will send them back to, and whose key the account is for: "The account you sign in with will be connected to your personal key, and used only for your calls." For an agent, it names the agent key instead.
- They select Continue and sign in on the server's own page, then they come back to StackJack: "You are connected. Go back to your tool and try again."
The link is for one person and one try:
- The consent page and its button work only for the person who started the step. Anyone else who gets the link sees "This link cannot be used," and the link stays good for the person it was made for.
- The return from the server must come in the same browser that selected Continue. If it does not, nothing is connected: "This sign-in was not started in this browser by the person it is for, so nothing was connected. Start again from your own AI Governance page."
- A step lasts ten minutes and works once. After that: "This sign-in took too long or was already used. Start again from your AI Governance page."
- If the person or the server says no: "The connection was not made. You or the server said no."
The person can select Disconnect on their page when they are signed in. That revokes the connection and deletes the stored token. A person who opened the page with the email link can connect but not disconnect.
Keeping it connected. StackJack refreshes each token about 20 minutes before it expires. If the server refuses the refresh (the person's access was withdrawn, or the server has no refresh token and the token ran out), the connection changes to Needs to reconnect and the person selects Reconnect. If a refresh fails three times in a row because the server is down, your administrators get one alert a day for it. On the server's row, the administrator sees how many people are connected and how many need to reconnect.
An agent. An agent has a key but cannot sign in. On the server's row, open Connect an agent key, choose the agent and select Make the consent link. Open the link yourself and sign in to the server as the agent's account. Only you can open it, it works once and it lasts ten minutes. The consent page names the agent key, so you can see whose key the account is for.
Point a tool at the proxy
Each server's row shows its proxy address and a Client snippet. Give the tool the address and send the StackJack personal key as a Bearer token in the Authorization header. That is the only way the proxy takes a key. A snippet for a client that keeps its servers in a JSON file looks like this; check your client's own documentation for the exact names, because the snippet is not verified for every client:
{
"mcpServers": {
"your-server": {
"type": "http",
"url": "https://ai.stackjack.io/mcp/<the proxy id>",
"headers": { "Authorization": "Bearer <your StackJack key>" }
}
}
}
Clients that let you set a header work: Claude Code, Cursor, VS Code and Codex.
Clients that sign in on their own are not supported yet. claude.ai on the web, Claude Desktop remote connectors and ChatGPT connectors use their own OAuth sign-in and cannot send a StackJack key.
The proxy serves both the older MCP transport and the one from 2026-07-28. A request that sends several messages at once (a batch) is refused.
What the proxy checks
For a tool call, in this order:
- The key and the server. The key must be known, not revoked or expired, and allowed to use this server. The server must be one of your organization's, active and approved.
- The tool list, as above.
- The arguments. When the source called StackJack MCP proxy (made the first time the proxy is switched on, at Scan only) is at a capture level that lets StackJack read text (Scan only, Masked text or Full text), your data-loss rules read the arguments before the call is sent. At Facts only StackJack does not read the text, but the key, the server, the tool list and the stale rule still apply. A rule that blocks stops the call; a rule that masks replaces the matching text values in place and the call goes on; a rule that warns asks the person for a reason first.
- The result. The server's answer is read before the tool sees it, with the same rules. A result larger than StackJack inspects (4 MiB by default) is not delivered: "The result is larger than StackJack can inspect (4 MiB), so it was not delivered." A request larger than that limit is refused with HTTP 413.
StackJack inspects tool calls and their results. When a client reads a resource from the server or asks it for a prompt template, that answer goes to the client without a check, so keep data that must be checked behind a tool.
StackJack cannot tell whether a third-party tool only reads or also changes something. A warn on a result therefore becomes a block, and the message says the action may already have happened.
If StackJack's scan cannot finish in time, the call goes through and the record says it was not inspected. If StackJack has to pause the proxy lane itself, calls go to the server without the tool list or any check, so work does not stop because of a StackJack switch.
What your people see
A refused tools/call comes back as the tool's own result, marked as an error, so the AI can read it and tell the person. Any other refused request is an HTTP error with a short message. A policy refusal is never an HTTP 429 or 5xx, because tools retry those. Only a server that cannot be reached is a 502, which a tool may retry.
A redirect is refused, never followed. StackJack does not follow a redirect from your server and does not show where it pointed, because a redirect could send a call (and its credential) somewhere you did not approve. If your server has moved, change the address in the inventory.
Suspend, change and remove a server
- Suspend stops forwarding: callers see "not approved" until you select Resume.
- Change edits the tool list and, for a stored header, the value.
- Remove deletes the server's proxy: every person's connection to it is revoked and every stored credential and token is deleted from the vault. Staff tools that call the address stop working within a minute or two. Removing a server does not remove the approved inventory item.
- If the inventory item stops being approved, or its address stops being an allowed public address, the server's row says why and the proxy refuses calls to it.
What is recorded
- Every tool call is recorded as a fact, with the server, the tool, the outcome and the person or agent. StackJack counts a proxied server as the approved server it is, so it is not reported as an unknown tool. The text of arguments and results is kept only at a capture level that stores text.
- A server whose calls keep failing (at least five failures in 15 minutes and at least half of its calls) raises an alert for your administrators, at most once an hour.
- The audit trail records who added, changed, suspended, resumed or removed a server, and who connected or disconnected an account. It never records a credential, a token or an address.
Related: Setting up the AI gateway, Your personal AI key, Data-loss rules, findings and scanning.
Was this helpful?
More in Connect your AI
Data sourcesSend telemetry from coding toolsSettings for staff machinesDelivering the settings through your RMMStill need help? Ask the team