Skip to main content
Glama
danielrosehill

Daniel Rosehill's MCP Installer

install_mcp

Install MCP servers to Claude Code, Cursor, or VS Code clients from a GitHub registry, handling required API keys and configurations during setup.

Instructions

Install a single MCP to a client. If secrets are required, they must be provided.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mcp_idYesMCP identifier from registry (use list_mcps to see available IDs)
clientNoTarget client to install toclaude-code
secretsNoKey-value pairs of secrets/API keys required by this MCP
forceNoInstall even if already installed (will overwrite)

Implementation Reference

  • Core handler function that implements the logic for installing a single MCP: fetches entry, checks installation status and secrets, builds config, and saves to client config.
    export async function installMcp(
      mcpId: string,
      client: ClientType,
      providedSecrets: Record<string, string> = {},
      skipIfInstalled = true
    ): Promise<InstallResult> {
      // Get the MCP entry
      const entry = await getMcpById(mcpId);
      if (!entry) {
        return {
          status: 'error',
          mcp_id: mcpId,
          client,
          message: `MCP '${mcpId}' not found in registry`
        };
      }
    
      // Check if already installed
      if (skipIfInstalled && isMcpInstalled(client, mcpId)) {
        return {
          status: 'already_installed',
          mcp_id: mcpId,
          client,
          message: `MCP '${mcpId}' is already installed in ${client}`
        };
      }
    
      // Check for missing secrets
      const missingSecrets = getMissingSecrets(entry, providedSecrets);
      if (missingSecrets.length > 0) {
        return {
          status: 'secrets_required',
          mcp_id: mcpId,
          client,
          message: `Missing required secrets for '${mcpId}'`,
          missing_secrets: missingSecrets
        };
      }
    
      // Collect all secrets
      const secrets = collectSecrets(entry, providedSecrets);
    
      // Build the config
      try {
        const config = buildMcpConfig(entry, secrets, client);
    
        // Verify client path exists (create if needed)
        const clientInfo = getClientInfo(client);
    
        // Install
        setMcpConfig(client, mcpId, config);
    
        return {
          status: 'success',
          mcp_id: mcpId,
          client,
          message: `Successfully installed '${entry.name}' to ${clientInfo.name}`
        };
      } catch (error) {
        return {
          status: 'error',
          mcp_id: mcpId,
          client,
          message: `Failed to install '${mcpId}': ${error instanceof Error ? error.message : String(error)}`
        };
      }
    }
  • MCP server tool call handler (CallToolRequestSchema) specific case for 'install_mcp': parses input arguments and delegates to installMcp function.
    case 'install_mcp': {
      const mcpId = args?.mcp_id as string;
      const client = (args?.client as ClientType) || 'claude-code';
      const secrets = (args?.secrets as Record<string, string>) || {};
      const force = args?.force as boolean || false;
    
      const result = await installMcp(mcpId, client, secrets, !force);
    
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Input schema for the install_mcp tool defining parameters: mcp_id (required), client, secrets, force.
    inputSchema: {
      type: 'object',
      properties: {
        mcp_id: {
          type: 'string',
          description: 'MCP identifier from registry (use list_mcps to see available IDs)'
        },
        client: {
          type: 'string',
          enum: ['claude-code', 'cursor', 'vscode'],
          description: 'Target client to install to',
          default: 'claude-code'
        },
        secrets: {
          type: 'object',
          description: 'Key-value pairs of secrets/API keys required by this MCP',
          additionalProperties: { type: 'string' }
        },
        force: {
          type: 'boolean',
          description: 'Install even if already installed (will overwrite)',
          default: false
        }
      },
      required: ['mcp_id']
    }
  • src/index.ts:72-100 (registration)
    Registration of the install_mcp tool in the tools array returned by ListToolsRequestSchema, including name, description, and schema.
      name: 'install_mcp',
      description: 'Install a single MCP to a client. If secrets are required, they must be provided.',
      inputSchema: {
        type: 'object',
        properties: {
          mcp_id: {
            type: 'string',
            description: 'MCP identifier from registry (use list_mcps to see available IDs)'
          },
          client: {
            type: 'string',
            enum: ['claude-code', 'cursor', 'vscode'],
            description: 'Target client to install to',
            default: 'claude-code'
          },
          secrets: {
            type: 'object',
            description: 'Key-value pairs of secrets/API keys required by this MCP',
            additionalProperties: { type: 'string' }
          },
          force: {
            type: 'boolean',
            description: 'Install even if already installed (will overwrite)',
            default: false
          }
        },
        required: ['mcp_id']
      }
    },
  • Helper function buildMcpConfig that constructs the client-specific MCP server configuration based on the MCP type (npm, sse, http, etc.). Called by installMcp.
    export function buildMcpConfig(
      entry: McpEntry,
      secrets: Record<string, string>,
      _client: ClientType
    ): McpServerConfig {
      switch (entry.type) {
        case 'npm':
          return buildNpmConfig(entry.config as NpmConfig, secrets);
        case 'sse':
          return buildSseConfig(entry.config as EndpointConfig, secrets);
        case 'http':
          return buildHttpConfig(entry.config as EndpointConfig, secrets);
        case 'streamable-http':
          return buildStreamableHttpConfig(entry.config as EndpointConfig, secrets);
        case 'docker':
          return buildDockerConfig(entry.config as DockerConfig, secrets);
        default:
          throw new Error(`Unsupported MCP type: ${entry.type}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions secrets handling and implies installation actions, but fails to describe critical behaviors: whether this is a read/write operation, potential side effects (e.g., client restarts), error conditions, or response format. For a tool that modifies client configurations, this is a significant gap in transparency.

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 extremely concise—two sentences that directly address the core action and a key constraint (secrets). It's front-loaded with the main purpose and wastes no words, making it easy to parse quickly while still providing essential context.

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

Completeness2/5

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

Given the tool's complexity (installation with 4 parameters, no annotations, and no output schema), the description is insufficient. It doesn't explain what happens on success/failure, return values, or interactions with siblings like 'list_installed'. For a mutation tool with rich parameters, more context is needed to guide effective use.

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

Parameters3/5

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

Schema description coverage is 100%, providing detailed parameter documentation. The description adds minimal value beyond the schema, only implicitly referencing 'secrets' without explaining their role or format. Since the schema already covers parameters thoroughly, the baseline score of 3 is appropriate, as the description doesn't significantly enhance parameter understanding.

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 action ('Install') and resource ('a single MCP to a client'), making the purpose immediately understandable. It distinguishes from siblings like 'install_all' (which installs multiple) and 'uninstall_mcp' (which removes). However, it doesn't explicitly differentiate from 'sync_registry' or other installation-related tools, keeping it from a perfect score.

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 provides implied usage by mentioning secrets requirements, suggesting when to use this tool (for single MCP installation with optional secrets). However, it lacks explicit guidance on when to choose this over 'install_all' (for bulk) or prerequisites like needing 'list_mcps' first, which is only hinted in the schema. No clear exclusions or alternatives are stated.

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

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/danielrosehill/My-MCP-Installer'

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