An MCP server for FreeAgent accounting that lets MCP clients list bank accounts and transactions, explain or approve transactions with receipts, create expense claims, and log mileage. It uses FreeAgent OAuth credentials to access the connected account and can also run over HTTP with optional bearer token protection.
From the registry: FreeAgent accounting MCP: bank reconciliation, expenses, mileage claims and receipts.
$ npx @oxygenbubbles/freeagent-mcp-server authPlease install the `freeagent-mcp-server` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Create FreeAgent OAuth application** — Log in to FreeAgent, go to Settings → Developer API, create an OAuth application, and set the redirect URI to http://localhost:8080/callback. Note the client ID and client secret.
- **Generate FreeAgent refresh token** — Run the bundled auth flow, enter your FreeAgent client ID and client secret, authorize in the browser, and save the long-lived refresh token for use as FREEAGENT_REFRESH_TOKEN. Run: `npx @oxygenbubbles/freeagent-mcp-server auth`
- **Install Node.js and npm** — Node.js is required to run the server via npx or from a local build.
Canonical MCP server config (stdio transport):
- command: `npx`
- args: ["@oxygenbubbles/freeagent-mcp-server"]
- required environment variables:
- `FREEAGENT_CLIENT_ID`: FreeAgent OAuth client ID. (example: `<your-freeagent-client-id>`)
- `FREEAGENT_CLIENT_SECRET`: FreeAgent OAuth client secret. (example: `<your-freeagent-client-secret>`)
- `FREEAGENT_REFRESH_TOKEN`: Long-lived FreeAgent refresh token obtained from the auth flow. (example: `<your-freeagent-refresh-token>`)
- optional environment variables:
- `VENDOR_CATEGORIES`: JSON object extending the built-in vendor-to-category mapping. (example: `<{"ACME CORP":"/v2/categories/285","NETFLIX":"/v2/categories/270"}>`)
- `MILEAGE_CATEGORY_URL`: FreeAgent category URL for mileage expenses. (example: `<your-freeagent-category-url>`)
- `MILEAGE_RATE_PENCE`: Fixed pence-per-mile rate; overrides HMRC logic when set. (example: `<your-mileage-rate-pence>`)
- `HMRC_RATE_HIGH_PENCE`: HMRC high-band mileage rate in pence. (example: `<your-hmrc-high-rate-pence>`)
- `HMRC_RATE_LOW_PENCE`: HMRC low-band mileage rate in pence. (example: `<your-hmrc-low-rate-pence>`)
- `HMRC_THRESHOLD_MILES`: Miles per tax year before the low band kicks in. (example: `<your-hmrc-threshold-miles>`)
- `ORS_API_KEY`: OpenRouteService API key for drive-distance lookups. (example: `<your-openrouteservice-api-key>`)
- `GOOGLE_MAPS_API_KEY`: Google Maps API key for drive-distance lookups. (example: `<your-google-maps-api-key>`)
Note: The README's client examples use a local built server via node dist/index.js, but the bundled auth command is distributed through npm and the most portable runtime path is npx @oxygenbubbles/freeagent-mcp-server. The server can also run over HTTP when PORT is set; in that mode AUTH_TOKEN is strongly recommended and effectively required for secure deployments.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.FREEAGENT_CLIENT_IDrequiredOAuth client IDFREEAGENT_CLIENT_SECRETrequiredOAuth client secretFREEAGENT_REFRESH_TOKENrequiredLong-lived refresh tokenAUTH_TOKENrequiredBearer token required on every HTTP request when running in HTTP modeDraw and visually collaborate with your agents on tldraw's canvas.