AI Assistants (MCP)
Ask your AI assistant what is wrong with your install, why, and what it costs. Editors can also have it make a few safe changes. It acts with your role and never sees a password or other secret.
Octoprox serves the Model Context Protocol (MCP) at /mcp, so Claude, ChatGPT, Cursor, VS Code, Codex CLI, Gemini CLI and other assistants that speak MCP can read your install the way the web UI does. They read the same numbers you see: Needs attention lines, failures, traffic and cost per connector, what a site does to each connector, and where an exit IP really is. Octoprox draws no conclusions of its own; the assistant reads the lines and the numbers and explains them.
What you can ask
- “What needs attention in Octoprox right now?”
- “Why did the success rate of scraper-eu drop this morning?”
- “What did the vendor say on the last failures through the Oxylabs connector?”
- “What does each connector of scraper-eu cost this week, and which one works best for www.google.com?”
- “Where is 203.0.113.7 really, and which connectors handed it out?”
- “Which proxy username gets me a sticky session in New York?”
Editors and admins can also ask for a change:
- “Mute the traffic limit line of scraper-eu for a week.”
- “Put the quarantined proxies of the DC pool connector back.”
- “Pause the Azure connector” or “Set Oxylabs to weight 3.”
Turning it on or off
AI assistants are on by default, on the api role (and on a single instance). Nothing can use them until someone makes a token for an assistant or connects an app: /mcp accepts no other token.
| Setting | What it does | Default |
|---|---|---|
OCTOPROX_MCP_ENABLED |
Serve AI assistants at /mcp. false answers 404 MCP is turned off on this install there, turns app sign-in off too, and the token dialog stops offering tokens for assistants. Existing ones stay listed, so they can be revoked |
true |
OCTOPROX_MCP_OAUTH_ENABLED |
Let apps such as claude.ai and ChatGPT sign in. false refuses connected apps until it is turned back on; tokens keep working |
true |
OCTOPROX_MCP_REQUESTS_PER_MINUTE |
Requests each access token may make to /mcp a minute, counted across every api |
60 |
Assistants connect to your public URL with /mcp added, such as https://proxy.example.com/mcp. Set OCTOPROX_PUBLIC_URL to the address people reach the web UI at; without it, the address is the one the web UI is opened at. Account, API tokens shows the address with a copy button. Set all of these on the api. See Configuration.
Tokens for assistants
An assistant you set up yourself, such as Claude Code or Cursor, uses a token made for AI assistants:
- Open Account, API tokens, and choose New token.
- Under For, choose AI assistant (MCP). Give it a name that says what will use it, such as
Claude Code on my laptop, and an expiry: 90 days by default, or 30 days, a year or never. - The secret is shown once, with Set up your assistant below it: the setup for each client with your address and the token filled in. Copy it then.
A token for AI assistants works at /mcp and nowhere else. The REST API refuses it with 403 This token is for AI assistants and works only at /mcp, and /mcp refuses every other token, a Scripts (API) token or a sign-in, with 401 Use a token made for AI assistants (MCP only). What a token is for is fixed when it is made. The token list marks these tokens MCP.
Like any personal access token, it acts as you, with your role as it is now: a new role or a disabled account applies to the next call, and revoking the token ends it at once. Making a token needs a signed-in session, so a token can never make another one.
A read-only assistant
To let an assistant look at the install without being able to change it, give it its own viewer service account:
- Under Administration, Users, Service accounts, add one with a name such as
assistant-readonlyand the Viewer role. - In its inspector, choose New token, For AI assistant (MCP), and an expiry.
- Paste the setup into the assistant.
A viewer sees the seven reading tools and Report exits, and changes no setting. Exit reports steer routing only where a project’s exit reputation is set to avoid. Turning the account off refuses its token until it is turned back on, and its History shows who added it and changed it. A service account cannot connect an app by signing in; only a person can.
Set up your assistant
The token dialog shows each of these with your address and token filled in. Here, replace https://proxy.example.com/mcp with your address and octo_... with the token.
Claude Code
Run this in a terminal. --scope user adds it for every project.
claude mcp add --transport http octoprox "https://proxy.example.com/mcp" --header "Authorization: Bearer octo_..." --scope user
Cursor
Add this to ~/.cursor/mcp.json, or to .cursor/mcp.json in one project.
{
"mcpServers": {
"octoprox": {
"url": "https://proxy.example.com/mcp",
"headers": {
"Authorization": "Bearer octo_..."
}
}
}
}
VS Code
Run MCP: Open User Configuration and add this. VS Code asks for the token once and keeps it, so the setup holds no token.
{
"inputs": [
{
"type": "promptString",
"id": "octoprox-token",
"description": "Octoprox token for AI assistants",
"password": true
}
],
"servers": {
"octoprox": {
"type": "http",
"url": "https://proxy.example.com/mcp",
"headers": {
"Authorization": "Bearer ${input:octoprox-token}"
}
}
}
}
Codex CLI
Add this to ~/.codex/config.toml.
[mcp_servers.octoprox]
url = "https://proxy.example.com/mcp"
http_headers = { "Authorization" = "Bearer octo_..." }
Gemini CLI
Add this to ~/.gemini/settings.json.
{
"mcpServers": {
"octoprox": {
"httpUrl": "https://proxy.example.com/mcp",
"headers": {
"Authorization": "Bearer octo_..."
}
}
}
}
Claude Desktop
In Settings, Developer, Edit Config, add this and restart Claude. It needs Node.js, since Claude Desktop reaches the install through mcp-remote, pinned to version 0.17.2.
{
"mcpServers": {
"octoprox": {
"command": "npx",
"args": [
"-y",
"mcp-remote@0.17.2",
"https://proxy.example.com/mcp",
"--header",
"Authorization:${OCTOPROX_AUTH}"
],
"env": {
"OCTOPROX_AUTH": "Bearer octo_..."
}
}
}
}
For an http:// address the dialog adds "--allow-http" after "Authorization:${OCTOPROX_AUTH}", since mcp-remote refuses plain http anywhere but on localhost without it. When claude.ai can reach your install, Claude Desktop can instead use the connector you add on claude.ai, with no config file and no Node.js.
Connect an app with just the address
claude.ai, ChatGPT and other apps that sign in to MCP servers themselves need only the address. You approve the app in your browser, and Octoprox gives it a token of its own that it renews itself.
What it needs:
OCTOPROX_PUBLIC_URLset to anhttps://address (orhttp://on localhost, to try it out).- The app must reach that address. claude.ai and ChatGPT connect from their own servers on the internet, not from your computer, so an install on a private network or behind a VPN cannot be reached unless the firewall lets their addresses in. See claude.ai custom connectors and ChatGPT custom MCP servers.
- For an app that names itself with a document on its own site, as claude.ai can, the api reads that document over HTTPS on port 443. An app that registers itself needs nothing more, and is shown as unverified.
Connecting:
- In the app, add a custom connector (or custom MCP server) with the address exactly as Account, API tokens shows it: your public URL with
/mcp, such ashttps://proxy.example.com/mcp. Not the web UI’s address, and notwww.octoprox.com/mcp, which is this page. - The app opens Octoprox’s consent page in your browser. Sign in there if you are not signed in, with your password or your provider.
- Check the app’s name and the site that vouches for it (an app that registered itself is marked Unverified), and the tools your role lets it call. Then choose Approve or Deny. Nothing is remembered: every connection asks.
The app then acts as you, with your role, exactly as a token would, and History marks its changes as made through an AI assistant. It appears in your token list under Account, API tokens with its name, the site that vouches for it and connected until a date. Disconnect ends the connection at once.
How long it lasts. The app renews its access an hour at a time, and stays connected while it is used. After 30 days without use it is disconnected, and you connect it again from the app. Approving the same app again replaces your earlier connection to it. It is also disconnected when it uses an old renewal a second time or a sign-in code is used twice, which point to a leak, and when your account is disabled. Changing OCTOPROX_PUBLIC_URL ends every connection too: an app’s current access works until its hour ends, and then it must connect again.
While OCTOPROX_MCP_OAUTH_ENABLED is false, connected apps are refused but kept, and tokens go on working. Backups leave app connections out, so after a restore people connect their apps again.
Tools
An assistant sees the tools your role allows: viewers 8, editors and admins all 12. A tool your role does not allow is not listed, and calling it answers Unknown tool.
| Tool | Title | What it answers or does | Lowest role |
|---|---|---|---|
octoprox_overview |
Install overview | Where to start: who you are, the version, and per project its problem lines, request rate and trend, plus install-wide lines. Admins also get a newer release and the processes and work streams | viewer |
octoprox_diagnose_project |
Diagnose a project | Why a project fails or is slow: its Needs attention lines, failures by kind, vendor status and connector, load and pool, each connector’s state, and the range beside the one before it | viewer |
octoprox_failures |
Failure examples | Failure examples, newest first, with the vendor’s status and words, narrowed by kind, connector, host or place | viewer |
octoprox_connectors |
Connectors and cost | A project’s connectors: state, weight, traffic against its limit, expected and observed share, successes, bytes and cost; for one connector also its location accuracy, IP reuse, history and quarantined proxies | viewer |
octoprox_site |
One site’s traffic | Why one site fails or costs much, and which connector suits it: its traffic per connector, how blocked each one is there and its latest failures | viewer |
octoprox_targets |
Where requests can go | The proxy endpoint (on the host of OCTOPROX_PUBLIC_URL while OCTOPROX_PROXY_PUBLIC_URL is unset), the countries, states and cities served, and the username for a place, session and tag, with where it would route. Never the password |
viewer |
octoprox_ip |
Exit IP lookup | Where each IP database places an exit IP against the vendor’s claim, which connectors handed it out, and what sites reported about it | viewer |
octoprox_report_exits |
Report exits | Sends exit reports: which requests a site blocked or let through | viewer |
octoprox_mute |
Mute a line | Mutes a Needs attention line for a day, a week, a month or until it clears | editor |
octoprox_unmute |
Unmute a line | Unmutes a Needs attention line | editor |
octoprox_unquarantine |
Lift quarantines | Puts proxies their connector’s rate limit quarantined back into routing | editor |
octoprox_set_connector |
Pause, resume or weigh a connector | Pauses or resumes a connector, or sets its routing weight | editor |
Octoprox tells clients that Report exits and the last four change something, and most clients ask before running one. Pause, resume or weigh a connector is also marked as one that may be hard to undo, since pausing a cloud connector terminates its instances.
Safety
- Your role, no more. Every tool runs the same checks as the web UI and the API. A role change applies to the next call; the list of tools an assistant shows may take up to 5 minutes to follow it.
- No secrets. Answers never carry a project’s password, vendor credentials, a connector’s provider settings, an upstream proxy’s address or any token. For a proxy username the assistant asks you for the project’s password.
- Text from outside is marked as data. A vendor’s error, an IP database’s place names, a name someone typed and a report’s reason reach the assistant with any credentials and URL query removed, at most 300 characters long.
- Changes are the same changes. A change made through an assistant writes the same History entry and starts the same follow-up work as in the web UI, and History shows it with token Claude Code through an AI assistant. Putting a proxy back records Unquarantined on that proxy. Pausing a cloud connector (AWS, GCP or Azure) drains and terminates its instances, and resuming it starts new instances with new IPs, which takes minutes.
- Limits. Each access token may make 60 requests a minute (
OCTOPROX_MCP_REQUESTS_PER_MINUTE), shared by every api; beyond that it gets429withRetry-After. An address that sends 20 tokens in a minute that do not exist, such as guesses or revoked tokens, is refused until the minute ends. Behind a load balancer, list it inOCTOPROX_GEO_ECHO_TRUSTED_PROXIESso that each client’s own address counts, not the balancer’s. The REST API has neither limit.
Use Octoprox as your agent’s proxy
The other way round, an agent’s own tools can send their traffic through a project. Take the proxy URL from the project’s Connect page, with the username and password in it, such as http://myuser-cc-us:mypassword@proxy.example.com:8080.
Playwright MCP takes it as --proxy-server:
{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--proxy-server", "http://myuser-cc-us:mypassword@proxy.example.com:8080"]
}
}
}
The fetch server takes it as --proxy-url:
{
"mcpServers": {
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch", "--proxy-url", "http://myuser-cc-us:mypassword@proxy.example.com:8080"]
}
}
}
Troubleshooting
| What you see | Why, and what to do |
|---|---|
401 Authentication required |
No token was sent. Add the Authorization header from the setup, or connect the app by signing in |
401 Use a token made for AI assistants (MCP only) |
A Scripts (API) token or a sign-in was sent. Make a token For AI assistant (MCP) |
401 Invalid or expired token |
The token is mistyped, revoked or expired. Make a new one |
401 Account is disabled |
The token’s user, or the person who connected the app, is turned off |
| The assistant opens a browser sign-in although its setup has a token | Octoprox refused the token for one of the reasons above. While app sign-in is on, a client that can sign in starts a sign-in instead of showing the reason. Fix the token, or approve the sign-in to connect the client as an app |
401 App sign-in is off on this install; ... |
A connected app, while OCTOPROX_MCP_OAUTH_ENABLED is false |
403 This token is for AI assistants and works only at /mcp |
A token for assistants was sent to the REST API. Scripts need a Scripts (API) token |
403 This origin may not call /mcp: add it to OCTOPROX_CORS_ORIGINS |
A client running in a browser, such as MCP Inspector, sends its page’s origin. Add that origin to OCTOPROX_CORS_ORIGINS |
404 MCP is turned off on this install |
OCTOPROX_MCP_ENABLED is false |
405 |
/mcp takes POST only. Choose the HTTP (streamable HTTP) transport in the client, not SSE |
429 Too many requests from this token: 60 a minute. ... |
Wait the seconds it gives, or raise OCTOPROX_MCP_REQUESTS_PER_MINUTE |
429 Too many refused tokens from this address. ... |
Too many unknown tokens came from the address this minute. Fix the token and wait for the minute to end |
| The app cannot connect | Check the address is exactly your public URL with /mcp, that OCTOPROX_PUBLIC_URL is https://, and that the app can reach the install from the internet |
| An app still uses the old settings after a change to the public URL | Apps keep Octoprox’s sign-in details for up to an hour. An app’s current access works until its hour ends; then it must connect again |
This sign-in started in another browser on the consent page |
Open the sign-in in the browser the app opened, and start again from the app |
| Claude Desktop shows the server as failed | Install Node.js, so that npx runs, and restart Claude |
Reference
- Settings:
OCTOPROX_MCP_ENABLED,OCTOPROX_MCP_OAUTH_ENABLED,OCTOPROX_MCP_REQUESTS_PER_MINUTE, and whatOCTOPROX_PUBLIC_URLandOCTOPROX_CORS_ORIGINSmean for assistants, in Configuration. - Endpoints:
/mcp, app sign-in and the token fields, in the API reference. - History of changes made through assistants, and on Octoprox Enterprise of app connections: Audit Log.