Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/neon-solutions/add-mcp/llms.txt

Use this file to discover all available pages before exploring further.

This guide walks you through installing an MCP server into your AI coding agent from scratch. By the end you will have a working MCP server registered in your agent’s config and understand the core options available to you. The whole process takes under two minutes.
1

Install a remote MCP server by URL

Run npx add-mcp followed by the server URL. No global install is needed — npx fetches and runs add-mcp automatically.
npx add-mcp https://mcp.context7.com/mcp
This installs the Context7 MCP server, which provides up-to-date library documentation to your agent. The URL format signals to add-mcp that this is a remote streamable HTTP server. For SSE transports, append --transport sse.
You can also install a local stdio server from an npm package name instead of a URL — for example npx add-mcp @modelcontextprotocol/server-postgres. See Installing an npm package server below.
2

add-mcp detects your agents

After parsing the source, add-mcp scans your current directory for known agent config files and builds a list of detected agents:
  • Project mode (default): looks for files like .cursor/mcp.json, .mcp.json, .vscode/mcp.json, opencode.json, .gemini/settings.json, and others relative to your working directory. Detected agents are pre-selected.
  • Global mode (-g): checks for globally installed agents (Claude Desktop, Codex, Zed, and others) on your system. Detected agents are pre-selected.
When agents are found, add-mcp presents an interactive checklist so you can confirm or adjust the selection before anything is written to disk. If no agents are detected, the CLI falls back to showing all supported agents and remembers your last selection for next time.
3

Confirm and complete the installation

The CLI displays an installation summary — server name, transport type, scope, and target agents — and asks for confirmation before writing any files.
┌ Installation Summary ──────────────────────────────────────
│ Server: context7
│ Type: remote
│ Scope: Project
│ Agents: Cursor, Claude Code
└────────────────────────────────────────────────────────────
◇ Proceed with installation?
│ Yes
To skip all prompts in CI or scripting contexts, add the -y flag:
npx add-mcp https://mcp.context7.com/mcp -y
On completion, add-mcp prints the path of every config file it wrote:
┌ Installed to 2 agents ─────────────────────────────────────
│ ✓ Cursor: .cursor/mcp.json
│ ✓ Claude Code: .mcp.json
└────────────────────────────────────────────────────────────
Some agents require a restart or a manual toggle to load newly registered servers. Claude Code needs a restart; Cursor requires you to open MCP Settings and enable the server.
4

Verify and explore next steps

Open your agent and confirm the server appears in its MCP settings panel. For Cursor, go to Settings → MCP and look for context7 in the server list. For Claude Code, run /mcp inside a conversation to list active servers.From here you can:
  • Run npx add-mcp list to see every MCP server installed across all detected agents.
  • Run npx add-mcp find <keyword> to search the curated registry and install servers by name.
  • Run npx add-mcp sync to propagate server configs consistently across all your agents.
  • Run npx add-mcp remove <name> to uninstall a server from agent configs.

Installing an npm package server

Pass an npm package name instead of a URL to install a local stdio-based MCP server. add-mcp generates the correct npx-based command and writes it to each agent’s config:
npx add-mcp @modelcontextprotocol/server-postgres
The server name is inferred from the package name (server-postgres). Override it with --name:
npx add-mcp @modelcontextprotocol/server-postgres --name postgres

Common usage patterns

npx add-mcp https://mcp.context7.com/mcp

Scope: project vs. global

By default, add-mcp writes to project-level config files in your current directory (e.g. .cursor/mcp.json, .mcp.json). These files can be committed to version control so every team member gets the same MCP server configuration automatically.
npx add-mcp https://mcp.context7.com/mcp

For a full list of flags, transport options, environment variable support, and advanced examples, see the Add Command reference.

Build docs developers (and LLMs) love