Every environment has one URL to paste into Claude Code, Cursor or Codex. The token inside it is a bearer credential: whoever holds it can call every tool in the environment, as the environment. Three controls put you back in charge — how the token is presented, which addresses may use it, and how long it lives.
An environment URL looks like https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af/k_7f3a9c2e. The last segment is a secret token. Anyone who has the full URL can reach every tool you added to the environment, with the secrets you stored — no password, no second factor. Treat it like an API key: it is a bearer credential, meaning possession alone is enough.
We store the token hashed, so the dashboard can show the full URL only once, at creation or rotation. Rotating the URL issues a new token and stops the old one immediately, on every laptop and agent that held it. That is your break-glass if a URL leaks into a shell history, a proxy log or a screenshot.
The access policy of an environment decides which of these an agent may use. Set it under Settings → Access; it takes effect the moment you save.
401: the token must arrive in the Authorization header, or the client signs in with OAuth. A URL in a log is then worthless on its own.Switching to a stricter policy stops the URLs and header tokens that no longer qualify. Reconnect each agent from the Connect an agent block on the environment overview.
Paste the bare endpoint (no token) and send the token in the Authorization header. Keep the token in your client's secret store, not in the URL.
claude mcp add --transport http acme-api \ https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af \ --header "Authorization: Bearer k_7f3a9c2e"
// .cursor/mcp.json — same shape for VS Code (.vscode/mcp.json) and Windsurf
{
"mcpServers": {
"acme-api": {
"url": "https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af",
"headers": { "Authorization": "Bearer k_7f3a9c2e" }
}
}
}# ~/.codex/config.toml
[mcp_servers.acme-api]
url = "https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af"
http_headers = { Authorization = "Bearer k_7f3a9c2e" }Paste the bare endpoint and let the client discover the gateway's authorization server. It opens your browser, you pick the environment on the consent screen, and the client receives its own access token: 24 hours, refreshed automatically for 90 days, revocable per client. Nothing secret is written to disk.
claude mcp add --transport http acme-api \ https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af # then, inside Claude Code: /mcp → acme-api → Authenticate (opens the browser)
// .cursor/mcp.json — same shape for VS Code (.vscode/mcp.json) and Windsurf
{
"mcpServers": {
"acme-api": { "url": "https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af" }
}
}
// the client opens the browser to sign in on first use# ~/.codex/config.toml [mcp_servers.acme-api] url = "https://mcp.exorails.net/e/7c1f0a2e-9d84-4b6c-a0f1-2b5c8e4d31af" # then: codex mcp login acme-api (opens the browser)
On top of the token, you can restrict which client addresses may use the URL. List one IP or CIDR per line, IPv4 or IPv6, under Settings → Access → Allowed addresses. Leave it empty and any address is allowed; add a range and every other address is refused with 403, whatever the token or OAuth session.
The 403 names the caller's address, so a runner that suddenly cannot connect tells you exactly what to add. If you lock yourself out, nothing is lost: the allow-list applies only to agent calls through the gateway URL. The dashboard on app.exorails.net is authenticated separately and is never filtered, so you can always open the environment and correct or clear the list. It takes effect on the next call.
Give the URL an expiry so a forgotten one does not live forever. The default is 90 days; you can choose 30, 90, 180 or 365 days, or Never. The clock runs from when the URL was created, and applies to every member's URL in the environment.
401.For people, use the header or sign-in form so nothing secret ever sits in a URL, and set a policy of header or OAuth so a pasted URL cannot be replayed. For CI and headless agents, prefer a short-lived URL scoped to your runner's egress with the allow-list, kept in your secret store like any credential, and rotate it on any exposure. Either way, an expiry and an allow-list turn a single leaked string into a narrow, self-healing window rather than a standing key.