Integration guide
Gemini CLI MCP setup
Manage FineProxy from the Gemini terminal agent.
How to connect Gemini CLI to FineProxy MCP
FineProxy runs an MCP server that gives AI agents access to your account. Once you connect it to Gemini CLI, you can ask Gemini to check your balance, list your proxies, compare prices, buy or renew a service and troubleshoot connection problems.
Before you start
- Gemini CLI, with the gemini command available in your terminal.
- A FineProxy account. Sign up if you don't have one yet.
- About five minutes.
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.
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:
export FINEPROXY_API_KEY="fb_your_api_key"On Windows, run this in PowerShell and open a new terminal:
setx FINEPROXY_API_KEY "fb_your_api_key"Add the FineProxy server
Run this command. Keep the single quotes: they save a reference to the variable instead of the key itself:
gemini mcp add --transport http --scope user \
-H 'Authorization: Bearer $FINEPROXY_API_KEY' \
fineproxy https://fineproxy.org/account_new/api/v1/mcpWithout --scope user, Gemini CLI saves the server only for the current folder.
Check the connection
Run gemini mcp list: fineproxy should show the status Connected. In a Gemini session, type /mcp to see its tools and ask: “What is my FineProxy balance?”
Safety tips
- Approve tool calls. Gemini 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 — Gemini CLI sends it in the request header.
Full documentation
Developer documentation is available in English: detailed Gemini CLI setup (settings.json options, troubleshooting), MCP safety and the list of all MCP tools.
Gemini CLI reports 401. What should I check?
An unset variable turns into an empty string, so the server receives no key. Make sure FINEPROXY_API_KEY is set in the terminal where you start gemini.
Can Gemini 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.
Gemini 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.