create-einja-app 0.3.1 → 0.3.2
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 +1 -1
- package/dist/cli.js +32 -16
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/default/.claude/hooks/einja/plan-mode-skill-loader.sh +23 -0
- package/templates/default/.claude/settings.json +15 -1
- package/templates/default/.env.personal.example +6 -2
- package/templates/default/.envrc +5 -0
- package/templates/default/.github/workflows/deploy-pr-preview.yml +23 -24
- package/templates/default/.github/workflows/deploy-stable-branches.yml +55 -49
- package/templates/default/.mcp.json +2 -12
- package/templates/default/.serena/project.yml +7 -0
- package/templates/default/CLAUDE.md +28 -4
- package/templates/default/README.md +2 -2
- package/templates/default/apps/admin/package.json +1 -1
- package/templates/default/apps/admin/tsconfig.json +2 -1
- package/templates/default/apps/web/package.json +1 -1
- package/templates/default/apps/web/tsconfig.json +2 -1
- package/templates/default/docs/plans/.gitkeep +0 -0
- package/templates/default/docs/plans/ancient-greeting-flamingo-agent-a87e67c.md +221 -0
- package/templates/default/docs/plans/ancient-greeting-flamingo-agent-ab73a1c.md +107 -0
- package/templates/default/docs/plans/ancient-greeting-flamingo.md +120 -0
- package/templates/default/docs/plans/bright-stargazing-dawn.md +87 -0
- package/templates/default/docs/plans/calm-stirring-bonbon.md +196 -0
- package/templates/default/docs/plans/calm-watching-widget.md +111 -0
- package/templates/default/docs/plans/cheerful-wiggling-ullman.md +164 -0
- package/templates/default/docs/plans/compiled-humming-cherny.md +94 -0
- package/templates/default/docs/plans/dapper-launching-lynx.md +81 -0
- package/templates/default/docs/plans/effervescent-munching-kite-agent-ac08baf.md +672 -0
- package/templates/default/docs/plans/effervescent-munching-kite-agent-aecc373.md +442 -0
- package/templates/default/docs/plans/effervescent-munching-kite.md +263 -0
- package/templates/default/docs/plans/fix-orphan-cleaner-review.md +25 -0
- package/templates/default/docs/plans/fix-sync-template-variables.md +162 -0
- package/templates/default/docs/plans/glimmering-giggling-sedgewick.md +126 -0
- package/templates/default/docs/plans/glittery-swimming-bachman.md +78 -0
- package/templates/default/docs/plans/happy-watching-toast.md +56 -0
- package/templates/default/docs/plans/harmonic-strolling-nebula.md +210 -0
- package/templates/default/docs/plans/import-alias-refactor.md +75 -0
- package/templates/default/docs/plans/lazy-percolating-sloth-agent-abda679.md +346 -0
- package/templates/default/docs/plans/lazy-percolating-sloth.md +151 -0
- package/templates/default/docs/plans/linked-greeting-llama-agent-a7a6e5b.md +345 -0
- package/templates/default/docs/plans/linked-greeting-llama.md +467 -0
- package/templates/default/docs/plans/lovely-bubbling-rose.md +80 -0
- package/templates/default/docs/plans/optimized-watching-sprout.md +149 -0
- package/templates/default/docs/plans/peaceful-beaming-toast-agent-a292da6.md +288 -0
- package/templates/default/docs/plans/peaceful-beaming-toast-agent-a819699.md +366 -0
- package/templates/default/docs/plans/peaceful-beaming-toast-agent-ac11de2.md +474 -0
- package/templates/default/docs/plans/peaceful-beaming-toast.md +345 -0
- package/templates/default/docs/plans/purrfect-spinning-hickey-agent-ae6194c.md +300 -0
- package/templates/default/docs/plans/purrfect-spinning-hickey-agent-ae6900e.md +444 -0
- package/templates/default/docs/plans/purrfect-spinning-hickey.md +361 -0
- package/templates/default/docs/plans/recursive-kindling-lemon-agent-a42199e.md +186 -0
- package/templates/default/docs/plans/recursive-kindling-lemon.md +36 -0
- package/templates/default/docs/plans/seed-migration-tests.md +47 -0
- package/templates/default/docs/plans/sprightly-leaping-manatee.md +224 -0
- package/templates/default/docs/plans/stateful-wishing-lerdorf.md +161 -0
- package/templates/default/docs/plans/streamed-purring-wreath.md +40 -0
- package/templates/default/docs/plans/synthetic-percolating-pearl.md +101 -0
- package/templates/default/docs/plans/todo-fix-sync-template-variables.md +21 -0
- package/templates/default/docs/plans/todo-phase4-marker-update.md +39 -0
- package/templates/default/docs/plans/todo-skill-creator-sync.md +23 -0
- package/templates/default/docs/plans/typed-snuggling-parnas-agent-a6f6391.md +476 -0
- package/templates/default/docs/plans/typed-snuggling-parnas-agent-adb678b.md +144 -0
- package/templates/default/docs/plans/typed-snuggling-parnas.md +84 -0
- package/templates/default/docs/plans/warm-hopping-lighthouse-agent-a30aa4f.md +534 -0
- package/templates/default/docs/plans/warm-hopping-lighthouse-agent-a57a278.md +508 -0
- package/templates/default/docs/plans/warm-hopping-lighthouse-agent-a90b809.md +421 -0
- package/templates/default/docs/plans/warm-hopping-lighthouse.md +199 -0
- package/templates/default/docs/verification-test.md +2 -0
- package/templates/default/gitignore +4 -0
- package/templates/default/package.json +2 -2
- package/templates/default/packages/admin-ui/package.json +1 -1
- package/templates/default/packages/server-core/tsconfig.json +6 -1
- package/templates/default/pnpm-lock.yaml +276 -57
- package/templates/default/scripts/ensure-serena.sh +75 -0
- package/templates/default/scripts/lib/worktree-config.ts +64 -0
- package/templates/default/scripts/stop-serena.sh +25 -0
- package/templates/default/scripts/worktree/dev.ts +2 -2
- /package/templates/default/scripts/{cli-template-update.ts → _cli-template-update.ts} +0 -0
- /package/templates/default/scripts/{template-update.ts → _template-update.ts} +0 -0
|
@@ -0,0 +1,672 @@
|
|
|
1
|
+
# Claude Code MCP サーバー共有方法の調査レポート
|
|
2
|
+
|
|
3
|
+
## 調査概要
|
|
4
|
+
|
|
5
|
+
Claude Codeで複数インスタンス間でMCPサーバーを共有する方法について調査しました。現在のプロジェクトでは7つのMCPサーバー(vibe_kanban, codex, context7, playwright, serena, github, drawio)がすべてstdio/http方式で設定されています。
|
|
6
|
+
|
|
7
|
+
## 1. Claude Code の `.mcp.json` 設定形式
|
|
8
|
+
|
|
9
|
+
### サポートされるトランスポートタイプ
|
|
10
|
+
|
|
11
|
+
Claude Codeは以下の3つのトランスポートタイプをサポートしています:
|
|
12
|
+
|
|
13
|
+
#### 1.1 HTTP(推奨)
|
|
14
|
+
|
|
15
|
+
**2026年現在、最も推奨される方式**。Streamable HTTP transportはSSEに代わる新標準です。
|
|
16
|
+
|
|
17
|
+
**設定例:**
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"mcpServers": {
|
|
21
|
+
"github": {
|
|
22
|
+
"type": "http",
|
|
23
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
24
|
+
"headers": {
|
|
25
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**CLI経由の追加:**
|
|
33
|
+
```bash
|
|
34
|
+
claude mcp add --transport http notion https://mcp.notion.com/mcp
|
|
35
|
+
claude mcp add --transport http secure-api https://api.example.com/mcp \
|
|
36
|
+
--header "Authorization: Bearer your-token"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
#### 1.2 SSE(非推奨だが現在も動作)
|
|
40
|
+
|
|
41
|
+
**注意:** SSEトランスポートは非推奨とされており、HTTPが利用可能な場合はそちらを使用すべきです。
|
|
42
|
+
|
|
43
|
+
**設定例:**
|
|
44
|
+
```json
|
|
45
|
+
{
|
|
46
|
+
"mcpServers": {
|
|
47
|
+
"knowledgeforge-rag": {
|
|
48
|
+
"type": "sse",
|
|
49
|
+
"url": "http://localhost:8090/sse"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**CLI経由の追加:**
|
|
56
|
+
```bash
|
|
57
|
+
claude mcp add --transport sse asana https://mcp.asana.com/sse
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### 1.3 Stdio(ローカル専用)
|
|
61
|
+
|
|
62
|
+
**ローカルプロセスとして起動**。複数インスタンスで共有不可(各インスタンスが独立したプロセスを起動)。
|
|
63
|
+
|
|
64
|
+
**設定例:**
|
|
65
|
+
```json
|
|
66
|
+
{
|
|
67
|
+
"mcpServers": {
|
|
68
|
+
"codex": {
|
|
69
|
+
"type": "stdio",
|
|
70
|
+
"command": "codex",
|
|
71
|
+
"args": ["mcp-server"]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### 設定スコープ
|
|
78
|
+
|
|
79
|
+
| スコープ | 保存場所 | 用途 |
|
|
80
|
+
|----------|----------|------|
|
|
81
|
+
| **local**(デフォルト) | `~/.claude.json` | 個人用・実験的設定 |
|
|
82
|
+
| **project** | `.mcp.json`(プロジェクトルート) | **チーム共有**・バージョン管理対象 |
|
|
83
|
+
| **user** | `~/.claude.json` | 全プロジェクト共通の個人用設定 |
|
|
84
|
+
|
|
85
|
+
**重要:** `.mcp.json` をgitにコミットすることで、**チーム全員が同じMCPツールにアクセス可能**になります。ただし、これはstdioサーバーの場合、各メンバーのマシンで個別にプロセスが起動されます。
|
|
86
|
+
|
|
87
|
+
### 環境変数の展開
|
|
88
|
+
|
|
89
|
+
`.mcp.json` では環境変数を使用できます:
|
|
90
|
+
|
|
91
|
+
```json
|
|
92
|
+
{
|
|
93
|
+
"mcpServers": {
|
|
94
|
+
"api-server": {
|
|
95
|
+
"type": "http",
|
|
96
|
+
"url": "${API_BASE_URL:-https://api.example.com}/mcp",
|
|
97
|
+
"headers": {
|
|
98
|
+
"Authorization": "Bearer ${API_KEY}"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## 2. Stdio→SSE/HTTP変換ツール
|
|
106
|
+
|
|
107
|
+
### 2.1 Supergateway(推奨)
|
|
108
|
+
|
|
109
|
+
**機能:** Stdio MCPサーバーをSSE/WebSocket/HTTPとして公開、または逆変換も可能。
|
|
110
|
+
|
|
111
|
+
**インストール:**
|
|
112
|
+
```bash
|
|
113
|
+
npx -y supergateway --stdio "uvx mcp-server-git"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Stdioサーバーをネットワーク公開:**
|
|
117
|
+
```bash
|
|
118
|
+
# Playwrightサーバーをポート8000でSSE公開
|
|
119
|
+
npx -y supergateway --port 8000 \
|
|
120
|
+
--stdio "npx -y @playwright/mcp --isolated"
|
|
121
|
+
|
|
122
|
+
# アクセスURL: http://localhost:8000/sse
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
**リモートSSEサーバーをローカルstdioとして利用:**
|
|
126
|
+
```bash
|
|
127
|
+
npx -y supergateway --sse "https://mcp-server-example.app"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**Claude Desktop連携(リモートサーバーをローカルstdioとして使用):**
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"remoteServer": {
|
|
135
|
+
"command": "npx",
|
|
136
|
+
"args": ["-y", "supergateway", "--sse", "https://server-url.app"]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**主要オプション:**
|
|
143
|
+
- `--port 8000` - リスニングポート
|
|
144
|
+
- `--ssePath /sse` - SSEエンドポイント(デフォルト)
|
|
145
|
+
- `--messagePath /message` - メッセージ投稿エンドポイント
|
|
146
|
+
- `--cors` - CORS有効化
|
|
147
|
+
- `--logLevel info|none` - ログレベル
|
|
148
|
+
|
|
149
|
+
**Docker対応:**
|
|
150
|
+
```bash
|
|
151
|
+
docker run -it --rm -p 8000:8000 supercorp/supergateway \
|
|
152
|
+
--stdio "npx -y @modelcontextprotocol/server-filesystem /" \
|
|
153
|
+
--port 8000
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### 2.2 mcp-proxy
|
|
157
|
+
|
|
158
|
+
**機能:** Stdio↔SSE/StreamableHTTP双方向変換プロキシ。
|
|
159
|
+
|
|
160
|
+
**インストール:**
|
|
161
|
+
```bash
|
|
162
|
+
uv tool install mcp-proxy
|
|
163
|
+
# or
|
|
164
|
+
pipx install mcp-proxy
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**リモートSSEサーバーへの接続(stdio→SSEクライアント):**
|
|
168
|
+
```bash
|
|
169
|
+
mcp-proxy http://example.io/sse
|
|
170
|
+
|
|
171
|
+
# 認証ヘッダー付き
|
|
172
|
+
mcp-proxy --headers Authorization 'Bearer YOUR_TOKEN' http://example.io/sse
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**ローカルサーバーをSSE公開(SSE→stdioサーバー):**
|
|
176
|
+
```bash
|
|
177
|
+
mcp-proxy --port=8080 uvx mcp-server-fetch
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
**複数の名前付きサーバー:**
|
|
181
|
+
```bash
|
|
182
|
+
mcp-proxy --port=8080 \
|
|
183
|
+
--named-server fetch 'uvx mcp-server-fetch' \
|
|
184
|
+
--named-server github 'npx @modelcontextprotocol/server-github'
|
|
185
|
+
|
|
186
|
+
# アクセス: http://localhost:8080/servers/fetch/sse
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**Claude Desktop設定例:**
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"mcpServers": {
|
|
193
|
+
"mcp-proxy": {
|
|
194
|
+
"command": "mcp-proxy",
|
|
195
|
+
"args": ["http://example.io/sse"],
|
|
196
|
+
"env": {
|
|
197
|
+
"API_ACCESS_TOKEN": "your-token"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**主要オプション:**
|
|
205
|
+
- `--port / --host` - リスニングアドレス
|
|
206
|
+
- `--transport {sse|streamablehttp}` - リモート接続プロトコル
|
|
207
|
+
- `--headers` - 認証・カスタムヘッダー
|
|
208
|
+
- `--env` - 環境変数渡し
|
|
209
|
+
- `--allow-origin` - CORS有効化
|
|
210
|
+
- `--named-server NAME 'command'` - 複数サーバー管理
|
|
211
|
+
|
|
212
|
+
### 2.3 ツール比較
|
|
213
|
+
|
|
214
|
+
| 特徴 | Supergateway | mcp-proxy |
|
|
215
|
+
|------|-------------|-----------|
|
|
216
|
+
| **Stdio→SSE/HTTP** | ✅ | ✅ |
|
|
217
|
+
| **SSE→Stdio** | ✅ | ✅ |
|
|
218
|
+
| **複数サーバー管理** | ❌ | ✅(named-server) |
|
|
219
|
+
| **インストール** | npx実行のみ | uv/pipx必須 |
|
|
220
|
+
| **Docker対応** | ✅ | ✅ |
|
|
221
|
+
| **ライセンス** | MIT | 不明 |
|
|
222
|
+
|
|
223
|
+
## 3. 複数インスタンス間でMCPサーバーを共有する方法
|
|
224
|
+
|
|
225
|
+
### 方法1: プロジェクトスコープ(`.mcp.json`)- チーム共有
|
|
226
|
+
|
|
227
|
+
**適用シーン:** チーム全員が同じMCPツールを使用したい場合。
|
|
228
|
+
|
|
229
|
+
**制限事項:** Stdioサーバーは各メンバーのマシンで**個別にプロセスが起動**されます。真の「共有」ではなく、「設定の共有」です。
|
|
230
|
+
|
|
231
|
+
**手順:**
|
|
232
|
+
```bash
|
|
233
|
+
# プロジェクトスコープで追加
|
|
234
|
+
claude mcp add --scope project --transport http github \
|
|
235
|
+
https://api.githubcopilot.com/mcp/
|
|
236
|
+
|
|
237
|
+
# .mcp.json をgitコミット
|
|
238
|
+
git add .mcp.json
|
|
239
|
+
git commit -m "Add GitHub MCP server"
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**`.mcp.json` 例:**
|
|
243
|
+
```json
|
|
244
|
+
{
|
|
245
|
+
"mcpServers": {
|
|
246
|
+
"github": {
|
|
247
|
+
"type": "http",
|
|
248
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
249
|
+
"headers": {
|
|
250
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### 方法2: Supergatewayで中央集約サーバー化(真の共有)
|
|
258
|
+
|
|
259
|
+
**適用シーン:** 複数のClaude Codeインスタンス(異なるマシン・ユーザー)が**同一のMCPサーバープロセス**を共有したい場合。
|
|
260
|
+
|
|
261
|
+
**メリット:**
|
|
262
|
+
- サーバープロセスは1つだけ(リソース効率的)
|
|
263
|
+
- 状態の共有(例:セッション情報、キャッシュ)
|
|
264
|
+
- 中央でのログ・監査・RBAC管理
|
|
265
|
+
|
|
266
|
+
**構成例:**
|
|
267
|
+
|
|
268
|
+
#### 3.1 中央サーバー設定(例:jumpbox / 専用サーバー)
|
|
269
|
+
|
|
270
|
+
**Serenaサーバーを中央で起動:**
|
|
271
|
+
```bash
|
|
272
|
+
# ポート8001でSerenaを公開
|
|
273
|
+
npx -y supergateway --port 8001 \
|
|
274
|
+
--stdio "uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context claude-code --open-web-dashboard false"
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
**Codexサーバーを中央で起動:**
|
|
278
|
+
```bash
|
|
279
|
+
# ポート8002でCodexを公開
|
|
280
|
+
npx -y supergateway --port 8002 \
|
|
281
|
+
--stdio "codex mcp-server"
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Playwrightサーバーを中央で起動:**
|
|
285
|
+
```bash
|
|
286
|
+
# ポート8003でPlaywrightを公開
|
|
287
|
+
npx -y supergateway --port 8003 \
|
|
288
|
+
--stdio "npx -y @playwright/mcp --isolated"
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
#### 3.2 各クライアント(Claude Codeインスタンス)の設定
|
|
292
|
+
|
|
293
|
+
**`.mcp.json` で中央サーバーに接続:**
|
|
294
|
+
```json
|
|
295
|
+
{
|
|
296
|
+
"mcpServers": {
|
|
297
|
+
"serena": {
|
|
298
|
+
"type": "sse",
|
|
299
|
+
"url": "http://central-server:8001/sse"
|
|
300
|
+
},
|
|
301
|
+
"codex": {
|
|
302
|
+
"type": "sse",
|
|
303
|
+
"url": "http://central-server:8002/sse"
|
|
304
|
+
},
|
|
305
|
+
"playwright": {
|
|
306
|
+
"type": "sse",
|
|
307
|
+
"url": "http://central-server:8003/sse"
|
|
308
|
+
},
|
|
309
|
+
"github": {
|
|
310
|
+
"type": "http",
|
|
311
|
+
"url": "https://api.githubcopilot.com/mcp/"
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**または、mcp-proxyで複数サーバーを1ポートに集約:**
|
|
318
|
+
|
|
319
|
+
中央サーバーで:
|
|
320
|
+
```bash
|
|
321
|
+
mcp-proxy --port=8000 \
|
|
322
|
+
--named-server serena 'uvx --from git+https://github.com/oraios/serena serena start-mcp-server' \
|
|
323
|
+
--named-server codex 'codex mcp-server' \
|
|
324
|
+
--named-server playwright 'npx -y @playwright/mcp --isolated'
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
クライアント側:
|
|
328
|
+
```json
|
|
329
|
+
{
|
|
330
|
+
"mcpServers": {
|
|
331
|
+
"serena": {
|
|
332
|
+
"type": "sse",
|
|
333
|
+
"url": "http://central-server:8000/servers/serena/sse"
|
|
334
|
+
},
|
|
335
|
+
"codex": {
|
|
336
|
+
"type": "sse",
|
|
337
|
+
"url": "http://central-server:8000/servers/codex/sse"
|
|
338
|
+
},
|
|
339
|
+
"playwright": {
|
|
340
|
+
"type": "sse",
|
|
341
|
+
"url": "http://central-server:8000/servers/playwright/sse"
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
```
|
|
346
|
+
|
|
347
|
+
### 方法3: AWS/クラウドデプロイ(エンタープライズ)
|
|
348
|
+
|
|
349
|
+
**適用シーン:** 大規模組織での標準化・RBAC・監査要件がある場合。
|
|
350
|
+
|
|
351
|
+
AWSが公式に「Guidance for Deploying Model Context Protocol Servers on AWS」を提供しています。
|
|
352
|
+
|
|
353
|
+
**特徴:**
|
|
354
|
+
- 複数MCPサーバーが共通インフラ(VPC、NAT Gateway、ALB)を共有
|
|
355
|
+
- 中央集約的なログ・監査・RBAC
|
|
356
|
+
- カーボン効率の向上(リソース共有)
|
|
357
|
+
|
|
358
|
+
**参考:** [AWS MCP Server Guidance](https://aws.amazon.com/solutions/guidance/deploying-model-context-protocol-servers-on-aws/)
|
|
359
|
+
|
|
360
|
+
### 方法4: Claude.aiアカウント連携(自動共有)
|
|
361
|
+
|
|
362
|
+
**適用シーン:** Claude.aiのTeam/Enterpriseプランを使用している場合。
|
|
363
|
+
|
|
364
|
+
**手順:**
|
|
365
|
+
1. [claude.ai/settings/connectors](https://claude.ai/settings/connectors) でMCPサーバーを追加(管理者のみ)
|
|
366
|
+
2. Claude Codeでログインすると、自動的にClaude.aiのMCPサーバーが利用可能
|
|
367
|
+
|
|
368
|
+
**メリット:**
|
|
369
|
+
- 設定ファイル不要
|
|
370
|
+
- チーム全体で自動共有
|
|
371
|
+
- OAuth認証統合
|
|
372
|
+
|
|
373
|
+
## 4. 現在のプロジェクト設定の分析
|
|
374
|
+
|
|
375
|
+
### 現状の `.mcp.json`
|
|
376
|
+
|
|
377
|
+
```json
|
|
378
|
+
{
|
|
379
|
+
"mcpServers": {
|
|
380
|
+
"vibe_kanban": {
|
|
381
|
+
"command": "npx",
|
|
382
|
+
"args": ["-y", "vibe-kanban@latest", "--mcp"]
|
|
383
|
+
},
|
|
384
|
+
"codex": {
|
|
385
|
+
"type": "stdio",
|
|
386
|
+
"command": "codex",
|
|
387
|
+
"args": ["mcp-server"]
|
|
388
|
+
},
|
|
389
|
+
"context7": {
|
|
390
|
+
"command": "npx",
|
|
391
|
+
"args": ["-y", "@upstash/context7-mcp"]
|
|
392
|
+
},
|
|
393
|
+
"playwright": {
|
|
394
|
+
"type": "stdio",
|
|
395
|
+
"command": "npx",
|
|
396
|
+
"args": ["-y", "@playwright/mcp", "--isolated"]
|
|
397
|
+
},
|
|
398
|
+
"serena": {
|
|
399
|
+
"type": "stdio",
|
|
400
|
+
"command": "uvx",
|
|
401
|
+
"args": [
|
|
402
|
+
"--from", "git+https://github.com/oraios/serena",
|
|
403
|
+
"serena", "start-mcp-server",
|
|
404
|
+
"--context", "claude-code",
|
|
405
|
+
"--open-web-dashboard", "false"
|
|
406
|
+
]
|
|
407
|
+
},
|
|
408
|
+
"github": {
|
|
409
|
+
"type": "http",
|
|
410
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
411
|
+
"headers": {
|
|
412
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
413
|
+
}
|
|
414
|
+
},
|
|
415
|
+
"drawio": {
|
|
416
|
+
"command": "npx",
|
|
417
|
+
"args": ["-y", "@drawio/mcp@latest"]
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
### 問題点
|
|
424
|
+
|
|
425
|
+
| サーバー | 現状 | 問題 |
|
|
426
|
+
|---------|------|------|
|
|
427
|
+
| **vibe_kanban** | stdio | 各Claude Codeインスタンスで個別プロセス起動 |
|
|
428
|
+
| **codex** | stdio | 同上 |
|
|
429
|
+
| **context7** | stdio | 同上 |
|
|
430
|
+
| **playwright** | stdio(isolated) | 同上 + isolatedモードで独立ブラウザインスタンス |
|
|
431
|
+
| **serena** | stdio | 同上 + LSPサーバー起動(重い) |
|
|
432
|
+
| **github** | http(リモート) | ✅ すでに共有可能 |
|
|
433
|
+
| **drawio** | stdio | 各インスタンスで個別プロセス起動 |
|
|
434
|
+
|
|
435
|
+
**結論:** GitHub以外はすべてstdioで、複数インスタンス起動時に**リソースが重複消費**されます。
|
|
436
|
+
|
|
437
|
+
## 5. 推奨される改善策
|
|
438
|
+
|
|
439
|
+
### オプションA: 中央Supergatewayサーバー(jumpbox)
|
|
440
|
+
|
|
441
|
+
**手順:**
|
|
442
|
+
|
|
443
|
+
1. **中央サーバーで各MCPサーバーを起動:**
|
|
444
|
+
|
|
445
|
+
```bash
|
|
446
|
+
# serena (port 8001)
|
|
447
|
+
npx -y supergateway --port 8001 --cors \
|
|
448
|
+
--stdio "uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context claude-code --open-web-dashboard false" &
|
|
449
|
+
|
|
450
|
+
# codex (port 8002)
|
|
451
|
+
npx -y supergateway --port 8002 --cors \
|
|
452
|
+
--stdio "codex mcp-server" &
|
|
453
|
+
|
|
454
|
+
# playwright (port 8003)
|
|
455
|
+
npx -y supergateway --port 8003 --cors \
|
|
456
|
+
--stdio "npx -y @playwright/mcp --isolated" &
|
|
457
|
+
|
|
458
|
+
# vibe_kanban (port 8004)
|
|
459
|
+
npx -y supergateway --port 8004 --cors \
|
|
460
|
+
--stdio "npx -y vibe-kanban@latest --mcp" &
|
|
461
|
+
|
|
462
|
+
# context7 (port 8005)
|
|
463
|
+
npx -y supergateway --port 8005 --cors \
|
|
464
|
+
--stdio "npx -y @upstash/context7-mcp" &
|
|
465
|
+
|
|
466
|
+
# drawio (port 8006)
|
|
467
|
+
npx -y supergateway --port 8006 --cors \
|
|
468
|
+
--stdio "npx -y @drawio/mcp@latest" &
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
2. **`.mcp.json` を更新:**
|
|
472
|
+
|
|
473
|
+
```json
|
|
474
|
+
{
|
|
475
|
+
"mcpServers": {
|
|
476
|
+
"serena": {
|
|
477
|
+
"type": "sse",
|
|
478
|
+
"url": "http://jumpbox.internal:8001/sse"
|
|
479
|
+
},
|
|
480
|
+
"codex": {
|
|
481
|
+
"type": "sse",
|
|
482
|
+
"url": "http://jumpbox.internal:8002/sse"
|
|
483
|
+
},
|
|
484
|
+
"playwright": {
|
|
485
|
+
"type": "sse",
|
|
486
|
+
"url": "http://jumpbox.internal:8003/sse"
|
|
487
|
+
},
|
|
488
|
+
"vibe_kanban": {
|
|
489
|
+
"type": "sse",
|
|
490
|
+
"url": "http://jumpbox.internal:8004/sse"
|
|
491
|
+
},
|
|
492
|
+
"context7": {
|
|
493
|
+
"type": "sse",
|
|
494
|
+
"url": "http://jumpbox.internal:8005/sse"
|
|
495
|
+
},
|
|
496
|
+
"drawio": {
|
|
497
|
+
"type": "sse",
|
|
498
|
+
"url": "http://jumpbox.internal:8006/sse"
|
|
499
|
+
},
|
|
500
|
+
"github": {
|
|
501
|
+
"type": "http",
|
|
502
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
503
|
+
"headers": {
|
|
504
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
505
|
+
}
|
|
506
|
+
}
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
```
|
|
510
|
+
|
|
511
|
+
### オプションB: mcp-proxyで統合(1ポートに集約)
|
|
512
|
+
|
|
513
|
+
**中央サーバーで:**
|
|
514
|
+
```bash
|
|
515
|
+
mcp-proxy --port=8000 --allow-origin '*' \
|
|
516
|
+
--named-server serena 'uvx --from git+https://github.com/oraios/serena serena start-mcp-server --context claude-code' \
|
|
517
|
+
--named-server codex 'codex mcp-server' \
|
|
518
|
+
--named-server playwright 'npx -y @playwright/mcp --isolated' \
|
|
519
|
+
--named-server vibe_kanban 'npx -y vibe-kanban@latest --mcp' \
|
|
520
|
+
--named-server context7 'npx -y @upstash/context7-mcp' \
|
|
521
|
+
--named-server drawio 'npx -y @drawio/mcp@latest'
|
|
522
|
+
```
|
|
523
|
+
|
|
524
|
+
**`.mcp.json`:**
|
|
525
|
+
```json
|
|
526
|
+
{
|
|
527
|
+
"mcpServers": {
|
|
528
|
+
"serena": {
|
|
529
|
+
"type": "sse",
|
|
530
|
+
"url": "http://jumpbox.internal:8000/servers/serena/sse"
|
|
531
|
+
},
|
|
532
|
+
"codex": {
|
|
533
|
+
"type": "sse",
|
|
534
|
+
"url": "http://jumpbox.internal:8000/servers/codex/sse"
|
|
535
|
+
},
|
|
536
|
+
"playwright": {
|
|
537
|
+
"type": "sse",
|
|
538
|
+
"url": "http://jumpbox.internal:8000/servers/playwright/sse"
|
|
539
|
+
},
|
|
540
|
+
"vibe_kanban": {
|
|
541
|
+
"type": "sse",
|
|
542
|
+
"url": "http://jumpbox.internal:8000/servers/vibe_kanban/sse"
|
|
543
|
+
},
|
|
544
|
+
"context7": {
|
|
545
|
+
"type": "sse",
|
|
546
|
+
"url": "http://jumpbox.internal:8000/servers/context7/sse"
|
|
547
|
+
},
|
|
548
|
+
"drawio": {
|
|
549
|
+
"type": "sse",
|
|
550
|
+
"url": "http://jumpbox.internal:8000/servers/drawio/sse"
|
|
551
|
+
},
|
|
552
|
+
"github": {
|
|
553
|
+
"type": "http",
|
|
554
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
555
|
+
"headers": {
|
|
556
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
### オプションC: ハイブリッド(軽量stdioは維持、重いサーバーのみ中央化)
|
|
564
|
+
|
|
565
|
+
**軽量なサーバーはstdioのまま維持:**
|
|
566
|
+
- vibe_kanban(軽量)
|
|
567
|
+
- context7(軽量)
|
|
568
|
+
- drawio(軽量)
|
|
569
|
+
- github(すでにリモート)
|
|
570
|
+
|
|
571
|
+
**重いサーバーのみ中央化:**
|
|
572
|
+
- serena(LSPサーバー、重い)
|
|
573
|
+
- codex(重い可能性)
|
|
574
|
+
- playwright(ブラウザインスタンス、リソース消費大)
|
|
575
|
+
|
|
576
|
+
**`.mcp.json`:**
|
|
577
|
+
```json
|
|
578
|
+
{
|
|
579
|
+
"mcpServers": {
|
|
580
|
+
"serena": {
|
|
581
|
+
"type": "sse",
|
|
582
|
+
"url": "http://jumpbox.internal:8001/sse"
|
|
583
|
+
},
|
|
584
|
+
"codex": {
|
|
585
|
+
"type": "sse",
|
|
586
|
+
"url": "http://jumpbox.internal:8002/sse"
|
|
587
|
+
},
|
|
588
|
+
"playwright": {
|
|
589
|
+
"type": "sse",
|
|
590
|
+
"url": "http://jumpbox.internal:8003/sse"
|
|
591
|
+
},
|
|
592
|
+
"vibe_kanban": {
|
|
593
|
+
"command": "npx",
|
|
594
|
+
"args": ["-y", "vibe-kanban@latest", "--mcp"]
|
|
595
|
+
},
|
|
596
|
+
"context7": {
|
|
597
|
+
"command": "npx",
|
|
598
|
+
"args": ["-y", "@upstash/context7-mcp"]
|
|
599
|
+
},
|
|
600
|
+
"drawio": {
|
|
601
|
+
"command": "npx",
|
|
602
|
+
"args": ["-y", "@drawio/mcp@latest"]
|
|
603
|
+
},
|
|
604
|
+
"github": {
|
|
605
|
+
"type": "http",
|
|
606
|
+
"url": "https://api.githubcopilot.com/mcp/",
|
|
607
|
+
"headers": {
|
|
608
|
+
"Authorization": "Bearer ${GITHUB_TOKEN}"
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
```
|
|
614
|
+
|
|
615
|
+
## 6. セキュリティ・運用上の考慮事項
|
|
616
|
+
|
|
617
|
+
### 認証・認可
|
|
618
|
+
|
|
619
|
+
- **SSEサーバーは認証なし**の場合、アクセス可能な全員がMCPツールを使用可能
|
|
620
|
+
- Supergatewayは`--cors`オプションでアクセス制御が必要
|
|
621
|
+
- mcp-proxyは`--headers`でBearerトークン等を設定可能
|
|
622
|
+
- 本番環境では**VPN・ファイアウォール・リバースプロキシ**での保護を推奨
|
|
623
|
+
|
|
624
|
+
### ログ・監査
|
|
625
|
+
|
|
626
|
+
- Supergateway: `--logLevel info|none` でログ制御
|
|
627
|
+
- mcp-proxy: 標準出力にログ出力
|
|
628
|
+
- 中央サーバーのログを監視することで、全チームの操作を追跡可能
|
|
629
|
+
|
|
630
|
+
### 可用性
|
|
631
|
+
|
|
632
|
+
- 中央サーバーがSPOF(単一障害点)になる
|
|
633
|
+
- Docker + systemd / supervisord等でプロセス管理を推奨
|
|
634
|
+
- ヘルスチェックエンドポイント(`--healthEndpoint`)の活用
|
|
635
|
+
|
|
636
|
+
### パフォーマンス
|
|
637
|
+
|
|
638
|
+
- ネットワークレイテンシが追加される(特にSerenaのLSP操作)
|
|
639
|
+
- Playwrightは`--isolated`モードで独立ブラウザが必要な場合、中央化のメリットは限定的
|
|
640
|
+
- リソース競合(複数ユーザーが同時にPlaywrightブラウザを使用)を考慮
|
|
641
|
+
|
|
642
|
+
## 7. まとめと次のステップ
|
|
643
|
+
|
|
644
|
+
### 結論
|
|
645
|
+
|
|
646
|
+
1. **Claude Codeは `.mcp.json` でstdio, SSE, HTTPの3タイプをサポート**
|
|
647
|
+
2. **SSEは非推奨**だが、stdio→SSE変換の用途では現在も実用的
|
|
648
|
+
3. **Supergateway(npxのみ)とmcp-proxy(uv/pipx)が主要な変換ツール**
|
|
649
|
+
4. **真の共有(プロセス共有)には中央サーバー化が必要**
|
|
650
|
+
5. **現在のプロジェクトは6/7サーバーがstdio**で、複数インスタンス起動時にリソース重複
|
|
651
|
+
|
|
652
|
+
### 推奨アクションプラン
|
|
653
|
+
|
|
654
|
+
| 優先度 | アクション | 内容 |
|
|
655
|
+
|--------|------------|------|
|
|
656
|
+
| 🔴 高 | **重量級サーバーの中央化** | Serena, Codex, Playwrightを中央サーバー(Supergateway)で公開 |
|
|
657
|
+
| 🟡 中 | **`.mcp.json` の更新** | SSE URLを設定し、プロジェクトスコープで共有 |
|
|
658
|
+
| 🟢 低 | **軽量サーバーの評価** | vibe_kanban, context7, drawioも中央化するか、stdioのまま維持するか判断 |
|
|
659
|
+
| 🔵 将来 | **エンタープライズ対応** | Claude.aiアカウント連携 or AWS Guidanceに基づくクラウドデプロイ |
|
|
660
|
+
|
|
661
|
+
### 参考リンク
|
|
662
|
+
|
|
663
|
+
- [Claude Code MCP公式ドキュメント](https://code.claude.com/docs/en/mcp)
|
|
664
|
+
- [Supergateway GitHub](https://github.com/goodatlas/mcp-supergateway)
|
|
665
|
+
- [mcp-proxy GitHub](https://github.com/sparfenyuk/mcp-proxy)
|
|
666
|
+
- [MCP仕様(Architecture)](https://modelcontextprotocol.io/specification/2025-06-18/architecture/index)
|
|
667
|
+
- [AWS MCP Server Guidance](https://aws.amazon.com/solutions/guidance/deploying-model-context-protocol-servers-on-aws/)
|
|
668
|
+
|
|
669
|
+
---
|
|
670
|
+
|
|
671
|
+
**調査完了日**: 2026-02-27
|
|
672
|
+
**調査者**: Claude Code Explore Agent
|