FreeAgent MCP
FreeAgent MCP
[!WARNING] このプロジェクトは100%バイブコーディングです。私はすべてをテストしたわけでも、コードを精査したわけでもありません。 動作しないことがあるかもしれません。使用は自己責任でお願いします。
ローカルで動作し、FreeAgentの会計データをAIクライアント(Claude Desktop、ChatGPTデスクトップアプリ、stdioでMCPを話すその他のクライアント)に公開する、読み取り専用のMCPサーバーです。*「なぜ勘定科目コード907に£4,200が入ったままなのか?」*のような質問ができ、モデルはその背景にある取引まで掘り下げて調べられます。
読み取り専用性はHTTPクライアント層で強制しています。クライアントはget()メソッドのみを公開しており、それ以外の動詞を呼び出そうとすると例外が発生します。すべてのツールは読み取り専用かつ冪等として注釈されています。会計データを変更できるコードパスは一切存在せず、VAT申告/MTD提出エンドポイントにはまったく触れません。
このサーバーはLaravelで構築されているため、ローカルにPHP(Herdなど)をセットアップしていない場合はあまり役に立たないかもしれません。とはいえ、Laravel SailなどでDockerコンテナとして実行する方法もあります。
セットアップ
インストールとマイグレーションを実行します。
composer install
cp .env.example .env
php artisan key:generate
php artisan migrateFreeAgent Developer DashboardでOAuthアプリを登録し、リダイレクトURIに
http://localhostを指定します。FreeAgentは、アプリに登録されたリダイレクトURIと完全に一致するものしか受け付けません。次に、.envにキーを追加します。
FREEAGENT_CLIENT_ID=your-client-id
FREEAGENT_CLIENT_SECRET=your-client-secret
FREEAGENT_SANDBOX=false既存のアプリで別のリダイレクトURIを登録している場合は、新しいものを登録せず、FREEAGENT_REDIRECT_URIにその値を設定してください。
認証します。
php artisan freeagent:auth表示されたURLを開いてアプリを承認し、リダイレクトされたURLをターミナルに貼り付けます。トークンはSQLiteに暗号化して保存され、それ以降は自動的に更新されます。
動作確認をします。
php artisan freeagent:statusRelated MCP server: freeagent-mcp-server
Claude Desktop
claude_desktop_config.jsonに追加します(設定 → 開発者 → 設定を編集):
{
"mcpServers": {
"freeagent": {
"command": "php",
"args": ["/absolute/path/to/freeagent-mcp/artisan", "mcp:start", "freeagent"]
}
}
}Claude Code
任意のプロジェクトからサーバーを追加します(--scope userを付けるとすべてのプロジェクトで使えるようになり、付けなければ現在のプロジェクトだけに登録されます):
claude mcp add freeagent --scope user -- php /absolute/path/to/freeagent-mcp/artisan mcp:start freeagentまたはプロジェクトの .mcp.json に手動で追加します:
{
"mcpServers": {
"freeagent": {
"command": "php",
"args": ["/absolute/path/to/freeagent-mcp/artisan", "mcp:start", "freeagent"]
}
}
}セッション内で/mcpを使い、接続を確認します。
ChatGPT デスクトップアプリ
~/.codex/config.tomlに追加します(または設定 → MCPサーバー → サーバーを追加 → STDIO):
[mcp_servers.freeagent]
command = "php"
args = ["/absolute/path/to/freeagent-mcp/artisan", "mcp:start", "freeagent"]
cwd = "/absolute/path/to/freeagent-mcp"
startup_timeout_sec = 20
tool_timeout_sec = 120
default_tools_approval_mode = "writes"writesモードは読み取り専用ツールを自動承認し、それ以外には確認します。このサーバーのツールがすべて読み取り専用としてマークされているため、確認は発生せず、確実な最終防衛線になります。なお、これはChatGPTデスクトップアプリでのみ動作し、ChatGPT webでは表示されません。
ツール
ツール | 説明 |
| 会社の基本情報、会計年度末、通貨、ユーザー、FreeAgentサブドメイン。手軽な全体把握のための呼び出し。 |
| 勘定科目コードを含む全勘定科目表。銀行口座とユーザーサブアカウントも含む。任意の検索付き。 |
| 任意の日付時点の貸借対照表、または期首残高を取得。 |
| 指定期間の試算表のサマリー、または期首残高を取得。 |
| 指定期間のP&Lサマリー: 収益、費用、控除、留保利益。 |
| 月別の入出金と正味残高。 |
| 指定期間にその勘定科目コードに対して計上された全取引を、ソース文書、ディープリンク、累計残高付きで表示。試算表と照合済み。 |
| 日付、金額、銀行口座、勘定科目コードのフィルターで元の取引を全文検索。 |
| 銀行、書類、連絡先、プロジェクト、納税申告、資産、給与、タイムなど、他の35の読み取り専用リソースを一覧する汎用エンドポイント。 |
| リソースとIDで単一の取引の完全な詳細を取得。 |
その他のコマンド
php artisan freeagent:status # auth state + connected company
php artisan freeagent:clear-cache # drop cached API responses
php artisan mcp:inspector freeagent # debug the server interactivelyレスポンスはデータベースにキャッシュされます(レポートと参照データは1時間、取引は15分)。そのため、MCPクライアントを再起動してもFreeAgentの利用制限(1分あたり120回、1時間あたり3,600回)を消耗しません。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.51MIT
- AlicenseBqualityAmaintenanceMCP 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.76213MIT
- AlicenseNot gradedqualityCmaintenanceA 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.219MIT
- FlicenseNot gradedqualityBmaintenanceA read-only MCP server that gives AI agents structured access to a Beancount personal finance ledger.1
Related MCP Connectors
Hosted MCP server for Mini Accountant: invoices, expenses, customers, analytics, tax estimates.
Hosted MCP server exposing US hospital procedure cost data to AI assistants
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/duncanmcclean/freeagent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server