Skip to main content
Glama

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
verboseNoWhether to include detailed information

Implementation Reference

  • 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
        };
      }
    }
  • 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: [],
      },
    },
  • 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);
    }

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aakarsh-sasi/memory-bank-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server