Service eligibility and regional restrictions
PuppyIP serves only compliant overseas businesses and their authorized personnel. Proxy services are not available in mainland China. The service may only be used for lawful business activities outside mainland China. Use of this service within mainland China is prohibited.
Hosting a proxy IP or server overseas does not change these restrictions. The service must not be provided to end users in mainland China through relaying, forwarding, sharing or resale. Before use, read the Terms of Service.
Key Takeaways
- Claude Code v2.1.327 and later can read one server object through stdin with mcp add-json in an external terminal.
- The default local scope is personal to one project. Use project scope to share the configuration with its team.
- After Added, use claude mcp get to check status and follow the appropriate approval, authentication, or connection step.
Check your version and the shape of the JSON
Anthropic added <code>claude mcp add-json <name> -</code> in Claude Code v2.1.327. The trailing <code>-</code> instructs the CLI to read configuration from standard input. Run <code>claude --version</code> in the external terminal you intend to use. If you have multiple installations, check the version actually invoked there. Change into the intended project directory and run registration outside an existing Claude Code session.
Put one server object in <code>server.json</code>. An illustrative remote HTTP configuration is <code>{"type":"http","url":"https://mcp.example.com/mcp"}</code>. Use the MCP endpoint supplied by your provider for an actual connection. If you received a full document with an <code>mcpServers</code> wrapper, extract the object under the server name you want. Here <code>example-api</code> is the name you register locally.
Pipe in the configuration and verify where it was saved
In Bash or Zsh, run <code>cat server.json | claude mcp add-json example-api -</code>. The equivalent input redirection is <code>claude mcp add-json example-api - < server.json</code>. These examples use POSIX shell syntax. If you receive a JSON parse error, check locally that the file parses as a single object and that it has the expected transport type and URL.
The default <code>local</code> scope makes the entry visible to you in the project where you registered it. Select <code>project</code> to share with the team in that project. Claude Code saves the entry in <code>.mcp.json</code> at the project root and prompts for project server approval as applicable. Select <code>user</code> for access across your projects. If the server disappears when you change directories, return to the original project and run <code>claude mcp get example-api</code> to review the entry's scope and URL.
Register the server and check its status
bashcat server.json | claude mcp add-json example-api -
claude mcp get example-api
Follow the status for approval, authentication, or connectivity
An <code>Added</code> message confirms that the CLI saved the configuration. Run <code>claude mcp get example-api</code> for details on that entry, or <code>claude mcp list</code> for servers visible in the current project. When project approval is pending, open Claude Code in that project and review the source before responding to the prompt. If a remote server reports <code>Needs authentication</code>, open <code>/mcp</code> in the session to find the available authentication steps.
For <code>Failed to connect</code>, compare the transport and complete endpoint path with the provider's documentation, then confirm that your current network can reach the service. Successfully loading a general website only checks reachability of that page. After addressing the specific failure, rerun <code>claude mcp get example-api</code> in the same project. If the server connects but a particular tool is unavailable, check the tools and permissions the service grants to your account.
On v2.1.329 or later, if a remote HTTP MCP server rejects the connection with a JSON-RPC error, open <code>/mcp</code> in the session, select the server, and look for <code>Server message</code>. For connection failures in general, use <code>claude mcp get example-api</code> to check whether the <code>Issue:</code> line provides details. When no server message is available, continue checking the failure stage, endpoint, and authorization.
Review where credentials live before sharing the configuration
Piping the file means the JSON does not have to be passed as a command-line argument. The input file can still retain its contents and registration writes the configuration to the selected scope. Keep ordinary configuration in the shared <code>.mcp.json</code> and manage credentials using the service's supported method. Claude Code supports environment variable references in <code>.mcp.json</code> fields such as <code>headers</code>. If you use a reference, check that its variable is available in the environment that launches Claude Code and keep the actual token out of project files and version control.
Sources
- Anthropic Claude Code v2.1.327 release notes
- Claude Code Docs: add MCP servers from JSON configuration
- Claude Code Docs: MCP installation scopes
- Claude Code Docs: server status
- Claude Code Docs: environment variable expansion in .mcp.json
- Claude Code v2.1.329 release notes
- Claude Code Docs: connection failures and server configuration
Frequently Asked Questions
Why am I asked to authenticate after the server was added?
Adding saves the configuration. A remote server that requires login still needs service authentication before it can connect. Open `/mcp` in the intended project for the available steps.
Can I pipe an entire .mcp.json file into add-json?
One add-json invocation accepts a single server object. Extract the object under the desired name from a file with an mcpServers wrapper and send that object through stdin.
Why does the server disappear in another project?
The default local scope makes the entry visible only to you in the original project. Return there to check its scope. To share it with the same project's team, use project scope and its approval flow.