Skip to main content
Glama
199-mcp

MCP Autostarter

by 199-mcp

get_mcp_status

Verify the status of MCP handler and Claude Desktop processes to ensure uninterrupted operation and enable plugin reloading without closing the application.

Instructions

Check if MCP handler and Claude Desktop processes are running

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main execution logic for the 'get_mcp_status' tool. It uses ProcessDetector to find MCP handler and Claude Desktop processes, constructs a status object, and returns it as JSON text content.
    case 'get_mcp_status': {
      try {
        const mcpProcess = await processDetector.findMCPHandlerProcess();
        const claudeProcess = await processDetector.findClaudeDesktopProcess();
        
        const status = {
          mcp_handler: mcpProcess ? {
            running: true,
            pid: mcpProcess.pid,
            name: mcpProcess.name,
            cmd: mcpProcess.cmd,
          } : {
            running: false,
          },
          claude_desktop: claudeProcess ? {
            running: true,
            pid: claudeProcess.pid,
            name: claudeProcess.name,
          } : {
            running: false,
          },
          timestamp: new Date().toISOString(),
        };
        
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(status, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to get status: ${error}`
        );
      }
    }
  • src/index.ts:51-60 (registration)
    Registration of the 'get_mcp_status' tool in the listTools response, including name, description, and empty inputSchema (also serves as schema).
      {
        name: 'get_mcp_status',
        description: 'Check if MCP handler and Claude Desktop processes are running',
        inputSchema: {
          type: 'object',
          properties: {},
          required: [],
        },
      },
    ],
  • Helper method to detect the running MCP handler process by filtering Node.js processes with MCP-related command patterns using ps-list and find-process.
    async findMCPHandlerProcess(): Promise<MCPProcess | null> {
      try {
        const processes = await psList();
        
        // Look for Node.js processes that are running MCP-related code
        const mcpCandidates = processes.filter(proc => {
          const cmd = proc.cmd || '';
          const name = proc.name || '';
          
          // Check for Node.js processes running MCP servers
          return (
            (name.includes('node') || name.includes('Node')) &&
            (cmd.includes('mcp') || 
             cmd.includes('modelcontextprotocol') ||
             cmd.includes('claude-desktop-internal') ||
             cmd.includes('@anthropic'))
          );
        });
    
        // If we have multiple candidates, try to identify the main MCP handler
        if (mcpCandidates.length > 0) {
          // Prefer processes that look like the main MCP handler
          const mainHandler = mcpCandidates.find(proc => 
            proc.cmd?.includes('mcp-server') || 
            proc.cmd?.includes('mcp-handler') ||
            proc.cmd?.includes('desktop-mcp')
          );
    
          const selected = mainHandler || mcpCandidates[0];
          
          return {
            pid: selected.pid,
            name: selected.name,
            cmd: selected.cmd || '',
            ppid: selected.ppid
          };
        }
    
        // Fallback: look for processes by port or specific patterns
        const nodeProcesses = await findProcess('name', 'node') as any[];
        
        for (const proc of nodeProcesses) {
          if (proc.cmd?.includes('mcp') || proc.cmd?.includes('modelcontextprotocol')) {
            return {
              pid: proc.pid,
              name: proc.name,
              cmd: proc.cmd
            };
          }
        }
    
        return null;
      } catch (error) {
        console.error('Error finding MCP handler process:', error);
        return null;
      }
    }
  • Helper method to find the Claude Desktop process by matching process names containing 'claude' and 'desktop' or 'app'.
    async findClaudeDesktopProcess(): Promise<MCPProcess | null> {
      try {
        const processes = await psList();
        
        const claude = processes.find(proc => {
          const name = proc.name.toLowerCase();
          return name.includes('claude') && 
                 (name.includes('desktop') || name.includes('app'));
        });
    
        if (claude) {
          return {
            pid: claude.pid,
            name: claude.name,
            cmd: claude.cmd || '',
            ppid: claude.ppid
          };
        }
    
        return null;
      } catch (error) {
        console.error('Error finding Claude Desktop process:', error);
        return null;
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it states what the tool does (checking process status), it doesn't describe what the check entails (e.g., local process inspection, API call), what output to expect (e.g., boolean status, detailed process info), error behavior, or performance characteristics. For a diagnostic tool with zero annotation coverage, this is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that directly states the tool's purpose with zero wasted words. It's appropriately sized for a simple diagnostic tool and front-loads the essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is minimally adequate. It states what the tool does but lacks details about behavioral characteristics, output format, or error handling. For a diagnostic tool that likely returns status information, the absence of output schema means the description should ideally provide more context about what 'check' returns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters with 100% schema description coverage (empty schema). The description appropriately doesn't discuss parameters since none exist. It focuses on the tool's purpose rather than parameter details, which is correct for a parameterless tool.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Check') and target ('if MCP handler and Claude Desktop processes are running'). It distinguishes itself from its siblings (restart_claude, restart_mcp) by being a diagnostic check rather than a restart action. However, it doesn't explicitly contrast with siblings in the description text itself.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (when you need to verify process status), but doesn't explicitly state when to use this tool versus alternatives. No guidance is provided about prerequisites, error conditions, or when not to use it. The context is reasonably inferred from the tool's name and purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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/199-mcp/mcp-autostarter'

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