kollabor 0.4.9__py3-none-any.whl → 0.4.15__py3-none-any.whl

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.
Files changed (192) hide show
  1. agents/__init__.py +2 -0
  2. agents/coder/__init__.py +0 -0
  3. agents/coder/agent.json +4 -0
  4. agents/coder/api-integration.md +2150 -0
  5. agents/coder/cli-pretty.md +765 -0
  6. agents/coder/code-review.md +1092 -0
  7. agents/coder/database-design.md +1525 -0
  8. agents/coder/debugging.md +1102 -0
  9. agents/coder/dependency-management.md +1397 -0
  10. agents/coder/git-workflow.md +1099 -0
  11. agents/coder/refactoring.md +1454 -0
  12. agents/coder/security-hardening.md +1732 -0
  13. agents/coder/system_prompt.md +1448 -0
  14. agents/coder/tdd.md +1367 -0
  15. agents/creative-writer/__init__.py +0 -0
  16. agents/creative-writer/agent.json +4 -0
  17. agents/creative-writer/character-development.md +1852 -0
  18. agents/creative-writer/dialogue-craft.md +1122 -0
  19. agents/creative-writer/plot-structure.md +1073 -0
  20. agents/creative-writer/revision-editing.md +1484 -0
  21. agents/creative-writer/system_prompt.md +690 -0
  22. agents/creative-writer/worldbuilding.md +2049 -0
  23. agents/data-analyst/__init__.py +30 -0
  24. agents/data-analyst/agent.json +4 -0
  25. agents/data-analyst/data-visualization.md +992 -0
  26. agents/data-analyst/exploratory-data-analysis.md +1110 -0
  27. agents/data-analyst/pandas-data-manipulation.md +1081 -0
  28. agents/data-analyst/sql-query-optimization.md +881 -0
  29. agents/data-analyst/statistical-analysis.md +1118 -0
  30. agents/data-analyst/system_prompt.md +928 -0
  31. agents/default/__init__.py +0 -0
  32. agents/default/agent.json +4 -0
  33. agents/default/dead-code.md +794 -0
  34. agents/default/explore-agent-system.md +585 -0
  35. agents/default/system_prompt.md +1448 -0
  36. agents/kollabor/__init__.py +0 -0
  37. agents/kollabor/analyze-plugin-lifecycle.md +175 -0
  38. agents/kollabor/analyze-terminal-rendering.md +388 -0
  39. agents/kollabor/code-review.md +1092 -0
  40. agents/kollabor/debug-mcp-integration.md +521 -0
  41. agents/kollabor/debug-plugin-hooks.md +547 -0
  42. agents/kollabor/debugging.md +1102 -0
  43. agents/kollabor/dependency-management.md +1397 -0
  44. agents/kollabor/git-workflow.md +1099 -0
  45. agents/kollabor/inspect-llm-conversation.md +148 -0
  46. agents/kollabor/monitor-event-bus.md +558 -0
  47. agents/kollabor/profile-performance.md +576 -0
  48. agents/kollabor/refactoring.md +1454 -0
  49. agents/kollabor/system_prompt copy.md +1448 -0
  50. agents/kollabor/system_prompt.md +757 -0
  51. agents/kollabor/trace-command-execution.md +178 -0
  52. agents/kollabor/validate-config.md +879 -0
  53. agents/research/__init__.py +0 -0
  54. agents/research/agent.json +4 -0
  55. agents/research/architecture-mapping.md +1099 -0
  56. agents/research/codebase-analysis.md +1077 -0
  57. agents/research/dependency-audit.md +1027 -0
  58. agents/research/performance-profiling.md +1047 -0
  59. agents/research/security-review.md +1359 -0
  60. agents/research/system_prompt.md +492 -0
  61. agents/technical-writer/__init__.py +0 -0
  62. agents/technical-writer/agent.json +4 -0
  63. agents/technical-writer/api-documentation.md +2328 -0
  64. agents/technical-writer/changelog-management.md +1181 -0
  65. agents/technical-writer/readme-writing.md +1360 -0
  66. agents/technical-writer/style-guide.md +1410 -0
  67. agents/technical-writer/system_prompt.md +653 -0
  68. agents/technical-writer/tutorial-creation.md +1448 -0
  69. core/__init__.py +0 -2
  70. core/application.py +343 -88
  71. core/cli.py +229 -10
  72. core/commands/menu_renderer.py +463 -59
  73. core/commands/registry.py +14 -9
  74. core/commands/system_commands.py +2461 -14
  75. core/config/loader.py +151 -37
  76. core/config/service.py +18 -6
  77. core/events/bus.py +29 -9
  78. core/events/executor.py +205 -75
  79. core/events/models.py +27 -8
  80. core/fullscreen/command_integration.py +20 -24
  81. core/fullscreen/components/__init__.py +10 -1
  82. core/fullscreen/components/matrix_components.py +1 -2
  83. core/fullscreen/components/space_shooter_components.py +654 -0
  84. core/fullscreen/plugin.py +5 -0
  85. core/fullscreen/renderer.py +52 -13
  86. core/fullscreen/session.py +52 -15
  87. core/io/__init__.py +29 -5
  88. core/io/buffer_manager.py +6 -1
  89. core/io/config_status_view.py +7 -29
  90. core/io/core_status_views.py +267 -347
  91. core/io/input/__init__.py +25 -0
  92. core/io/input/command_mode_handler.py +711 -0
  93. core/io/input/display_controller.py +128 -0
  94. core/io/input/hook_registrar.py +286 -0
  95. core/io/input/input_loop_manager.py +421 -0
  96. core/io/input/key_press_handler.py +502 -0
  97. core/io/input/modal_controller.py +1011 -0
  98. core/io/input/paste_processor.py +339 -0
  99. core/io/input/status_modal_renderer.py +184 -0
  100. core/io/input_errors.py +5 -1
  101. core/io/input_handler.py +211 -2452
  102. core/io/key_parser.py +7 -0
  103. core/io/layout.py +15 -3
  104. core/io/message_coordinator.py +111 -2
  105. core/io/message_renderer.py +129 -4
  106. core/io/status_renderer.py +147 -607
  107. core/io/terminal_renderer.py +97 -51
  108. core/io/terminal_state.py +21 -4
  109. core/io/visual_effects.py +816 -165
  110. core/llm/agent_manager.py +1063 -0
  111. core/llm/api_adapters/__init__.py +44 -0
  112. core/llm/api_adapters/anthropic_adapter.py +432 -0
  113. core/llm/api_adapters/base.py +241 -0
  114. core/llm/api_adapters/openai_adapter.py +326 -0
  115. core/llm/api_communication_service.py +167 -113
  116. core/llm/conversation_logger.py +322 -16
  117. core/llm/conversation_manager.py +556 -30
  118. core/llm/file_operations_executor.py +84 -32
  119. core/llm/llm_service.py +934 -103
  120. core/llm/mcp_integration.py +541 -57
  121. core/llm/message_display_service.py +135 -18
  122. core/llm/plugin_sdk.py +1 -2
  123. core/llm/profile_manager.py +1183 -0
  124. core/llm/response_parser.py +274 -56
  125. core/llm/response_processor.py +16 -3
  126. core/llm/tool_executor.py +6 -1
  127. core/logging/__init__.py +2 -0
  128. core/logging/setup.py +34 -6
  129. core/models/resume.py +54 -0
  130. core/plugins/__init__.py +4 -2
  131. core/plugins/base.py +127 -0
  132. core/plugins/collector.py +23 -161
  133. core/plugins/discovery.py +37 -3
  134. core/plugins/factory.py +6 -12
  135. core/plugins/registry.py +5 -17
  136. core/ui/config_widgets.py +128 -28
  137. core/ui/live_modal_renderer.py +2 -1
  138. core/ui/modal_actions.py +5 -0
  139. core/ui/modal_overlay_renderer.py +0 -60
  140. core/ui/modal_renderer.py +268 -7
  141. core/ui/modal_state_manager.py +29 -4
  142. core/ui/widgets/base_widget.py +7 -0
  143. core/updates/__init__.py +10 -0
  144. core/updates/version_check_service.py +348 -0
  145. core/updates/version_comparator.py +103 -0
  146. core/utils/config_utils.py +685 -526
  147. core/utils/plugin_utils.py +1 -1
  148. core/utils/session_naming.py +111 -0
  149. fonts/LICENSE +21 -0
  150. fonts/README.md +46 -0
  151. fonts/SymbolsNerdFont-Regular.ttf +0 -0
  152. fonts/SymbolsNerdFontMono-Regular.ttf +0 -0
  153. fonts/__init__.py +44 -0
  154. {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/METADATA +54 -4
  155. kollabor-0.4.15.dist-info/RECORD +228 -0
  156. {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/top_level.txt +2 -0
  157. plugins/agent_orchestrator/__init__.py +39 -0
  158. plugins/agent_orchestrator/activity_monitor.py +181 -0
  159. plugins/agent_orchestrator/file_attacher.py +77 -0
  160. plugins/agent_orchestrator/message_injector.py +135 -0
  161. plugins/agent_orchestrator/models.py +48 -0
  162. plugins/agent_orchestrator/orchestrator.py +403 -0
  163. plugins/agent_orchestrator/plugin.py +976 -0
  164. plugins/agent_orchestrator/xml_parser.py +191 -0
  165. plugins/agent_orchestrator_plugin.py +9 -0
  166. plugins/enhanced_input/box_styles.py +1 -0
  167. plugins/enhanced_input/color_engine.py +19 -4
  168. plugins/enhanced_input/config.py +2 -2
  169. plugins/enhanced_input_plugin.py +61 -11
  170. plugins/fullscreen/__init__.py +6 -2
  171. plugins/fullscreen/example_plugin.py +1035 -222
  172. plugins/fullscreen/setup_wizard_plugin.py +592 -0
  173. plugins/fullscreen/space_shooter_plugin.py +131 -0
  174. plugins/hook_monitoring_plugin.py +436 -78
  175. plugins/query_enhancer_plugin.py +66 -30
  176. plugins/resume_conversation_plugin.py +1494 -0
  177. plugins/save_conversation_plugin.py +98 -32
  178. plugins/system_commands_plugin.py +70 -56
  179. plugins/tmux_plugin.py +154 -78
  180. plugins/workflow_enforcement_plugin.py +94 -92
  181. system_prompt/default.md +952 -886
  182. core/io/input_mode_manager.py +0 -402
  183. core/io/modal_interaction_handler.py +0 -315
  184. core/io/raw_input_processor.py +0 -946
  185. core/storage/__init__.py +0 -5
  186. core/storage/state_manager.py +0 -84
  187. core/ui/widget_integration.py +0 -222
  188. core/utils/key_reader.py +0 -171
  189. kollabor-0.4.9.dist-info/RECORD +0 -128
  190. {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/WHEEL +0 -0
  191. {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/entry_points.txt +0 -0
  192. {kollabor-0.4.9.dist-info → kollabor-0.4.15.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,521 @@
1
+ <!-- MCP Integration Troubleshooting skill - diagnose and fix MCP server connections -->
2
+
3
+ skill name: debug-mcp-integration
4
+
5
+ purpose:
6
+ diagnose mcp (model context protocol) server connection issues,
7
+ verify tool availability, and debug tool execution failures.
8
+ mcp enables external tools and services to integrate with the llm.
9
+
10
+ when to use:
11
+ - mcp tools not appearing in available tools list
12
+ - mcp server fails to start or connect
13
+ - tool execution returns errors
14
+ - server responds but tools are not registered
15
+ - need to verify mcp configuration is correct
16
+
17
+
18
+ methodology:
19
+
20
+ phase 1: verify mcp configuration
21
+ phase 2: test server connectivity
22
+ phase 3: inspect tool registration
23
+ phase 4: debug tool execution
24
+ phase 5: analyze logs and errors
25
+
26
+
27
+ phase 1: verify mcp configuration
28
+
29
+
30
+ check mcp settings file locations
31
+
32
+ mcp configuration is loaded from two locations (local overrides global):
33
+
34
+ [1] global: ~/.kollabor-cli/mcp/mcp_settings.json
35
+ [2] local: .kollabor-cli/mcp/mcp_settings.json (takes priority)
36
+
37
+ verify local config exists:
38
+ <read><file>.kollabor-cli/mcp/mcp_settings.json</file></read>
39
+
40
+ verify global config exists:
41
+ <terminal>cat ~/.kollabor-cli/mcp/mcp_settings.json</terminal>
42
+
43
+ list mcp directory contents:
44
+ <terminal>find .kollabor-cli/mcp -type f 2>/dev/null</terminal>
45
+ <terminal>find ~/.kollabor-cli/mcp -type f 2>/dev/null</terminal>
46
+
47
+
48
+ understand mcp settings structure
49
+
50
+ valid mcp_settings.json format:
51
+ {
52
+ "servers": {
53
+ "server-name": {
54
+ "type": "stdio",
55
+ "command": "server-executable --arg1 --arg2",
56
+ "enabled": true
57
+ }
58
+ }
59
+ }
60
+
61
+ required fields:
62
+ - type: must be "stdio" (http not yet implemented)
63
+ - command: full command to start the server
64
+ - enabled: true/false (optional, defaults to true)
65
+
66
+ common configuration errors:
67
+ [error] missing "type" field
68
+ [error] command path not executable
69
+ [error] command requires absolute path
70
+ [error] enabled: false (server disabled)
71
+ [error] malformed json
72
+
73
+
74
+ validate configuration syntax
75
+
76
+ check json validity:
77
+ <terminal>python -c "import json; json.load(open('.kollabor-cli/mcp/mcp_settings.json'))"</terminal>
78
+
79
+ check for syntax errors:
80
+ <terminal>python -m json.tool .kollabor-cli/mcp/mcp_settings.json</terminal>
81
+
82
+ verify each server entry:
83
+ <terminal>grep -A 5 '"servers"' .kollabor-cli/mcp/mcp_settings.json</terminal>
84
+
85
+
86
+ verify server commands are executable
87
+
88
+ for each server in config, test if command exists:
89
+ <terminal>which <server-executable></terminal>
90
+
91
+ example for npx-based servers:
92
+ <terminal>which npx</terminal>
93
+ <terminal>npx --version</terminal>
94
+
95
+ example for python-based servers:
96
+ <terminal>which python</terminal>
97
+ <terminal>python -c "import <server-module>"</terminal>
98
+
99
+
100
+ phase 2: test server connectivity
101
+
102
+
103
+ manual server connection test
104
+
105
+ test starting the server manually:
106
+ <terminal><server-command-from-config></terminal>
107
+
108
+ if server starts:
109
+ - check for initialization message
110
+ - look for protocol version in output
111
+ - verify it responds to json-rpc
112
+
113
+ if server fails to start:
114
+ - check command syntax
115
+ - verify dependencies installed
116
+ - check for missing environment variables
117
+
118
+
119
+ test mcp handshake using python
120
+
121
+ create test script to verify mcp protocol:
122
+ <terminal>python -c "
123
+ import asyncio
124
+ import json
125
+ import sys
126
+
127
+ async def test_mcp():
128
+ cmd = '<server-command-from-config>'
129
+ proc = await asyncio.create_subprocess_exec(
130
+ *cmd.split(),
131
+ stdin=asyncio.subprocess.PIPE,
132
+ stdout=asyncio.subprocess.PIPE,
133
+ stderr=asyncio.subprocess.PIPE
134
+ )
135
+
136
+ # send initialize request
137
+ init_req = {
138
+ 'jsonrpc': '2.0',
139
+ 'id': '1',
140
+ 'method': 'initialize',
141
+ 'params': {
142
+ 'protocolVersion': '2024-11-05',
143
+ 'capabilities': {},
144
+ 'clientInfo': {'name': 'test', 'version': '1.0'}
145
+ }
146
+ }
147
+
148
+ proc.stdin.write(json.dumps(init_req).encode() + b'\n')
149
+ await proc.stdin.drain()
150
+
151
+ # read response
152
+ response = await asyncio.wait_for(proc.stdout.readline(), timeout=5)
153
+ print(response.decode())
154
+
155
+ proc.terminate()
156
+ await proc.wait()
157
+
158
+ asyncio.run(test_mcp())
159
+ "</terminal>
160
+
161
+
162
+ verify server responses
163
+
164
+ expected initialize response:
165
+ {
166
+ "jsonrpc": "2.0",
167
+ "id": "1",
168
+ "result": {
169
+ "protocolVersion": "2024-11-05",
170
+ "capabilities": {...},
171
+ "serverInfo": {...}
172
+ }
173
+ }
174
+
175
+ error responses indicate:
176
+ - protocol mismatch
177
+ - server not mcp-compliant
178
+ - invalid client info
179
+
180
+
181
+ phase 3: inspect tool registration
182
+
183
+
184
+ check loaded mcp integration
185
+
186
+ read the integration code:
187
+ <read><file>core/llm/mcp_integration.py</file><lines>1-100</lines></read>
188
+
189
+ check initialization logs:
190
+ <terminal>grep -i "mcp" .kollabor-cli/logs/kollabor.log | tail -20</terminal>
191
+
192
+ verify servers loaded:
193
+ <terminal>grep "Loaded.*MCP server" .kollabor-cli/logs/kollabor.log</terminal>
194
+
195
+ verify tools registered:
196
+ <terminal>grep "Registered MCP tool" .kollabor-cli/logs/kollabor.log</terminal>
197
+
198
+
199
+ check tool registry state
200
+
201
+ the tool_registry stores discovered tools:
202
+ - key: tool name
203
+ - value: {server, definition, enabled}
204
+
205
+ view registered tools in logs:
206
+ <terminal>grep "tools from.*server" .kollabor-cli/logs/kollabor.log</terminal>
207
+
208
+ check tool count:
209
+ <terminal>grep "Got.*tools from" .kollabor-cli/logs/kollabor.log</terminal>
210
+
211
+
212
+ test tool discovery
213
+
214
+ trigger tool discovery manually:
215
+ <terminal>python -c "
216
+ import asyncio
217
+ from core.llm.mcp_integration import MCPIntegration
218
+
219
+ async def test():
220
+ mcp = MCPIntegration()
221
+ print(f'Configured servers: {list(mcp.mcp_servers.keys())}')
222
+ discovered = await mcp.discover_mcp_servers()
223
+ print(f'Discovered: {json.dumps(discovered, indent=2)}')
224
+ print(f'Tool registry: {list(mcp.tool_registry.keys())}')
225
+ await mcp.shutdown()
226
+
227
+ asyncio.run(test())
228
+ "</terminal>
229
+
230
+
231
+ phase 4: debug tool execution
232
+
233
+
234
+ check tool executor
235
+
236
+ read tool executor code:
237
+ <read><file>core/llm/tool_executor.py</file><lines>312-374</lines></read>
238
+
239
+ key execution flow:
240
+ 1. llm requests tool call
241
+ 2. tool_executor routes to _execute_mcp_tool
242
+ 3. mcp_integration.call_mcp_tool invoked
243
+ 4. connection.check -> tool call on server
244
+ 5. result formatted and returned
245
+
246
+
247
+ verify mcp tool call flow
248
+
249
+ check mcp call_mcp_tool:
250
+ <read><file>core/llm/mcp_integration.py</file><lines>436-477</lines></read>
251
+
252
+ verify connection is active:
253
+ <terminal>grep "server_connections" .kollabor-cli/logs/kollabor.log</terminal>
254
+
255
+ check for reconnection attempts:
256
+ <terminal>grep "reconnect\|No active connection" .kollabor-cli/logs/kollabor.log</terminal>
257
+
258
+
259
+ test individual tool call
260
+
261
+ test a specific tool manually:
262
+ <terminal>python -c "
263
+ import asyncio
264
+ import json
265
+ from core.llm.mcp_integration import MCPIntegration
266
+
267
+ async def test_tool():
268
+ mcp = MCPIntegration()
269
+ await mcp.discover_mcp_servers()
270
+
271
+ tool_name = '<tool-name-to-test>'
272
+ arguments = {} # add required args
273
+
274
+ result = await mcp.call_mcp_tool(tool_name, arguments)
275
+ print(f'Result: {json.dumps(result, indent=2)}')
276
+
277
+ await mcp.shutdown()
278
+
279
+ asyncio.run(test_tool())
280
+ "</terminal>
281
+
282
+
283
+ phase 5: analyze logs and errors
284
+
285
+
286
+ common mcp error patterns
287
+
288
+ error: "failed to start mcp server"
289
+ causes:
290
+ - command not found
291
+ - missing dependencies
292
+ - permission denied
293
+ - invalid command syntax
294
+
295
+ debug:
296
+ <terminal>which <executable-from-command></terminal>
297
+ <terminal><command> --help</terminal>
298
+ <terminal>ls -la $(which <executable>)</terminal>
299
+
300
+
301
+ error: "initialization failed"
302
+ causes:
303
+ - server not mcp-compliant
304
+ - protocol version mismatch
305
+ - server crashed on startup
306
+ - timeout waiting for response
307
+
308
+ debug:
309
+ <terminal>grep "initialize.*failed" .kollabor-cli/logs/kollabor.log</terminal>
310
+ <terminal>grep -A 5 -B 5 "server.*initialized" .kollabor-cli/logs/kollabor.log</terminal>
311
+
312
+
313
+ error: "tool not found"
314
+ causes:
315
+ - tool name mismatch
316
+ - server not connected
317
+ - tool not registered
318
+ - server disabled
319
+
320
+ debug:
321
+ <terminal>grep "tool_registry" .kollabor-cli/logs/kollabor.log</terminal>
322
+ <terminal>python -c "from core.llm.mcp_integration import MCPIntegration; import asyncio; asyncio.run(MCPIntegration().discover_mcp_servers())"</terminal>
323
+
324
+
325
+ error: "server not initialized"
326
+ causes:
327
+ - handshake not completed
328
+ - connection dropped
329
+ - server crashed after start
330
+
331
+ debug:
332
+ <terminal>grep "initialized.*True" .kollabor-cli/logs/kollabor.log</terminal>
333
+ <terminal>grep "notifications/initialized" .kollabor-cli/logs/kollabor.log</terminal>
334
+
335
+
336
+ error: "timeout waiting for response"
337
+ causes:
338
+ - server slow to respond
339
+ - tool execution taking too long
340
+ - server hung
341
+ - network issue (for http servers)
342
+
343
+ debug:
344
+ check default timeout in mcp_integration.py:413
345
+ verify server responds within timeout
346
+ check for resource constraints
347
+
348
+
349
+ enable detailed mcp logging
350
+
351
+ add debug logging to investigate:
352
+ <terminal>python -c "
353
+ import logging
354
+ logging.basicConfig(level=logging.DEBUG)
355
+ logger = logging.getLogger('core.llm.mcp_integration')
356
+ logger.setLevel(logging.DEBUG)
357
+ "</terminal>
358
+
359
+ run with debug output:
360
+ <terminal>python -c "
361
+ import asyncio
362
+ import logging
363
+ logging.basicConfig(level=logging.DEBUG)
364
+
365
+ from core.llm.mcp_integration import MCPIntegration
366
+
367
+ async def test():
368
+ mcp = MCPIntegration()
369
+ await mcp.discover_mcp_servers()
370
+ await mcp.shutdown()
371
+
372
+ asyncio.run(test())
373
+ "</terminal>
374
+
375
+
376
+ troubleshooting checklist
377
+
378
+
379
+ configuration
380
+ [ ] mcp_settings.json exists and valid json
381
+ [ ] at least one server configured
382
+ [ ] server commands use absolute paths or available in path
383
+ [ ] server type is "stdio"
384
+ [ ] enabled: true (or field omitted)
385
+
386
+
387
+ server availability
388
+ [ ] server executable exists (which/where)
389
+ [ ] server dependencies installed
390
+ [ ] server runs when executed manually
391
+ [ ] server responds to initialize request
392
+ [ ] server sends notifications/initialized
393
+
394
+
395
+ tool registration
396
+ [ ] discover_mcp_servers() completes
397
+ [ ] tools listed in discovered result
398
+ [ ] tools appear in tool_registry
399
+ [ ] tools marked as enabled: true
400
+
401
+
402
+ execution
403
+ [ ] connection remains open after discovery
404
+ [ ] call_mcp_tool() reaches server
405
+ [ ] server responds within timeout
406
+ [ ] result formatted correctly
407
+
408
+
409
+ logs
410
+ [ ] "mcp integration initialized" found
411
+ [ ] "started mcp server process" for each server
412
+ [ ] "mcp server.*initialized" for each server
413
+ [ ] "got n tools from" for each server
414
+ [ ] "registered mcp tool" for each tool
415
+
416
+
417
+ example workflow
418
+
419
+
420
+ scenario: filesystem tools not appearing
421
+
422
+ step 1: check configuration
423
+ <read><file>.kollabor-cli/mcp/mcp_settings.json</file></read>
424
+
425
+ step 2: verify server command
426
+ <terminal>which npx</terminal>
427
+ <terminal>npx -y @modelcontextprotocol/server-filesystem --help</terminal>
428
+
429
+ step 3: check logs for loading
430
+ <terminal>grep "filesystem" .kollabor-cli/logs/kollabor.log</terminal>
431
+
432
+ step 4: run manual discovery
433
+ <terminal>python -c "
434
+ import asyncio
435
+ from core.llm.mcp_integration import MCPIntegration
436
+
437
+ async def test():
438
+ mcp = MCPIntegration()
439
+ print('servers:', list(mcp.mcp_servers.keys()))
440
+ discovered = await mcp.discover_mcp_servers()
441
+ for name, info in discovered.items():
442
+ print(f'{name}: {info[\"tool_count\"]} tools')
443
+ await mcp.shutdown()
444
+
445
+ asyncio.run(test())
446
+ "</terminal>
447
+
448
+ step 5: test tool call
449
+ <terminal>python -c "
450
+ import asyncio
451
+ from core.llm.mcp_integration import MCPIntegration
452
+
453
+ async def test():
454
+ mcp = MCPIntegration()
455
+ await mcp.discover_mcp_servers()
456
+ result = await mcp.call_mcp_tool('read_file', {'path': '/tmp/test'})
457
+ print(result)
458
+ await mcp.shutdown()
459
+
460
+ asyncio.run(test())
461
+ "</terminal>
462
+
463
+
464
+ common mcp servers
465
+
466
+ filesystem server:
467
+ command: npx -y @modelcontextprotocol/server-filesystem /allowed/path
468
+ tools: read_file, write_file, list_directory, directory_tree
469
+
470
+ git server:
471
+ command: npx -y @modelcontextprotocol/server-git --repository /path/to/repo
472
+ tools: clone, commit, log, status, diff
473
+
474
+ github server:
475
+ command: mcp-server-github
476
+ tools: create_issue, create_pull_request, get_file
477
+
478
+ sqlite server:
479
+ command: mcp-server-sqlite --db-path /path/to/database.db
480
+ tools: query, execute, schema
481
+
482
+ brave search server:
483
+ command: mcp-server-brave-search
484
+ tools: brave_search
485
+
486
+
487
+ expected output
488
+
489
+ when mcp integration is working correctly:
490
+ [ok] mcp integration initialized
491
+ [ok] loaded n mcp server configurations
492
+ [ok] started mcp server process: <server-name>
493
+ [ok] mcp server <server-name> initialized
494
+ [ok] got n tools from <server-name>
495
+ [ok] registered mcp tool: <tool-name> from <server-name>
496
+ [ok] executed mcp tool: <tool-name>
497
+
498
+
499
+ when issues exist:
500
+ [error] failed to load mcp config
501
+ [warn] failed to start mcp server <name>
502
+ [warn] mcp server <name> initialization failed
503
+ [warn] got 0 tools from <name>
504
+ [error] tool '<name>' not found
505
+ [error] no active connection to server '<name>'
506
+
507
+
508
+ final notes
509
+
510
+ mcp integration requires:
511
+ - valid json-rpc 2.0 protocol implementation
512
+ - stdio communication with newline-delimited messages
513
+ - initialize handshake before tool operations
514
+ - server must respond within 30 seconds
515
+
516
+ remember:
517
+ - local config overrides global config
518
+ - disabled servers are skipped
519
+ - connections must stay open for tool calls
520
+ - tools must be registered before use
521
+ - check logs for detailed error traces