Installing MCPs is a huge pain, so I made a CLI tool to make it easier.
The CLI now supports multiple installation methods with automatic detection:
npx install-mcp mcp-package-name --client claude
npx install-mcp @org/mcp-server --client claude
npx install-mcp 'npx some-mcp-server --custom-args' --client claude
npx install-mcp https://mcp.example.com/server/sse --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.com
→mcp-example-com
) - Handles URL-based servers with supergateway SSE 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"
When installing remote servers (URLs), the CLI needs to know which transport method the server uses. There are two transport methods:
- Streamable HTTP (modern, recommended)
- SSE (legacy)
The CLI handles this in several ways:
By default, the CLI will automatically detect the transport method:
npx install-mcp https://api.example.com/mcp --client claude
# Output: Detecting transport type... this may take a few seconds.
# Output: We've detected that this server uses the streamable HTTP transport method. Is this correct? (Y/n)
If the detection succeeds, it will ask you to confirm. If you answer "no", it will use the other transport method.
You can skip detection by specifying the transport method directly:
# For streamable HTTP servers
npx install-mcp https://api.example.com/mcp --client claude --transport http
# For legacy SSE servers
npx install-mcp https://api.example.com/mcp --client claude --transport sse
If auto-detection fails, the CLI will ask you directly:
Could not auto-detect transport type, please answer the following questions:
Does this server support the streamable HTTP transport method? (Y/n)
Note: This only applies to URL-based installations. Package names and custom commands don't require transport selection.
where <client>
is one of the following:
claude
cline
roo-cline
windsurf
witsy
enconvo
cursor
vscode
gemini-cli
claude-code
warp
(outputs config to copy/paste into Warp's cloud-based settings)
MIT