NEW! |One API call, clean data back. No scrapers needed.Get 10,000 Free Tokens →

Integration guide

Codex CLI MCP setup

Manage FineProxy from the OpenAI Codex terminal agent.

UpdatedNovember 28, 2026
FormatStep-by-step guide

How to connect Codex CLI to FineProxy MCP

FineProxy runs an MCP server that gives AI agents access to your account. Once you connect it to the OpenAI Codex CLI, you can ask Codex to check your balance, list your proxies, compare prices, buy or renew a service and troubleshoot connection problems.

Before you start

  • Codex CLI, with the codex command available in your terminal.
  • A FineProxy account. Sign up if you don't have one yet.
  • About five minutes.
Step 1

Create an API key

Open Settings → API keys in your FineProxy dashboard and create a new key. For a start, select only the read permissions: customer:read, wallet:read, services:read and catalog:read. With these permissions the agent can look, but cannot spend money.

Copy the key right away — it starts with fb_ and is shown only once.

Step 2

Save the key in an environment variable

Keep the key in an environment variable, so it never ends up in a config file or your shell history. On macOS or Linux, add this line to ~/.zshrc or ~/.bashrc and open a new terminal:

bash
export FINEPROXY_API_KEY="fb_your_api_key"

On Windows, run this in PowerShell and open a new terminal:

powershell
setx FINEPROXY_API_KEY "fb_your_api_key"
Step 3

Add the FineProxy server

Run this command. Codex stores only the name of the variable, not the key:

bash
codex mcp add fineproxy --url https://fineproxy.org/account_new/api/v1/mcp \
  --bearer-token-env-var FINEPROXY_API_KEY

Prefer editing the config? Add the same settings to ~/.codex/config.toml:

toml
[mcp_servers.fineproxy]
url = "https://fineproxy.org/account_new/api/v1/mcp"
bearer_token_env_var = "FINEPROXY_API_KEY"
Step 4

Check the connection

Run codex mcp list and make sure fineproxy is listed. Start codex, type /mcp to see its tools, and ask: “What is my FineProxy balance?” Codex calls the wallet_balance tool and replies with your balance.

Safety tips

  • Approve tool calls. Codex CLI asks before it runs a FineProxy tool. Check the arguments, especially for orders, renewals and cancellations, and don't let purchase tools run automatically.
  • Add wallet:spend only when you need it. Create a separate key with this permission when you want the agent to buy or renew proxies. A wrong price is rejected without a charge, and a repeated request never charges twice.
  • Never paste the key into the chat. The agent doesn't need to see it — Codex CLI sends it in the request header.

Full documentation

Developer documentation is available in English: detailed Codex CLI setup (config.toml options, troubleshooting), MCP safety and the list of all MCP tools.

Is my key written to config.toml?

No. bearer_token_env_var stores only the variable name. Codex reads the key from the environment when it starts.

Can Codex CLI spend money from my wallet?

Only if the API key has the wallet:spend permission. With a read-only key the agent can check your balance, services and prices, but cannot buy or renew anything. Even with wallet:spend, review every purchase before you approve it.

Codex CLI offers to sign in with OAuth. What should I do?

The FineProxy MCP server accepts API keys only and has no OAuth sign-in. An OAuth prompt means the Authorization header with your key is missing. Check the configuration from the steps above.

Proxies for 48 hours

Build a plan for your task and test the proxies in real work. Pay for the selected configuration for 48 hours—the price is calculated during setup.

Configure for 48 hours