Skip to main content
Glama
OxygenBubbles

FreeAgent MCP Server

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoIf set, serves over HTTP on this port instead of stdio
AUTH_TOKENNoBearer token required on every HTTP request when PORT is set
ORS_API_KEYNoOpenRouteService API key for drive-distance lookups
VENDOR_CATEGORIESNoJSON object extending built-in vendor to category mapping
MILEAGE_RATE_PENCENoFixed pence-per-mile rate; overrides HMRC logic when set
FREEAGENT_CLIENT_IDYesOAuth client ID from FreeAgent Developer API
GOOGLE_MAPS_API_KEYNoGoogle Maps API key for drive-distance lookups (alternative to ORS)
HMRC_RATE_LOW_PENCENoHMRC low-band rate in pence25
HMRC_RATE_HIGH_PENCENoHMRC high-band rate in pence45
HMRC_THRESHOLD_MILESNoMiles per tax year before low band kicks in10000
MILEAGE_CATEGORY_URLNoFreeAgent category URL for mileage expenses/v2/categories/311
FREEAGENT_CLIENT_SECRETYesOAuth client secret from FreeAgent Developer API
FREEAGENT_REFRESH_TOKENYesLong-lived refresh token obtained via OAuth flow

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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:

  • Approve a 'marked for review' transaction (set markExplained=true)

  • Change the category or description of an explanation

  • Attach a receipt/invoice — PREFER filePath (a local file) or fileUrl (a download link); the server reads/encodes it. Re-attaching replaces any existing attachment. Get the explanationId from freeagent_list_transactions (explanation_id field).

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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