Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:1mcp app Agent installCommand

From Leeroopedia
Knowledge Sources
Domains CLI, MCP_Protocol
Last Updated 2026-10-29 00:00 GMT

Overview

Concrete CLI command for installing an MCP server from the registry with version pinning, interactive wizard, dry-run preview, and force reinstall support.

Description

The installCommand function installs an MCP server from a remote registry by name or `name@version`. It resolves the registry server ID, creates a server installation workflow, and writes the resulting configuration to the config file. An interactive wizard (`--interactive`) guides users through configuration when no server name is provided. Dry-run mode (`--dry-run`) previews the installation without writing. Force mode (`--force`) reinstalls even if the server already exists.

Usage

Import this function when you need to:

  • Install a server from the registry by name or full registry ID
  • Pin a specific version with `name@version` syntax
  • Launch an interactive wizard for guided installation
  • Preview installation without writing changes (dry-run)
  • Force reinstall an existing server

Code Reference

Source Location

  • Repository: 1MCP Agent
  • File: src/commands/mcp/install.ts (L35-80)

Signature

export interface InstallCommandArgs extends GlobalOptions, RegistryYargsOptions {
  serverName?: string;
  force?: boolean;
  dryRun?: boolean;
  verbose?: boolean;
  interactive?: boolean;
}

export function buildInstallCommand(yargs: Argv): Argv;
export async function installCommand(argv: InstallCommandArgs): Promise<void>;

Import

import { installCommand, buildInstallCommand, InstallCommandArgs } from '@src/commands/mcp/install.js';

I/O Contract

Inputs

Name Type Required Description
serverName string No Registry server name or name@version
force boolean No Force reinstall (default: false)
dryRun boolean No Preview only (default: false)
interactive boolean No Launch wizard (default: false)

Outputs

Name Type Description
config file side effect Server entry written if not dry-run
stdout text Installation summary

Usage Examples

Install from Registry

1mcp mcp install filesystem
1mcp mcp install io.github.user/filesystem
1mcp mcp install filesystem@1.0.0

Interactive Wizard

1mcp mcp install --interactive

Dry-Run Preview

1mcp mcp install filesystem --dry-run

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment