debug_mcp_config
Analyze and troubleshoot the current MCP configuration on the mcp-with-ssh server. Optionally include detailed insights by enabling verbose mode.
Instructions
Debug the current MCP configuration
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "debug_mcp_config"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verbose | No | Whether to include detailed information |
Implementation Reference
- src/server/tools/CoreTools.ts:469-546 (handler)The handler function that executes the debug_mcp_config tool, gathering and returning detailed MCP configuration information including memory bank status, mode info, and system details.
export async function handleDebugMcpConfig( memoryBankManager: MemoryBankManager, verbose: boolean = false ) { try { // Get basic information const memoryBankDir = memoryBankManager.getMemoryBankDir(); const projectPath = memoryBankManager.getProjectPath(); const language = memoryBankManager.getLanguage(); const folderName = memoryBankManager.getFolderName(); // Get mode information const modeManager = memoryBankManager.getModeManager(); let modeInfo = null; if (modeManager) { const currentModeState = modeManager.getCurrentModeState(); modeInfo = { name: currentModeState.name, isUmbActive: currentModeState.isUmbActive, memoryBankStatus: currentModeState.memoryBankStatus }; } // Get Memory Bank status let memoryBankStatus = null; try { if (memoryBankDir) { memoryBankStatus = await memoryBankManager.getStatus(); } } catch (error) { console.error('Error getting Memory Bank status:', error); } // Get system information const systemInfo = { platform: os.platform(), release: os.release(), arch: os.arch(), nodeVersion: process.version, cwd: process.cwd(), env: verbose ? process.env : undefined }; // Collect all information const debugInfo = { timestamp: new Date().toISOString(), memoryBank: { directory: memoryBankDir, projectPath, language, folderName, status: memoryBankStatus }, mode: modeInfo, system: systemInfo }; return { content: [ { type: "text", text: `MCP Configuration Debug Information:\n${JSON.stringify(debugInfo, null, 2)}`, }, ], }; } catch (error) { console.error("Error in handleDebugMcpConfig:", error); return { content: [ { type: "text", text: `Error debugging MCP configuration: ${error}`, }, ], isError: true }; } } - src/server/tools/CoreTools.ts:39-53 (schema)The input schema and tool definition for debug_mcp_config, part of the coreTools array used for tool registration and validation.
{ name: 'debug_mcp_config', description: 'Debug the current MCP configuration', inputSchema: { type: 'object', properties: { verbose: { type: 'boolean', description: 'Whether to include detailed information', default: false, }, }, required: [], }, }, - src/server/tools/index.ts:79-82 (registration)The switch case in the tool call handler that registers and routes 'debug_mcp_config' requests to the handleDebugMcpConfig function.
case 'debug_mcp_config': { const { verbose } = request.params.arguments as { verbose?: boolean }; return handleDebugMcpConfig(memoryBankManager, verbose || false); }