All skills
freee avatar

/freee-api-skill

@f5d1212
by freeefreee/freee-mcp503 stars
58

freee-mcp / freee-sign-mcp と連携するスキル。会計・人事労務・請求書・工数管理・販売・IT管理・固定資産・業務委託管理・サーベイ・開業・人事評価・申告・サイン(電子契約)の詳細APIリファレンスと使い方ガイドを提供。freee の経費申請・取引登録・勤怠打刻・給与明細・見積書・試算表・仕訳・従業員管理・工数登録・売上管理・SaaSアカウント管理・備品管理・固定資産管理・業務委託先の企業ユーザー/部門管理・サーベイ企画/実施回の取得・開業申請用データの参照/更新・人事評価結果の取得・法人税申告データや帳票の参照・電子契約の文書管理などの操作やAPI仕様を調べたいときに使う。ユーザーが freee のデータ操作、会計処理、人事労務管理、請求・見積、プロジェクト工数管理、販売管理、IT管理、固定資産管理、業務委託管理、サーベイ、開業、人事評価、申告、電子契約について質問や操作を依頼してきた場合は、明示的に freee と言及していなくても、このスキルの利用を検討すること。サインは別途 freee-sign-mcp の設定が必要。

Use this Skill: https://skilld.dev/gh/freee/freee-mcp/freee-api-skill

This session only. Nothing lands on disk.

recipessm-operations.md

≈1.3k tokens on demand. Your agent reads this file only when SKILL.md points to it.

販売管理の操作

freee販売(sm)APIを使った案件・見積・受注・納品・売上(売上予定・定期売上・前受金)・発注・仕入・原価の管理ガイド。

company_id は全リクエストで必須

sm APIは一覧・詳細の取得(GET)を含め、全エンドポイントで company_id が必須。GETは query、POST / PATCH / PUT(作成・更新・取消・ステータス変更)は body に含める。指定がないと初回から400になる。

ドメイン用語とパスの対応

