Omniscio

OmniscioGuidesClaude Code MCP examples

Claude Code MCP server examples that work on the first try

An MCP server is a program or a web service that gives Claude Code a tool it does not ship with: an issue tracker, a browser, a database, a documentation index, an error tracker.

The command to add one is short, and the same four questions come up every time: what exact line, where does it get stored, how do I authenticate, and how do I know it worked. This page answers those once, then hands off to a page per server that answers them for that server alone.

Sources read November 25, 2026. By the Omniscio team. Updated .

The five, at a glance

Each row here is the shortest version of the command, and every one of them runs in your terminal rather than inside a running session, because a session that is already open does not pick up the change. The page beside each row carries the same command with every flag explained, the .mcp.json form, and what goes wrong.

Server, what it adds, and the command
ServerWhat it addsThe command
GitHubIssues, pull requests and code search, hosted by GitHubclaude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer $GITHUB_PAT"
PlaywrightA real browser Claude can drive and readclaude mcp add playwright -- npx @playwright/mcp@latest
PostgresRead-only SQL against your own databaseclaude mcp add postgres --env DATABASE_URI=postgresql://user:pass@localhost:5432/dbname -- uvx postgres-mcp --access-mode=restricted
Context7Current documentation for the libraries you useclaude mcp add --transport http context7 https://mcp.context7.com/mcp
SentryYour error reports and stack tracesclaude mcp add --transport http sentry https://mcp.sentry.dev/mcp

In the GitHub line, is a token you create and export first, and an empty variable does not fail the command: it adds a server that sends a blank token. The GitHub page carries the token step.

The Postgres and Playwright lines run a program on your machine, so the double dash matters: everything after it is handed to the server, and a server flag written before it would be read as a Claude Code option. The GitHub, Context7 and Sentry lines talk to a URL, so they take --transport http instead.

The four questions every server raises

These answers come from Anthropic's MCP page and hold for all five servers. Each server page repeats the part that matters there, because that is where a reader arrives.

Which scope

Local is the default: the server is stored in your own configuration and applies to the current project only. --scope project writes .mcp.json at the repository root so everyone who clones the repository gets the same server, and --scope user makes it available in every project.

A project-scoped server is a file other people can read, so a token belongs in it only if the token is meant for them. For a personal token, either personal scope is safe: local and user scope both keep it in your own configuration, and neither is shared with the team.

Which auth step

Three shapes exist. A hosted server may sign you in through the browser: you add it, then pick it in /mcp and follow the login. A hosted server may want a token in a header, which is the --header flag. A local server usually reads a token or a connection string from its environment, which is the --env flag.

Which check

Outside a session, claude mcp list prints a health status beside each server. Inside one, /mcp shows the servers and their tools, and claude mcp get <name> prints one server's details.

Which failure

One is a server that is listed and connected but exposes no tools, which is a different problem from a server that never started. The MCP errors guide covers the messages for both, and the add-an-MCP-server guide covers the flags and scopes in full.

The shape all five commands share

Hosted server, by URL:

claude mcp add --transport http <name> <url>
claude mcp add --transport http <name> <url> --header "Authorization: Bearer <token>"

Local server, by the command that starts it:

claude mcp add <name> -- <command> [args...]
claude mcp add <name> --env KEY=value -- <command> [args...]

The same server in .mcp.json, for project scope, is an entry under mcpServers. A hosted one carries type and url; a local one carries command and args.

{
  "mcpServers": {
    "example": {
      "type": "http",
      "url": "https://example.com/mcp",
      "headers": { "Authorization": "Bearer ${EXAMPLE_TOKEN}" }
    },
    "local": {
      "command": "npx",
      "args": ["-y", "@example/mcp-server"]
    }
  }
}

An entry with a url and no type is a configuration error, because Claude Code reads an entry with no type as a stdio server and then looks for a command that is not there.

Where to go next

One thing worth knowing before you add five servers at once: a connected server takes room in the context window, because its tool names and instructions load when a session starts, and the full tool definitions load only when Claude needs them. A server you never use is still not free, so remove the ones you stopped using with claude mcp remove <name>.

Sources

Every line on this page rests on one of these. The date beside each one is the day we read it.

Common questions

Which MCP servers are worth adding to Claude Code first?

Add one that removes work you already do by hand. A GitHub server covers issues and pull requests, Playwright covers anything you would check in a browser, and a Postgres server covers questions you would otherwise answer in a SQL console. Add one, use it for a week, and remove it if you did not.

Do I need a different command for each server?

Yes, one line each, because a server is added by its URL or by the command that starts it. The shape is the same everywhere: claude mcp add for a local server with a double dash before its command, or claude mcp add --transport http with a URL for a hosted one.

Where do these servers get stored?

Local scope, the default, keeps a server in your own configuration for the current project only. Project scope writes .mcp.json at the repository root so a team shares it, and user scope makes it available in every project you open.

How do I know a server is actually connected?

Run claude mcp list outside a session and read the status beside the name: connected, needs authentication, or failed to connect. Inside a session, /mcp shows the same servers, and claude mcp get names one server's details.

What if a server connects but Claude never uses it?

A connected server usually means the process started, not that its tools loaded. Open /mcp and check that the server lists tools, then ask Claude to use one by name. A server with no tools is covered in the MCP errors guide.

Every session, one window

Omniscio runs several agent sessions side by side in one window, each with its own context and its own diff view. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported.