# claude mcp add-json Command

> It adds an MCP server from a block of JSON.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** claude mcp add-json, claude mcp add-from-claude-desktop

## Think of it like

It is like you copy the whole note in one go. You do not copy it word by word.

## Definition

claude mcp add-json adds an MCP server from a block of JSON. Many server guides give you that block. Pass a name, then the JSON for that one server. It is handy when a server needs headers or sign-in details that are long to type as flags. claude mcp add-from-claude-desktop copies servers you set up in Claude Desktop.

## Example

A server's guide gives Emma a JSON block with a URL and two headers. She pastes it into claude mcp add-json, and the server is added in one step.

## Example code

```bash
claude mcp add-json weather '{"type":"http","url":"https://api.example.com/mcp"}'
```

Add a server from its JSON.

## Why it matters

You can paste what the guide gives you, and not turn it into flags by hand.

## Common mistake

Pasting the whole mcpServers wrapper. Pass only the object for the one server, not the block around it.

## Three principles

- **One server's JSON.** Not the wrapper.
- **Good for long setups.** Headers and sign-in.
- **From Claude Desktop.** A copy command too.

## Related terms

- [claude mcp add Command](https://learn.benibix.com/term/ai/claude-mcp-add-command)
- [MCP Server](https://learn.benibix.com/term/ai/mcp-server)
- [/mcp Command](https://learn.benibix.com/term/ai/mcp-command)

## Taught in

- [The claude mcp Commands](https://learn.benibix.com/learn/ai-claude-code-commands/claude-mcp-commands): Claude Code Commands, 12/17

![Three scopes for an MCP server: local and user stay yours, project is shared through git.](https://learn.benibix.com/diagrams/cli-mcp-scopes.svg)

---

Source: https://learn.benibix.com/term/ai/claude-mcp-add-json-command
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