ユーザーの言葉とAPIパスの用語が異なるため注意。

  • 案件: /businesses
  • 見積: /quotations
  • 受注: /sales_orders
  • 納品: /deliveries
  • 売上: /sales
  • 売上予定: /sales_schedules
  • 定期売上: /periodic_sales
  • 前受金: /advance_receipts
  • 発注: /purchase_orders
  • 仕入: /procurements
  • 原価予算(仕入・外部仕入・その他原価): /cost_budgets
  • その他原価: /other_costs
  • マスタ(商品・明細取引タイプ・案件フェーズ・受注確度・従業員・カスタムフィールド定義): /master/*

請求・入金は専用リソースではなく、売上(/sales)や受注(/sales_orders)の属性(billing_status / collection_status 等)として表現される。

使用例

案件一覧を取得

freee_api_get {
  "service": "sm",
  "path": "/businesses",
  "query": { "company_id": 123456 }
}

案件を作成

freee_api_post {
  "service": "sm",
  "path": "/businesses",
  "body": {
    "company_id": 123456,
    "name": "新規案件"
  }
}

案件を更新

送信したフィールドのみ更新される。

freee_api_patch {
  "service": "sm",
  "path": "/businesses/01JPP4FD1CVQWCDSWA90VE1ZTM",
  "body": {
    "company_id": 123456,
    "name": "案件名変更",
    "internal_memo": "メモ更新"
  }
}

受注を作成

明細(lines)は deal_line_type_id 方式で指定する(name は使えない)。deal_line_type_id は GET /master/deal_line_types?type=sales で取得する。

freee_api_post {
  "service": "sm",
  "path": "/sales_orders",
  "body": {
    "company_id": 123456,
    "sales_order_date": "2025-03-10",
    "customer_id": 1,
    "billing_partner_id": 1,
    "collecting_partner_id": 1,
    "billing_creating_method_type": "manually",
    "collection_method_type": "transfer",
    "lines": [
      {
        "line_type": "basic",
        "deal_line_type_id": "01JPP4FD1CVQWCDSWA90VE1ZTM",
        "quantity": 1,
        "unit_price": 10000,
        "withholding_enabled": false,
        "is_manual_tax_entry": false
      }
    ]
  }
}

lines の line_type は2種類。basic は deal_line_type_id / quantity / unit_price / withholding_enabled / is_manual_tax_entry が必須、text は text(フリーテキスト行)のみ。

仕入(/procurements)も同じく lines に deal_line_type_id(GET /master/deal_line_types?type=procurement で取得)を指定して作成する。

ID は ULID 形式

案件・受注・売上などのIDは 01JPP4FD1CVQWCDSWA90VE1ZTM のようなULID文字列(このガイドの /businesses/1 のような数値は説明用)。詳細・更新には一覧で取得した実際のIDを使う。

取消・ロック・復元の違い

  • 取消(POST /{リソース}/{id}/cancellation): レコードを取消状態にする(canceled: true)。「無かったことにする」操作
  • 復元(POST /other_costs/{id}/restoration): 取消済みを元に戻す(対応リソースのみ)
  • ロック(POST /businesses/{id}/close)/ ロック解除(POST /businesses/{id}/reopen): 案件を編集不可にする「確定させて編集を止める」操作

一覧の canceled や closed フィールドで状態を判別できる。

ページネーション

一覧は limit(既定20・最大100)と offset でページングする。全件取得は offset を limit ずつ進めて、返却件数が limit 未満になるまでループする。

freee_api_get {
  "service": "sm",
  "path": "/sales",
  "query": { "company_id": 123456, "limit": 100, "offset": 0 }
}

リファレンス

パス一覧・パラメータ・レスポンスの詳細は以下を参照:

  • references/sm-businesses.md - 案件
  • references/sm-quotations.md - 見積
  • references/sm-sales-orders.md - 受注
  • references/sm-deliveries.md - 納品
  • references/sm-sales.md - 売上
  • references/sm-sales-schedules.md - 売上予定
  • references/sm-periodic-sales.md - 定期売上
  • references/sm-advance-receipts.md - 前受金
  • references/sm-purchase-orders.md - 発注
  • references/sm-procurements.md - 仕入
  • references/sm-cost-budgets.md - 原価予算
  • references/sm-other-costs.md - その他原価
  • references/sm-master.md - マスタ(商品・明細取引タイプ・案件フェーズ・受注確度・従業員等)

Source: SKILL.md on GitHub

1 warningtoday5 checks · Risk SAFE
  • Gen Agent Trust Hubtoday

    This skill provides a comprehensive interface for AI agents to interact with the freee suite of APIs (Accounting, HR, Invoices, IT Management, etc.) via the Model Context Protocol (MCP). It includes exhaustive documentation, usage recipes, and security-conscious guidelines that instruct the agent to treat all retrieved financial and tax data as information rather than executable commands.

  • Sockettoday

    No alerts

  • Snyktoday

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    3/83 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at f5d1212. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Activeupdated 3 weeks ago
metadata
{
  "author": "freee_jp",
  "homepage": "https://github.com/freee/freee-mcp"
}
  • API
  • MCP
  • freee
  • accounting
  • hr
  • invoicing
  • project-management
  • expense-tracking
  • payroll

README badge

README badge for freee/freee-mcp

Provides detailed API reference and usage guides for freee's accounting, HR, invoicing, project management, sales, and IT management services through the freee-mcp MCP server. Use this skill when you need to query or perform operations on freee data like expense reports, transactions, employee records, timesheets, invoices, or project hours.

Generated from the current SKILL.md.

Does this skill work with both Remote MCP and local setup?
Yes. The skill supports Remote MCP (recommended, auto-authenticated via browser) and local MCP server setup (requires running `npx freee-mcp configure`). Use `freee_server_info` to check which transport mode is active.
Which freee products does this skill cover?
The skill covers accounting, HR/payroll, invoicing, project time tracking, sales management, IT management, and expense applications. Signing (electronic contracts) requires a separate `freee-sign-mcp` setup.
Do I need to specify a company ID for API calls?
Yes. You must first fetch the current company ID using `freee_get_current_company`, and it must match the company you want to operate on. Use `freee_set_current_company` to switch between companies before making API calls.
What should I do if I get an authentication error?
For Remote MCP, the client will prompt for re-authentication; if that fails, remove and re-add the custom connector. For local mode, use `freee_auth_status` to check status, then run `freee_clear_auth` followed by `freee_authenticate`.
Where do I find API details and usage examples?
The skill includes `recipes/` for common workflows (expense applications, deals, payroll, invoicing, etc.) and `references/` with detailed API parameters and response specs. Start with relevant recipes before consulting references.

Generated from the current SKILL.md. These answers refresh after source changes.