mcp-council-server 4.0.0 → 4.1.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/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 riflxz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -166,16 +166,17 @@ Six collections in `./data/`:
166
166
  ## Installation
167
167
 
168
168
  ```bash
169
- # Install from npm
169
+ # Install globally
170
170
  npm install -g mcp-council-server
171
171
 
172
- # Or run directly with npx
173
- npx mcp-council-server
172
+ # Or run directly with npx (fast — bundled single file, no npm install needed)
173
+ npx -y mcp-council-server
174
174
 
175
175
  # Or clone and run locally
176
176
  git clone https://github.com/riflxz/mcp-council-server.git
177
177
  cd mcp-council-server
178
178
  npm install
179
+ npm run build
179
180
  npm start
180
181
  ```
181
182
 
@@ -188,51 +189,125 @@ npm start
188
189
 
189
190
  ## Quick Start
190
191
 
191
- ### 1. Start the server
192
+ ### 1. Integrasi dengan opencode (recommended)
192
193
 
193
- ```bash
194
- npm start
195
- ```
196
-
197
- The server listens on **stdin/stdout** using the MCP stdio transport protocol.
198
-
199
- ### 2. Connect with MCP Inspector
200
-
201
- ```bash
202
- npm run inspect
203
- ```
204
-
205
- ### 3. Or use with any MCP client (e.g., opencode, Claude Desktop)
206
-
207
- Add to your MCP configuration:
194
+ Di `~/.config/opencode/opencode.json`, tambahkan:
208
195
 
209
196
  ```json
210
197
  {
211
- "mcpServers": {
198
+ "mcp": {
212
199
  "council": {
213
- "command": "node",
214
- "args": ["/path/to/mcp-council-server/src/index.js"]
200
+ "type": "local",
201
+ "command": ["npx", "-y", "mcp-council-server"]
215
202
  }
216
203
  }
217
204
  }
218
205
  ```
219
206
 
220
- ### 4. Make your first call
207
+ Atau pake path lokal setelah clone:
221
208
 
222
209
  ```json
223
210
  {
224
- "jsonrpc": "2.0",
225
- "id": 1,
226
- "method": "tools/call",
227
- "params": {
228
- "name": "council_init",
229
- "arguments": {
230
- "task": "Migrasi database MySQL ke PostgreSQL. 2GB data, downtime <30 menit. Handling JSON dan ENUM types."
211
+ "mcp": {
212
+ "council": {
213
+ "type": "local",
214
+ "command": ["node", "/path/to/mcp-council-server/dist/bundle.cjs"]
231
215
  }
232
216
  }
233
217
  }
234
218
  ```
235
219
 
220
+ Lalu restart opencode. Council akan otomatis terdeteksi sebagai MCP server.
221
+
222
+ ### 2. Atau via CLI (MCP Inspector)
223
+
224
+ ```bash
225
+ git clone https://github.com/riflxz/mcp-council-server.git
226
+ cd mcp-council-server
227
+ npm install
228
+
229
+ # Start dengan MCP Inspector
230
+ npm run inspect
231
+
232
+ # Atau langsung
233
+ npm start
234
+ ```
235
+
236
+ ### 3. Contoh Sesi Lengkap — Migrasi Database
237
+
238
+ Ini adalah contoh sesi nyata menggunakan Council + opencode. Setiap langkah menunjukkan tool yang dipanggil dan respons yang diterima AI.
239
+
240
+ #### Step 1: Init — Mulai sesi
241
+
242
+ AI memanggil `council_init` dengan task user:
243
+
244
+ ```
245
+ Task: "Migrasi database MySQL ke PostgreSQL. 2GB data,
246
+ downtime <30 menit. Handling JSON dan ENUM types."
247
+ ```
248
+
249
+ **Response dari Council:**
250
+ ```
251
+ complexity: moderate (49/100) → 5-phase pipeline
252
+ persona: Systems Analyst
253
+ fase aktif: decompile
254
+ ```
255
+
256
+ AI sekarang tahu: harus memulai fase **DECOMPILE** sebagai **Systems Analyst**.
257
+
258
+ #### Step 2: Decompile — Analisa masalah
259
+
260
+ AI bekerja sebagai **Systems Analyst**, menghasilkan output fase decompile, lalu memanggil `council_save`:
261
+
262
+ ```
263
+ sessionId: "xxx"
264
+ phase: "decompile"
265
+ output: {
266
+ summary: "Tiga sub-masalah: strategi migrasi 2GB data...",
267
+ decisions: [...],
268
+ constraints: ["downtime_30_menit", "data_2GB", ...],
269
+ claims: [{ text: "pg_dump cocok untuk 2GB", certainty: "confirmed", ... }],
270
+ knowledgeBoundary: { whatIKnow: [...], whatIAssume: [...], ... }
271
+ }
272
+ ```
273
+
274
+ **Response Council:**
275
+ ```
276
+ score: 93 (excellent) ✓
277
+ canProceed: true
278
+ nextPhase: design
279
+ handoff: Systems Analyst → Solution Architect
280
+ ```
281
+
282
+ #### Step 3–6: Lanjut ke fase berikutnya
283
+
284
+ Council mengunci fase yang sudah selesai dan membuka fase berikutnya. AI mengikuti persona baru setiap fase:
285
+
286
+ | Fase | Persona | Contoh Output |
287
+ |------|---------|--------------|
288
+ | **design** | Solution Architect | 2 approaches dievaluasi, tradeoffs, rekomendasi |
289
+ | **critique** | Security & Quality Auditor | Vulnerabilities, riskLevel, mitigations |
290
+ | **synthesis** | Implementation Engineer | Langkah implementasi, test plan, warnings |
291
+ | **verify** | Quality Assurance | Checks, pass/fail count, keputusan APPROVED/REJECTED |
292
+
293
+ #### Step 7: Final score
294
+
295
+ Setelah semua fase selesai, AI memanggil `council_score`:
296
+
297
+ ```
298
+ overall: 87 (good)
299
+ quality: 89 | adaptability: 85 | transparency: 100 | agentic: 71
300
+ ```
301
+
302
+ ### 4. Troubleshooting
303
+
304
+ | Masalah | Solusi |
305
+ |---------|--------|
306
+ | **Server timeout** | Jika opencode melaporkan timeout, gunakan path lokal (`node /path/src/index.js`) bukan `npx`. Npx perlu download package dulu yang bisa lambat. |
307
+ | **Data directory error** | Pastikan working directory bisa di-write. Server membuat folder `./data/` untuk menyimpan session JSON. |
308
+ | **Tool not found** | Restart opencode setelah mengubah `opencode.json`. Jalankan `tools/list` untuk verifikasi. |
309
+ | **Session tiba-tiba hilang** | Session disimpan di `./data/` sebagai JSON file. Jika folder terhapus, session hilang. |
310
+
236
311
  ---
237
312
 
238
313
  ## MCP Tools Reference