Skip to main content
Glama
duncanmcclean

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コンテナとして実行する方法もあります。

セットアップ

  1. インストールとマイグレーションを実行します。

composer install
cp .env.example .env
php artisan key:generate
php artisan migrate
  1. FreeAgent 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にその値を設定してください。

  1. 認証します。

php artisan freeagent:auth

表示されたURLを開いてアプリを承認し、リダイレクトされたURLをターミナルに貼り付けます。トークンはSQLiteに暗号化して保存され、それ以降は自動的に更新されます。

  1. 動作確認をします。

php artisan freeagent:status

Related 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では表示されません。

ツール

ツール

説明

get_company_context

会社の基本情報、会計年度末、通貨、ユーザー、FreeAgentサブドメイン。手軽な全体把握のための呼び出し。

list_categories

勘定科目コードを含む全勘定科目表。銀行口座とユーザーサブアカウントも含む。任意の検索付き。

get_balance_sheet

任意の日付時点の貸借対照表、または期首残高を取得。

get_trial_balance

指定期間の試算表のサマリー、または期首残高を取得。

get_profit_and_loss

指定期間のP&Lサマリー: 収益、費用、控除、留保利益。

get_cashflow

月別の入出金と正味残高。

explain_category

指定期間にその勘定科目コードに対して計上された全取引を、ソース文書、ディープリンク、累計残高付きで表示。試算表と照合済み。

search_transactions

日付、金額、銀行口座、勘定科目コードのフィルターで元の取引を全文検索。

list_records

銀行、書類、連絡先、プロジェクト、納税申告、資産、給与、タイムなど、他の35の読み取り専用リソースを一覧する汎用エンドポイント。

get_record

リソースと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回)を消耗しません。

F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    Not graded
    quality
    C
    maintenance
    MCP server for the FreeAgent accounting API, enabling LLMs to securely access and manage accounting data including contacts, invoices, bills, bank transactions, and more.
    5
    1
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    MCP 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.
    76
    21
    3
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    A 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.
    21
    9
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    A read-only MCP server that gives AI agents structured access to a Beancount personal finance ledger.
    1

View all related MCP servers

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.

View all MCP Connectors

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/duncanmcclean/freeagent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server