# mcp-hosts-installer **Install Model Context Protocol (MCP) servers from npm, PyPI, or a local path — directly from Claude Code, Cursor, VS Code, or Claude Desktop.** One setup: add this server once, then ask the model to install other MCP packages for you. | Registry | Short | |----------|--------| | **npm** | `npx -y mcp-hosts-installer` | | **GitHub** | [soufgit/mcp-hosts-installer](https://github.com/soufgit/mcp-hosts-installer) |
![Maintainer](https://avatars.githubusercontent.com/u/182288589?s=200&v=4)

MCP installer for Claude Code, Cursor, VS Code, and Claude Desktop — register remote or local MCP servers in the host's config (settings.json / mcp.json / claude_desktop_config.json).

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![npm version](https://img.shields.io/npm/v/mcp-hosts-installer.svg)](https://www.npmjs.com/package/mcp-hosts-installer) [![npm downloads](https://img.shields.io/npm/dt/mcp-hosts-installer.svg)](https://www.npmjs.com/package/mcp-hosts-installer) [![npm weekly downloads](https://img.shields.io/npm/dw/mcp-hosts-installer.svg)](https://www.npmjs.com/package/mcp-hosts-installer) [![GitHub Repo stars](https://img.shields.io/github/stars/soufgit/mcp-hosts-installer?style=social)](https://github.com/soufgit/mcp-hosts-installer) [![MCP](https://img.shields.io/badge/MCP-Compatible-brightgreen.svg)](https://modelcontextprotocol.io) [![Claude Code](https://img.shields.io/badge/Claude_Code-black.svg)](https://claude.ai/code) [![Claude Desktop](https://img.shields.io/badge/Claude_Desktop-blue.svg)](https://claude.ai/download) [![Cursor](https://img.shields.io/badge/Cursor-IDE-blue.svg)](https://cursor.com) [![VS Code](https://img.shields.io/badge/VS_Code-IDE-blue.svg)](https://code.visualstudio.com/)
## What you get - **Tools exposed to the host**: `install_repo_mcp_server` (npm/PyPI package name) and `install_local_mcp_server` (folder path), with optional `args`, `env`, and target `host` (`claude-code` \| `cursor` \| `vscode` \| `claude`). - **Default host**: when `host` is omitted, the tool picks a client that **already has** a config file in the usual folder (Cursor first, then VS Code, then Claude Code, then Claude Desktop); if none exist, it targets **Cursor**. - **Prerequisites**: [Node.js](https://nodejs.org/) with `npx`; for Python-based servers from PyPI, [`uv`](https://github.com/astral-sh/uv) is used. ## Install this MCP server in your host ### Claude Code ⭐ The fastest way — one CLI command: ```sh claude mcp add mcp-hosts-installer npx -- -y mcp-hosts-installer ``` Or manually in `~/.claude/settings.json` (created automatically if it doesn't exist): ```json { "mcpServers": { "mcp-hosts-installer": { "command": "npx", "args": ["-y", "mcp-hosts-installer"] } } } ``` Then ask Claude Code: > Install the MCP server @modelcontextprotocol/server-filesystem for claude-code ### Cursor `mcp.json` — macOS: `~/.cursor`, Windows: `%USERPROFILE%\.cursor`. ```json { "mcpServers": { "mcp-hosts-installer": { "command": "npx", "args": ["-y", "mcp-hosts-installer"] } } } ``` ### VS Code User-level `mcp.json`: macOS `~/Library/Application Support/Code/User/mcp.json`, Windows `%APPDATA%\Code\User\mcp.json`, Linux `~/.config/Code/User/mcp.json`. In VS Code: command **MCP: Open User Configuration**. ```json { "mcpServers": { "mcp-hosts-installer": { "command": "npx", "args": ["-y", "mcp-hosts-installer"] } } } ``` ### Claude Desktop `claude_desktop_config.json` — macOS: `~/Library/Application Support/Claude`, Windows: `%APPDATA%\Claude`. ```json { "mcpServers": { "mcp-hosts-installer": { "command": "npx", "args": ["-y", "mcp-hosts-installer"] } } } ``` If you don't pass `host`, use the inference above or set `host` to `"claude-code"`, `"claude"`, `"cursor"`, or `"vscode"` explicitly. ## Example prompts > Install the MCP server named mcp-server-fetch > Please install the MCP server at /Users/NAME/code/mcp-youtube, I'm too lazy to do it myself. > Install the MCP server @modelcontextprotocol/server-github for claude-code. Set the environment variable GITHUB_PERSONAL_ACCESS_TOKEN to '1234567890' ## Repository visibility (GitHub) After pushing, add **topics** on the repo page so search and "Explore" surface the project, for example: `mcp`, `model-context-protocol`, `cursor`, `vscode`, `claude-desktop`, `claude-code`, `npm`, `developer-tools`, `ai`.