FreeAgent MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | If set, serves over HTTP on this port instead of stdio | |
| AUTH_TOKEN | No | Bearer token required on every HTTP request when PORT is set | |
| ORS_API_KEY | No | OpenRouteService API key for drive-distance lookups | |
| VENDOR_CATEGORIES | No | JSON object extending built-in vendor to category mapping | |
| MILEAGE_RATE_PENCE | No | Fixed pence-per-mile rate; overrides HMRC logic when set | |
| FREEAGENT_CLIENT_ID | Yes | OAuth client ID from FreeAgent Developer API | |
| GOOGLE_MAPS_API_KEY | No | Google Maps API key for drive-distance lookups (alternative to ORS) | |
| HMRC_RATE_LOW_PENCE | No | HMRC low-band rate in pence | 25 |
| HMRC_RATE_HIGH_PENCE | No | HMRC high-band rate in pence | 45 |
| HMRC_THRESHOLD_MILES | No | Miles per tax year before low band kicks in | 10000 |
| MILEAGE_CATEGORY_URL | No | FreeAgent category URL for mileage expenses | /v2/categories/311 |
| FREEAGENT_CLIENT_SECRET | Yes | OAuth client secret from FreeAgent Developer API | |
| FREEAGENT_REFRESH_TOKEN | Yes | Long-lived refresh token obtained via OAuth flow |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| freeagent_list_bank_accountsA | List all bank accounts on the FreeAgent account. Returns account name, currency, current balance and status. Use this to find the bank account ID before listing transactions. |
| freeagent_list_transactionsA | List bank account transactions from FreeAgent. By default returns unexplained (unreconciled) transactions. Use bankAccountId from freeagent_list_bank_accounts. Returns id, date, description, amount, and explanation details (category, marked_for_review) for each entry. After listing, if the task involves reconciliation, search available email or file sources for matching receipts — do not ask the user to provide files before checking email (Gmail, Outlook, etc.) and local sources first. |
| freeagent_explain_transactionA | Approve or update a FreeAgent bank transaction explanation. Use this to:
RECEIPTS: Before asking the user for a file, search connected email tools (Gmail, Outlook/M365) for a matching invoice using vendor name, amount and date. Pass a download link as fileUrl, or save the PDF locally and pass filePath. Avoid fileBase64 for anything but tiny files — large inline base64 is unreliable. Also check local file sources (Downloads folder, etc.) if the user has mentioned them. SAFETY: Only set markExplained=true when you have a confirmed receipt attached or the user has explicitly approved it. |
| freeagent_list_categoriesA | List FreeAgent expense categories (chart of accounts). Returns category URL, description, nominal code and group. Use the category URL when creating expenses or explaining transactions. Cached after first call. |
| freeagent_create_expenseA | Create an expense in FreeAgent — for purchases on a personal card or cash that need claiming back. Provide vendor, date, amount, description and category. If categoryUrl is omitted, auto-selects from vendor mapping. Optionally pass bankAccountId to auto-match and explain a corresponding bank transaction (e.g. if the same purchase also appears on a company card). RECEIPTS: Before asking the user for a file, search connected email tools (Gmail, Outlook/M365) for a matching invoice. Use vendor name, amount and date as search terms. Download the PDF and pass it as fileBase64 + fileName. Also check local sources (Downloads folder, etc.) if the user has mentioned them. |
| freeagent_create_mileage_expenseA | Create a mileage expense in FreeAgent. Provide either origin + destination (requires ORS_API_KEY or GOOGLE_MAPS_API_KEY for distance lookup) or manualMiles for the journey distance. Set roundTrip=true to double the distance. Rate: pass ratePence to set the per-mile rate explicitly (e.g. 45 for 45p/mile). If omitted, defaults to the MILEAGE_RATE_PENCE env var, or HMRC approved rates (configurable via HMRC_RATE_HIGH_PENCE / HMRC_RATE_LOW_PENCE / HMRC_THRESHOLD_MILES env vars, defaulting to 45p/25p at 10,000 miles — pass cumulativeMilesYTD to enable threshold logic). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/OxygenBubbles/freeagent-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server