@him0/freee-mcp 0.3.3 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -25
- package/bin/cli.js +54 -5206
- package/dist/api/client.d.ts +10 -1
- package/dist/auth/server.d.ts +47 -7
- package/dist/cli.d.ts +0 -9
- package/dist/config/companies.d.ts +10 -0
- package/dist/config.d.ts +0 -8
- package/dist/constants.d.ts +29 -0
- package/dist/e2e/auth-flow.e2e.test.d.ts +5 -0
- package/dist/e2e/client-mode.e2e.test.d.ts +5 -0
- package/dist/e2e/fixtures/api-responses.d.ts +158 -0
- package/dist/e2e/fixtures/index.d.ts +5 -0
- package/dist/e2e/mock-api.d.ts +61 -0
- package/dist/index.cjs +54 -5206
- package/dist/index.esm.js +54 -5206
- package/dist/openapi/schema-loader.d.ts +5 -9
- package/dist/utils/error.d.ts +8 -0
- package/package.json +25 -22
- package/dist/openapi/converter.d.ts +0 -2
- package/dist/openapi/converter.test.d.ts +0 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ MCP サーバー(API 呼び出し機能)と skill(API リファレンス
|
|
|
12
12
|
|
|
13
13
|
- **MCP サーバー**: freee API を Claude Desktop / Claude Code から直接呼び出し
|
|
14
14
|
- **Claude Plugin**: 詳細な API リファレンスドキュメント付きスキルを提供
|
|
15
|
-
- **複数 API 対応**:
|
|
15
|
+
- **複数 API 対応**: 会計・人事労務・請求書・工数管理・販売の5つの freee API をサポート
|
|
16
16
|
- **OAuth 2.0 + PKCE**: セキュアな認証フロー、トークン自動更新
|
|
17
17
|
- **複数事業所対応**: 事業所の動的切り替えが可能
|
|
18
18
|
|
|
@@ -22,7 +22,7 @@ MCP サーバー(API 呼び出し機能)と skill(API リファレンス
|
|
|
22
22
|
|
|
23
23
|
[freee アプリストア](https://app.secure.freee.co.jp/developers) で新しいアプリを作成:
|
|
24
24
|
|
|
25
|
-
-
|
|
25
|
+
- **コールバックURL**: `http://127.0.0.1:54321/callback`
|
|
26
26
|
- **Client ID** と **Client Secret** を取得
|
|
27
27
|
- 必要な権限にチェック
|
|
28
28
|
|
|
@@ -49,18 +49,24 @@ npx @him0/freee-mcp configure
|
|
|
49
49
|
"mcpServers": {
|
|
50
50
|
"freee": {
|
|
51
51
|
"command": "npx",
|
|
52
|
-
"args": ["@him0/freee-mcp"
|
|
52
|
+
"args": ["@him0/freee-mcp"]
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
> **⚠️ 環境変数での設定について**
|
|
59
|
+
> 環境変数(`FREEE_CLIENT_ID`、`FREEE_CLIENT_SECRET` など)を使った設定は非推奨です。
|
|
60
|
+
> 代わりに `npx @him0/freee-mcp configure` を実行して設定ファイルに移行してください。
|
|
61
|
+
> 環境変数設定は将来のバージョンで削除される予定です。
|
|
62
|
+
|
|
58
63
|
## Claude Plugin として使う
|
|
59
64
|
|
|
60
65
|
Claude Code でプラグインとしてインストールすると、API リファレンス付きのスキルが利用できます:
|
|
61
66
|
|
|
62
67
|
```bash
|
|
63
|
-
claude plugin add him0/freee-mcp
|
|
68
|
+
claude plugin marketplace add him0/freee-mcp
|
|
69
|
+
claude plugin install freee-api
|
|
64
70
|
```
|
|
65
71
|
|
|
66
72
|
### 含まれるリファレンス
|
|
@@ -71,6 +77,7 @@ claude plugin add him0/freee-mcp
|
|
|
71
77
|
| 人事労務 | 従業員、勤怠、給与明細、年末調整など | 27 |
|
|
72
78
|
| 請求書 | 請求書、見積書、納品書 | 3 |
|
|
73
79
|
| 工数管理 | ユーザー情報 | 1 |
|
|
80
|
+
| 販売 | 案件、受注 | 2 |
|
|
74
81
|
|
|
75
82
|
Claude との会話中に API の使い方を質問すると、これらのリファレンスを参照して正確な情報を提供します。
|
|
76
83
|
|
|
@@ -86,25 +93,6 @@ Claude との会話中に API の使い方を質問すると、これらのリ
|
|
|
86
93
|
例: 「先月の○○社への請求書を参考に、今月分を作成して」
|
|
87
94
|
```
|
|
88
95
|
|
|
89
|
-
## 起動モード
|
|
90
|
-
|
|
91
|
-
freee-mcp は2つのモードで起動できます:
|
|
92
|
-
|
|
93
|
-
```bash
|
|
94
|
-
# クライアントモード(推奨):HTTPメソッド別の6ツール
|
|
95
|
-
npx @him0/freee-mcp client
|
|
96
|
-
|
|
97
|
-
# APIモード:エンドポイントごとの個別ツール(数百個)
|
|
98
|
-
npx @him0/freee-mcp api
|
|
99
|
-
# または
|
|
100
|
-
npx @him0/freee-mcp
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
| モード | ツール数 | 特徴 | 推奨 |
|
|
104
|
-
| ------ | -------- | ---- | ---- |
|
|
105
|
-
| client | 6個 | コンテキスト使用量が少ない、任意のパスを指定可能 | ✅ |
|
|
106
|
-
| api | 数百個 | エンドポイントごとに専用ツール、コンテキスト消費大 | ❌ |
|
|
107
|
-
|
|
108
96
|
## 利用可能なツール
|
|
109
97
|
|
|
110
98
|
### 管理ツール
|
|
@@ -118,7 +106,7 @@ npx @him0/freee-mcp
|
|
|
118
106
|
| `freee_help` | 使い方ガイド |
|
|
119
107
|
| `freee_status` | 現在の状態と推奨アクション |
|
|
120
108
|
|
|
121
|
-
### API
|
|
109
|
+
### API ツール
|
|
122
110
|
|
|
123
111
|
HTTPメソッドごとのシンプルなツール構成:
|
|
124
112
|
|
|
@@ -142,7 +130,7 @@ pnpm install
|
|
|
142
130
|
|
|
143
131
|
pnpm dev # 開発サーバー(ウォッチモード)
|
|
144
132
|
pnpm build # ビルド
|
|
145
|
-
pnpm
|
|
133
|
+
pnpm typecheck # 型チェック
|
|
146
134
|
pnpm lint # リント
|
|
147
135
|
pnpm test:run # テスト
|
|
148
136
|
|
|
@@ -154,6 +142,10 @@ pnpm generate:references
|
|
|
154
142
|
|
|
155
143
|
TypeScript / Model Context Protocol SDK / OAuth 2.0 + PKCE / Zod / esbuild
|
|
156
144
|
|
|
145
|
+
### アーキテクチャ詳細
|
|
146
|
+
|
|
147
|
+
プロジェクトのアーキテクチャ、内部構造、開発ガイドラインについては [CLAUDE.md](./CLAUDE.md) を参照してください。
|
|
148
|
+
|
|
157
149
|
## ライセンス
|
|
158
150
|
|
|
159
151
|
ISC
|