freee-mcp

MCP.Pizza Chef: him0

freee-mcp is a Node.js MCP server that automatically exposes freee API endpoints as MCP tools using OpenAPI definitions. It features automatic API request validation with Zod, error handling, and response formatting. Designed for seamless integration with MCP clients, it enables real-time interaction with freee accounting and business management APIs, simplifying automation and workflow enhancement.

Use This MCP server To

Automatically expose freee API endpoints as MCP tools Validate API requests automatically using Zod schemas Handle errors and format API responses for MCP clients Integrate freee accounting data into AI workflows Enable real-time interaction with freee APIs via MCP Simplify automation of business management tasks Use with Claude desktop app for enhanced context-aware AI Develop custom MCP clients leveraging freee API data

README

freee-mcp

freee APIをModel Context Protocol (MCP)サーバーとして提供する実装です。OpenAPI定義を使用して、freee APIのエンドポイントを自動的にMCPツールとして公開します。

⚠️ 注意: このプロジェクトは開発中であり、予期せぬ不具合が発生する可能性があります。問題を発見された場合は、Issueとして報告していただけると幸いです。また、改善のためのプルリクエストも歓迎しています。

概要

このプロジェクトは以下の機能を提供します:

  • freee APIのエンドポイントをMCPツールとして自動公開
  • APIリクエストの自動バリデーション(Zod使用)
  • エラーハンドリングとレスポンス整形

必要要件

  • Node.js v22
  • pnpm

インストール

git clone [repository-url]
cd freee-mcp
pnpm install

環境設定

以下の環境変数を設定する必要があります:

FREEE_ACCESS_TOKEN=your_access_token
FREEE_COMPANY_ID=your_company_id
FREEE_API_URL=https://api.freee.co.jp # オプション、デフォルトはhttps://api.freee.co.jp

開発

# 開発サーバーの起動(ウォッチモード)
pnpm dev

# ビルド
pnpm build

# 型チェック
pnpm type-check

# リント
pnpm lint

# フォーマット
pnpm format

使用方法

ビルド後、以下のコマンドでサーバーを起動できます:

pnpm start

MCPサーバーとしての登録

Claude デスクトップアプリケーションで使用するには、以下の設定を ~/Library/Application Support/Claude/claude_desktop_config.json に追加してください:

{
  "mcpServers": {
    "freee": {
      "command": "/usr/local/bin/node",
      "args": ["/path/to/freee-mcp/dist/index.cjs"],
      "env": {
        "FREEE_ACCESS_TOKEN": "your_access_token",
        "FREEE_COMPANY_ID": "your_company_id"
      }
    }
  }
}

VSCode拡張機能で使用する場合は、同様の設定を ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json に追加してください。

利用可能なツール

freee APIのすべてのエンドポイントがMCPツールとして自動的に公開されます

各ツールは以下の命名規則に従います:

  • GET: get_[resource_name]
  • POST: post_[resource_name]
  • PUT: put_[resource_name]_by_id
  • DELETE: delete_[resource_name]_by_id

技術スタック

  • TypeScript
  • Model Context Protocol SDK
  • Zod(バリデーション)
  • esbuild(ビルド)

ライセンス

ISC

関連リンク

freee-mcp FAQ

How do I install freee-mcp?
Clone the repository, install dependencies with pnpm, and set environment variables for access token and company ID.
What Node.js version is required?
freee-mcp requires Node.js version 22.
How does freee-mcp validate API requests?
It uses Zod schemas to automatically validate API requests before sending them to freee API.
Can I customize the freee API URL?
Yes, you can set the FREEE_API_URL environment variable to override the default API endpoint.
How do I start the freee-mcp server?
After building, run 'pnpm start' to launch the MCP server.
Is freee-mcp compatible with multiple MCP clients?
Yes, it exposes standard MCP tools usable by any MCP client supporting the protocol.
How does freee-mcp handle errors from the freee API?
It includes error handling that formats and returns errors in a consistent MCP-friendly manner.
Can I contribute to freee-mcp development?
Yes, the project welcomes issues and pull requests for improvements.
Is freee-mcp production-ready?
It is currently in development and may have unexpected bugs; use with caution.