Connect Claude Code to tools via MCP changedmcp
Nearest release: v2.1.235, published 6 hours before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Recorded here
Lines+60added
Lines−0removed
From line
149
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits85to this page, all time
### Add a server from setup instructions written for another client #### From a URL #### From an `npx`, `uvx`, or binary command #### From an `mcpServers` JSON block
The whole hunk
from line 149, old and new numbered
/
from line 149
149149
150150The `type: "ws"` entry accepts the same `url`, `headers`, `headersHelper`, `timeout`, and `alwaysLoad` fields as `http`. Authentication is header-only, so pass a static token in `headers` or generate one at connect time with [`headersHelper`](#use-dynamic-headers-for-custom-authentication). The `claude mcp add --transport` flag doesn't accept `ws`.
151151
152### Add a server from setup instructions written for another client
153
154MCP servers aren't specific to Claude Code, so a server's setup instructions may be written for Claude Desktop, Cursor, or another MCP client and give no `claude mcp add` command. To add the server anyway, look in those instructions for one of these three things:
155
156* **A URL** such as `https://mcp.example.com/mcp`: the server is remote.
157* **A launch command** such as `npx -y @example/mcp-server`: the server runs on your machine.
158* **An `mcpServers` JSON block**: configuration written for another client's settings file.
159
160Each 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`.
161
162#### From a URL
163
164A URL means the server is remote. For an `https://` endpoint, add it with `--transport http`, or with `--transport sse` 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`:
165
166```bash theme={null}
167claude mcp add --transport http example https://mcp.example.com/mcp
168```
169
170If 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).
171
172#### From an `npx`, `uvx`, or binary command
173
174A 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 `--`:
175
176```bash theme={null}
177claude mcp add example --env API_KEY=your-key -- npx -y @example/mcp-server
178```
179
180[Option 3](#option-3-add-a-local-stdio-server) covers the `--` separator in full.
181
182#### From an `mcpServers` JSON block
183
184An `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:
185
186* **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.
187* **A key with characters other than letters, numbers, hyphens, and underscores**: pick a server name that uses only those characters. Otherwise the key is the server name.
188
189For example, this block:
190
191```json theme={null}
192{
193 "mcpServers": {
194 "example": {
195 "command": "npx",
196 "args": ["-y", "@example/mcp-server"]
197 }
198 }
199}
200```
201
202becomes this command:
203
204```bash theme={null}
205claude mcp add-json example '{"command":"npx","args":["-y","@example/mcp-server"]}'
206```
207
208[Add MCP servers from JSON configuration](#add-mcp-servers-from-json-configuration) covers shell escaping and the `--scope` flag for `add-json`. To share the server with your team instead, add `--scope project`, or add the entry under `mcpServers` in `.mcp.json` at your project root and commit it. [Project scope](#project-scope) covers how Claude Code loads and approves that file.
209
210Each `claude mcp add` and `claude mcp add-json` command prints an `Added ...` line. To check that Claude Code connected, run `claude mcp get <name>`; [Server status](#server-status) covers the statuses it shows and the approval step for `.mcp.json` servers.
211
152212### Managing your servers
153213
154214Once configured, you can manage your MCP servers with these commands:
No line in this hunk matches that.