freeagent-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
freeagent-mcp
An MCP server for the FreeAgent accounting API (v2). It lets Claude, Cursor or any other MCP client read your FreeAgent data, and optionally change it.
It runs on your own computer over stdio. There is no hosted service and no build step.
Compatibility
Supported | |
Node.js | 24 or newer (runs the TypeScript source directly) |
OS | macOS (tested), Linux, Windows |
MCP clients | Claude Code, Claude Desktop, Cursor, VS Code, and any other client that runs stdio servers |
FreeAgent | Any company account. UK, US and universal companies use the same API. Accountancy Practice API is not supported. |
Check your Node version with node -v. Install Node 24 from https://nodejs.org or with nvm install 24.
Related MCP server: FreeAgent MCP Server
1. Create your own FreeAgent app
Every person creates their own app. Do not share a client secret.
Sign in at https://dev.freeagent.com with your FreeAgent login.
Go to My Apps, then Create New App.
Fill in:
Name: anything, for example
My FreeAgent MCPOAuth Redirect URIs:
http://localhost:8765/callback
Save. Copy the OAuth identifier and the secret. FreeAgent shows the secret only once.
To test without real data, also create a sandbox company at https://signup.sandbox.freeagent.com/signup and set FREEAGENT_SANDBOX=1 (see below).
2. Install
git clone https://github.com/DevGuildLtd/freeagent-mcp.git
cd freeagent-mcp
npm ci3. Save the app credentials
Create ~/.config/freeagent-mcp/app.json:
{
"clientId": "YOUR_OAUTH_IDENTIFIER",
"clientSecret": "YOUR_SECRET",
"redirectUri": "http://localhost:8765/callback"
}On macOS or Linux, make it private:
chmod 700 ~/.config/freeagent-mcp && chmod 600 ~/.config/freeagent-mcp/app.jsonOn Windows the folder is %USERPROFILE%\.config\freeagent-mcp.
Instead of the file you can set FREEAGENT_CLIENT_ID and FREEAGENT_CLIENT_SECRET in the client config (see step 4). This works well with a password manager, for example op run from 1Password.
4. Add it to your MCP client
Use the full path to your clone in place of /path/to/freeagent-mcp.
Claude Code
claude mcp add freeagent -s user -- node /path/to/freeagent-mcp/src/index.tsWith writes turned on:
claude mcp add freeagent -s user -e FREEAGENT_ALLOW_WRITES=1 -- node /path/to/freeagent-mcp/src/index.tsClaude Desktop, Cursor, VS Code and others
Add this to the client's MCP config file. For Claude Desktop that is claude_desktop_config.json (Settings, Developer, Edit Config). For Cursor it is ~/.cursor/mcp.json.
{
"mcpServers": {
"freeagent": {
"command": "node",
"args": ["/path/to/freeagent-mcp/src/index.ts"],
"env": {
"FREEAGENT_ALLOW_WRITES": "0"
}
}
}
}VS Code uses "servers" in place of "mcpServers" in .vscode/mcp.json.
If the client cannot find node (common with nvm and Claude Desktop), put the full path from which node in command.
5. First use and login
Ask your client something like "list my open FreeAgent invoices".
The first FreeAgent call opens the FreeAgent approval page in your browser. Sign in if you need to and click Approve. The call then goes on. You have 3 minutes. If the browser does not open, the tool error shows the link.
By default the tokens stay in memory only. Nothing goes to disk, and you approve again in each new session. To stay logged in across sessions:
npm run loginand set FREEAGENT_TOKEN_STORE=file in the client config. Tokens then go to ~/.config/freeagent-mcp/tokens.json and refresh on their own. Any program running as your user can read that file.
Tools
Tool | What it does |
| GET any v2 endpoint, for example |
| Company details and the signed-in user |
| Sales invoices, with view and date filters |
| Purchase bills |
| Clients and suppliers |
| Expense claims |
| Bank accounts and balances |
| Transactions for one bank account |
| Profit and loss, balance sheet, trial balance, cashflow |
| POST, PUT or DELETE any endpoint. Only when |
API reference: https://dev.freeagent.com/docs
Settings
All settings are environment variables.
Variable | Default | Meaning |
| off |
|
|
|
|
| off |
|
| none | Use these in place of |
|
| Must match the app on the developer portal |
|
| Where |
| off |
|
Security
The server acts as the FreeAgent user who approves it, with that user's full permission level. FreeAgent apps have no scopes. For a safer setup, approve with a FreeAgent user that has a lower permission level.
Writes are off by default. With writes on, an agent can create, change and delete records, and some actions cannot be undone, for example filing a VAT return or emailing an invoice.
To cut off access, remove the app from your FreeAgent account settings, or revoke the secret on the developer portal.
Troubleshooting
Problem | Fix |
| Another session is waiting for approval, or another program uses the port. Finish that login, or change the port in both the app's redirect URI and |
| Do step 3. |
| The redirect URI in |
| Node is older than 24. |
HTTP 429 | FreeAgent allows 120 requests per minute and 3600 per hour. The server waits and tries again. |
Development
npm run typecheck
FREEAGENT_SANDBOX=1 npm startLicense
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect Claude or Cursor to books, invoices, bills, payroll, and sealed closes.
MCP server for Codat — companies, connections, invoices, bills and financial statements.
Connect Xero to AI agents with secure read or write access across multiple organisations.
Headless API-first double-entry accounting & bookkeeping engine. 84 MCP tools over HTTP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for the FreeAgent accounting API, enabling LLMs to securely access and manage accounting data including contacts, invoices, bills, bank transactions, and more.5 npm1MIT
- AlicenseAqualityAmaintenanceEnables Claude to manage FreeAgent accounting tasks such as listing bank transactions, explaining and approving them with receipts, creating expenses, and logging mileage.2880 npm1MIT
- AlicenseBqualityBmaintenanceMCP server that provides 76 tools for the FreeAgent accounting API, enabling management of invoices, expenses, contacts, projects, timeslips, banking, bills, estimates, credit notes, and accounting reports through natural language.72492 npm6MIT
- AlicenseNot gradedqualityBmaintenanceA Model Context Protocol server for the FreeAgent accounting API, enabling LLMs to manage contacts, invoices, estimates, bills, expenses, timeslips, projects, tasks, bank accounts, and more.492 npm10MIT