AgentAvow·DocsCheck a tool

claude mcp add: add an MCP server to Claude Code, and check it first

AgentAvow Docs · agentavow.com

Claude Code connects to MCP servers you add with claude mcp add or list in a project's .mcp.json. A server you add can read what Claude sends it, and a local server runs on your machine with your permissions. Anthropic's own docs say to verify you trust each server before you connect it. This page covers the commands, and how to check a server first.

Check the server first

Before you run claude mcp add, look the server up. You get Safe to connect, Review before you connect or Do not connect, with the reason and a signed 0-100 trust score. No account needed.

into agentavow.com/check.

npx agentavow-trust scan npm:@upstash/context7-mcp
npx agentavow-trust scan owner/repo

"Is the npm package @upstash/context7-mcp safe to connect?"

a claude mcp add that Claude runs for you is checked first. When the answer is Do not connect, Claude Code asks you before it goes ahead.

Add a local server (stdio)

A local server is a command Claude Code starts. Options go before the server name, and the command goes after --:

claude mcp add --transport stdio context7 -- npx -y @upstash/context7-mcp

Everything after -- goes to the server untouched. Set environment variables with --env (or -e). Put another option, such as --transport stdio, between --env and the server name:

claude mcp add --env API_KEY=your-key --transport stdio myserver -- npx -y some-mcp-server

Add a remote server (URL)

claude mcp add --transport http agentavow https://agentavow.com/mcp

If the server wants a header, such as a token, add --header (or -H):

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

If the server signs you in with OAuth, type /mcp inside Claude Code and follow the steps in your browser. --transport sse still works, but SSE is deprecated: use HTTP where the server offers it.

Choose a scope

--scope (or -s) decides where the server is saved and who gets it:

ScopeWhere it's usedSaved in
local (the default)This project, only for you~/.claude.json
projectThis project, for everyone who clones it.mcp.json in the project root
userAll your projects~/.claude.json
claude mcp add --transport http shared-server --scope project https://example.com/mcp

A project server in .mcp.json looks like this:

{
  "mcpServers": {
    "shared-server": {
      "type": "http",
      "url": "https://example.com/mcp"
    }
  }
}

Claude Code asks before it uses a project's .mcp.json servers in an interactive session. A repo you clone can't approve its own servers, so read the file and check the servers before you say yes. claude mcp reset-project-choices resets those answers.

Add from JSON

claude mcp add-json context7 '{"command":"npx","args":["-y","@upstash/context7-mcp"]}'

See what's connected

claude mcp list
claude mcp get context7

Inside Claude Code, /mcp shows each server's status. To remove one:

claude mcp remove context7

For a remote server you signed in to, run claude mcp logout <name> first, so the sign-in is revoked too, where the server supports it.

Check servers you already have

A server can change after you add it: a new release, or new tool descriptions. Run claude mcp list, then check each one the same way as above. The AgentAvow plugin for Claude Code does this each time a session starts, and asks you before a call if a remote server's tool definitions changed since its check. Auto-scan in Claude Code covers the plugin and the setups without it.

Commands on this page follow Anthropic's Claude Code docs as of December 2026. Run claude mcp --help to see the options in your version.

← Back to AgentAvow