Quickstart
This guide will walk you through installing your first MCP server using add-mcp. You’ll learn the basic workflow and see how easy it is to extend your coding agent’s capabilities.Install a remote MCP server
Let’s install the Context7 MCP server, which provides context and knowledge management capabilities.Run the installation command
Execute the following command in your terminal:The CLI will:
- Parse the server URL
- Detect installed coding agents on your system
- Show you a summary of what will be installed
Select target agents
add-mcp will automatically detect your installed agents. You’ll see a prompt like:Use arrow keys to navigate and space to select/deselect agents. Press Enter to continue.
Choose installation scope
If you selected any project-capable agents, you’ll be asked where to install:
- Project: Config files like
.cursor/mcp.jsonare created in your current directory - Global: Config files are created in your home directory (e.g.,
~/.cursor/mcp.json)
Project-level installation is recommended for team projects. Global installation is better for personal tools you want available everywhere.
Install an npm package
Many MCP servers are distributed as npm packages. Here’s how to install one:npx when your coding agent starts.
npm package servers use the stdio transport and run as local processes, unlike remote servers which use HTTP or SSE.
Non-interactive installation
For automation or CI/CD pipelines, you can skip all prompts:-y flag will:
- Auto-select all detected agents
- Use default installation scope (project)
- Skip confirmation prompts
Install to specific agents
You can target specific agents without interactive selection:Advanced examples
Remote server with authentication
Pass custom headers for authenticated servers:Remote server with SSE transport
Some servers use Server-Sent Events instead of HTTP:Custom server name
Override the auto-inferred server name:Full command with arguments
Install a server that requires specific arguments:Node.js script
Install a custom Node.js script as an MCP server:Add to .gitignore
Automatically add generated config files to.gitignore:
What’s next?
You’ve successfully installed your first MCP server! Here are some next steps:Command reference
Explore all available commands and options
Supported agents
Learn about configuration for each coding agent
Transport types
Understand HTTP, SSE, and stdio transports
Troubleshooting
Solutions for common issues