Connect VS Code to FineProxy MCP
Use the FineProxy MCP server from GitHub Copilot agent mode in VS Code, with the API key entered through a secure prompt or read from an environment variable.
This page shows how to connect GitHub Copilot in VS Code (agent mode) to the FineProxy MCP server. VS Code connects directly over HTTP and sends your API key in the Authorization header.
VS Code reads MCP servers from two kinds of files, and they use different formats:
| Configuration | Files | Top-level key | How to pass the key |
|---|---|---|---|
| Editor-managed | .vscode/mcp.json, user profile mcp.json | servers | Secure prompt ${input:...} or ${env:NAME} |
| Copilot (portable) | ~/.copilot/mcp-config.json, .mcp.json in the workspace root | mcpServers | Environment variable ${NAME} only |
Use the editor-managed configuration unless you share one MCP file between Copilot surfaces.
Requirements
- VS Code 1.101 or later (remote HTTP MCP servers) with GitHub Copilot and agent mode available to you.
- A FineProxy API key (starts with
fb_). Create one in Settings → API keys. Start with read-only scopes.
Set up
Where the config lives
| Scope | Location |
|---|---|
| Workspace (editor-managed) | .vscode/mcp.json |
| User profile (editor-managed) | Run MCP: Open User Configuration from the Command Palette (the path depends on your profile) |
| Copilot, global | ~/.copilot/mcp-config.json (or $COPILOT_HOME/mcp-config.json) |
| Copilot, workspace | .mcp.json in the workspace root |
Option 1: editor-managed config with a password prompt
-
Open
.vscode/mcp.json(or your user configuration) and add:{ "servers": { "fineproxy": { "type": "http", "url": "https://fineproxy.org/account_new/api/v1/mcp", "headers": { "Authorization": "Bearer ${input:fineproxy_api_key}" } } }, "inputs": [ { "type": "promptString", "id": "fineproxy_api_key", "description": "FineProxy API key (fb_..., without Bearer prefix)", "password": true } ] } -
Start the server. VS Code asks for the key the first time and stores it securely for later sessions.
Note: Enter the raw key (
fb_...) at the prompt. The header template already addsBearer.
You can also add the server to your user configuration from a terminal:
code --add-mcp '{"name":"fineproxy","type":"http","url":"https://fineproxy.org/account_new/api/v1/mcp","headers":{"Authorization":"Bearer ${input:fineproxy_api_key}"}}'
The command doesn’t create the inputs entry. Open the user configuration afterwards and add the inputs block from the example above.
Option 2: Copilot config with an environment variable
Add the server to ~/.copilot/mcp-config.json or the workspace .mcp.json:
{
"mcpServers": {
"fineproxy": {
"type": "http",
"url": "https://fineproxy.org/account_new/api/v1/mcp",
"headers": {
"Authorization": "Bearer ${FINEPROXY_API_KEY}"
}
}
}
}
Set FINEPROXY_API_KEY in the environment that starts VS Code. This format doesn’t support ${input:...} prompts, envFile or other editor-only fields.
Keep your key out of the config
- Editor-managed files: use
${input:fineproxy_api_key}(the value goes to VS Code’s secret storage after the first prompt) or${env:FINEPROXY_API_KEY}. - Copilot files: use
${FINEPROXY_API_KEY}(${NAME:-default}also works). There is no way to forward a prompted secret into an HTTP header from these files.
export FINEPROXY_API_KEY="fb_your_api_key"
Warning:
.vscode/mcp.jsonand.mcp.jsonlive in the workspace and are easy to commit. Never put a literalfb_...key in them — keep only${input:...}or environment variable references.
Verify the connection
-
Run MCP: List Servers from the Command Palette and check that
fineproxyis running. -
Open Copilot Chat, switch to Agent mode and open the tools picker: the FineProxy tools are listed under
fineproxy. -
Ask:
What is my FineProxy balance?Copilot calls the
wallet_balancetool and answers with your balance, for example"balance_cents": 5000— money values are integer cents, so that is $50.00.
Tips
- Approve tool calls. Copilot asks for confirmation before it runs an MCP tool. Read the arguments of order, renewal and cancellation tools before you continue, and don’t auto-approve money-moving tools.
- Use a read-only key first. For exploring, a key with
customer:read,wallet:read,services:readandcatalog:readis enough. Withoutwallet:spend, the agent can’t run tools that debit your wallet. - Add
wallet:spendonly for purchases. Create a separate key withwallet:spendwhen you want the agent to buy or renew. Purchase tools carry a price guard and an idempotency key: a wrong total is rejected without a charge, and a retry with the same key never charges twice. - Read MCP safety and the scopes reference before you give an agent spending rights.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
You edit .mcp.json but chat doesn’t pick up the change | Chat uses the editor-managed .vscode/mcp.json (or the other way round). Check which configuration your session uses — see VS Code’s migration guide. |
${input:...} is rejected or not resolved | Input prompts work only in editor-managed files. In .mcp.json / mcp-config.json, use ${FINEPROXY_API_KEY}. |
401 | The prompt received Bearer fb_... instead of the raw key (the header becomes Bearer Bearer ...), or the environment variable isn’t set for VS Code. |
| VS Code offers an OAuth sign-in | The Authorization header is missing. FineProxy MCP accepts API keys only. |
429 Too Many Requests | Too many restarts in a short time. Wait a moment and start the server once. |
For server-side errors and tool failures, see MCP troubleshooting.