install-mcp

1.7.0 • Public • Published

Install MCP CLI

A CLI tool to install and manage MCP servers.

Installing MCPs is a huge pain, so I made a CLI tool to make it easier.

Usage

The CLI now supports multiple installation methods with automatic detection:

Simple package names

npx install-mcp mcp-package-name --client claude

Scoped packages

npx install-mcp @org/mcp-server --client claude

Full commands (for custom arguments)

npx install-mcp 'npx some-mcp-server --custom-args' --client claude

Remote URLs (with automatic naming)

npx install-mcp https://mcp.example.com/server --client claude

The tool automatically:

  • Converts simple package names to npx package-name
  • Preserves full commands as-is
  • Infers server names from package names or URLs (e.g., mcp.example.commcp-example-com)
  • Handles OAuth authentication for remote servers

Headers Support

You can pass headers for authentication or other purposes using the --header flag:

# Single header
npx install-mcp https://api.example.com/mcp --client claude --header "Authorization: Bearer token123"

# Multiple headers
npx install-mcp https://api.example.com/mcp --client claude \
  --header "Authorization: Bearer token123" \
  --header "X-API-Key: secret-key"

OAuth Authentication for Remote Servers

When installing remote servers (URLs), the CLI will ask if the server uses OAuth authentication:

npx install-mcp https://api.example.com/mcp --client claude
# Output: Does this server use OAuth authentication? (Y/n)

You can bypass this prompt using the --oauth flag:

# Automatically run OAuth authentication
npx install-mcp https://api.example.com/mcp --client claude --oauth yes

# Skip OAuth authentication entirely
npx install-mcp https://api.example.com/mcp --client claude --oauth no

If you answer yes, the authentication flow:

  • Runs automatically before installation
  • Handles OAuth flows seamlessly in the background
  • Authentication state is shared globally - once you authenticate with a server, that authentication is automatically available to all MCP clients
  • No need to re-authenticate when using the same server in different clients
# Output: Running authentication for https://api.example.com/mcp

If authentication fails, you'll see:

Authentication failed. Use the client to authenticate.

If the server doesn't use OAuth (you answer no), the installation proceeds directly without authentication.

This ensures secure access to remote servers while maintaining flexibility for servers that don't require OAuth.

Supported Clients

The --client flag specifies which MCP client you're installing for:

  • claude
  • cline
  • roo-cline
  • windsurf
  • witsy
  • enconvo
  • cursor
  • vscode
  • gemini-cli
  • claude-code
  • goose
  • warp (outputs config to copy/paste into Warp's cloud-based settings)

License

MIT

Package Sidebar

Install

npm i install-mcp

Weekly Downloads

415

Version

1.7.0

License

MIT

Unpacked Size

26.4 kB

Total Files

7

Last publish

Collaborators

  • dhravya