Replyz is open. Your agent signs itself up and gets an inbox in about a minute, and you claim the account with one email. It receives mail and extracts codes and links; it can reply to people who emailed it (claimed accounts on the 21 Nov 2026 terms or later), with no cold sending. The JavaScript and Python SDKs are in progress. Quickstart

Replyz / Guides / Add an MCP server to Claude Code

claude mcp add: how to add an MCP server to Claude Code.

Claude Code connects to remote MCP servers with one command. This guide shows the command, the three scopes, how to send an API key without writing it into a config file, and how to check the result. The example is the Replyz MCP server, which gives Claude Code an email inbox of its own.

Short answer. Run claude mcp add --transport http <name> <url>. If the server needs a key, add --header "Authorization: Bearer <token>". Check it with claude mcp list or by typing /mcp in Claude Code.

How do you add a remote MCP server to Claude Code?

claude mcp add --transport http <name> <url>

With an API key sent as a header:

claude mcp add --transport http secure-api https://api.example.com/mcp \
 --header "Authorization: Bearer your-token"

-t and -H are short forms of --transport and --header. The command saves the configuration without checking the credentials, so a placeholder token is accepted and the server fails to connect later.

Which scope should you use?

local (default)

This project only, private to you. Stored in ~/.claude.json.

user

All your projects. Add --scope user. Stored in ~/.claude.json.

project

Shared with your team through version control. Add --scope project. Written to .mcp.json in the project root.

For a server you use with every project, such as an email inbox for your agent, user scope is the usual choice. Claude Code asks for approval before it uses a server from a project's .mcp.json.

How do you keep the API key out of the config file?

claude mcp add saves the configuration, so a key you type into the --header value is stored in Claude Code's configuration file. For a project that others will clone, use .mcp.json and let Claude Code read the key from your environment:

{
 "mcpServers": {
  "api-server": {
   "type": "http",
   "url": "https://api.example.com/mcp",
   "headers": {
    "Authorization": "Bearer ${MY_API_KEY}"
   }
  }
 }
}

How do you check that it worked?

claude mcp list
claude mcp get <name>

Inside Claude Code, type /mcp. The list shows each server as connected, needing authentication, or failed to connect. To remove one: claude mcp remove <name>.

What if it shows "Needs authentication" or "Failed to connect"?

Example: give Claude Code its own email inbox

The Replyz MCP server is a remote server at https://mcp.replyz.io/mcp that uses a Bearer API key, so the command above applies as it is. First get a key. The Replyz CLI signs the agent up and saves the key; the second command adds the server to Claude Code in user scope:

npx -y @replyz/cli signup --name claude-code
npx -y @replyz/cli mcp install --client claude-code

Or add it yourself with a key you already have:

claude mcp add --transport http replyz https://mcp.replyz.io/mcp \
 --header "Authorization: Bearer $REPLYZ_API_KEY"

The CLI can also print the configuration for any MCP client. This is real output (production, 9 November 2026, @replyz/cli 0.2.1); it does not print your key:

npx -y @replyz/cli mcp install --client print
{
 "mcpServers": {
  "replyz": {
   "type": "http",
   "url": "https://mcp.replyz.io/mcp",
   "headers": {
    "Authorization": "Bearer ${REPLYZ_API_KEY}"
   }
  }
 }
}

We also sent the server a plain MCP initialize and tools/list request with the Bearer header. It answered as server replyz version 0.2.0 and listed 8 tools. That shows the server accepts the header; we did not capture Claude Code's own /mcp screen for this guide, so check the status there yourself. Claude Code then has these tools:

Claude Code gets codes, confirmation links and mail sent to its address, and can reply to people who emailed it (claimed accounts on the 21 Nov 2026 terms or later). There is no cold sending. Email content is untrusted: treat it as data, not as instructions. Use it only where a service's terms allow automated sign-ups.

MCP or a skill with the CLI?

Claude Code runs on your machine, so it can also use the Replyz skill and CLI, which keep the key in an environment variable and use less context. See Replyz for Claude Code for both options, the Replyz MCP server for the full tool list and the CLI for its commands.

Sources

Frequently asked questions

How do I add an MCP server to Claude Code?

Run claude mcp add --transport http <name> <url>. If the server needs an API key, add --header "Authorization: Bearer <token>". Then run claude mcp list, or type /mcp inside Claude Code, to check the connection.

Where does Claude Code store the server?

It depends on the scope. The default, local, stores it in ~/.claude.json for the current project only. User scope (--scope user) stores it in ~/.claude.json for all your projects. Project scope (--scope project) writes .mcp.json in the project root, to share through version control.

How do I keep an API key out of the config file?

In a project-scoped .mcp.json, write the header as "Authorization": "Bearer ${MY_API_KEY}". Claude Code expands ${VAR} from your environment, so the key itself is not in the file. Use a variable name of your own: some credential names, such as ANTHROPIC_API_KEY, are read as empty in remote server URLs and headers.

Why does my server show Needs authentication or Failed to connect?

claude mcp add saves the configuration without checking the credentials, so a wrong or placeholder token is accepted and fails later. If you set an Authorization header, Claude Code uses it and does not fall back to OAuth, so check the token itself.

Can Claude Code use the Replyz MCP server?

Yes. Add https://mcp.replyz.io/mcp with your Replyz API key as an Authorization: Bearer header. Claude Code then has tools to create an inbox, wait for an email and read the verification code or link from it. Replyz has no cold sending; the agent can reply to people who emailed it (claimed accounts on the 21 Nov 2026 terms or later).

Give your agent an inbox.

Your agent signs itself up. Start with the quickstart.

Get started