from line 161
161161
162162Each is one of the inputs the four options in [Installing MCP servers](#installing-mcp-servers) take. Find the shape you have below to turn it into the command Claude Code accepts. Each command writes to [local scope](#local-scope) unless you add `--scope project` or `--scope user`.
163163
164#### From a URL
164<span id="from-a-url" />
165165
166#### Add a server from a URL
167
166168A URL means the server is remote. For an `https://` endpoint, add it with `--transport http`, or follow [Option 2](#option-2-add-a-remote-sse-server) when the instructions say the endpoint uses SSE. For a `wss://` endpoint, use [Option 4](#option-4-add-a-remote-websocket-server) instead, since `--transport` doesn't accept `ws`:
167169
168170```bash theme={null}
from line 173
171173
172174If the instructions also give an API key or token header, pass it with `--header` as shown in [Option 1](#option-1-add-a-remote-http-server).
173175
174#### From an `npx`, `uvx`, or binary command
176<span id="from-an-npx-uvx-or-binary-command" />
175177
178#### Add a server from an `npx`, `uvx`, or binary command
179
176180A launch command means the server runs as a local stdio process. Put the whole command after `--`, so Claude Code passes flags such as `-y` to the command that starts the server instead of reading them as its own options. Pass any environment variables the instructions ask for with `--env`, after the server name and before `--`:
177181
178182```bash theme={null}
from line 185
181185
182186[Option 3](#option-3-add-a-local-stdio-server) covers the `--` separator in full.
183187
184#### From an `mcpServers` JSON block
188<span id="from-an-mcpservers-json-block" />
185189
190#### Add a server from an `mcpServers` JSON block
191
186192An `mcpServers` block written for another MCP client, such as Claude Desktop, uses the wrapper key and entry shape Claude Code reads. Pass `claude mcp add-json` the object inside `mcpServers`, not the wrapper. Two entries need a repair first:
187193
188194* **A `url` with no `type`**: add `"type": "http"`, `"type": "sse"`, or `"type": "ws"` to match the endpoint. Claude Code reads an entry with no `type` as a stdio server, so a `url` entry without a `type` fails.
from line 1439
14331439 Tool search isn't supported on Microsoft Foundry [deployments hosted on Azure](https://platform.claude.com/docs/en/build-with-claude/claude-in-microsoft-foundry#hosting-options), which reject it server-side: Claude Code detects the rejection and loads MCP tools upfront for that deployment instead. [`ENABLE_TOOL_SEARCH`](#configure-tool-search) can't override this, since the rejection comes from the deployment itself.
14341440</Note>
14351441
1436### For MCP server authors
1442<span id="for-mcp-server-authors" />
1443
1444### Tool search for MCP server authors
14371445
14381446If you're building an MCP server, the server instructions field becomes more useful with tool search enabled. Server instructions help Claude understand when to search for your tools, similar to how [skills](/docs/en/skills) work.
14391447
No line in this hunk matches that.