How to add an MCP server to Claude Code
The claude mcp commands, the three config scopes, and the checks that tell you a server is actually connected. A practical setup guide with a worked example.
MCP (Model Context Protocol) is how Claude Code talks to tools outside your repository: databases, browsers, issue trackers, or a feedback layer like Vynix. An MCP server is a small program that exposes a set of tools; Claude Code starts it, lists its tools, and calls them while it works. This guide covers the commands, the config scopes, and the checks that tell you a server is really connected.
The one-line way: claude mcp add
# Add a server that runs over stdio (the common case) claude mcp add my-server -- npx -y @usevynix/mcp-server # Pass environment variables with -e claude mcp add vynix \ -e VYNIX_API_URL=https://www.vynix.in \ -e VYNIX_API_TOKEN=<your token> \ -- npx -y @usevynix/mcp-server
Everything after the double dash is the command Claude Code runs to start the server. Any npm-published MCP server works with npx, so there is nothing to install first.
Pick the right scope
- local (default): the server is available only to you, only in this project. Good for experiments and personal tokens.
- project: written to a .mcp.json file at the repo root and committed, so the whole team gets the server. Use placeholders for secrets, never real tokens.
- user: available to you in every project on your machine. Good for tools you use everywhere.
# Share the server with your team via .mcp.json claude mcp add vynix --scope project -- npx -y @usevynix/mcp-server # Or make it available in all of your projects claude mcp add vynix --scope user -- npx -y @usevynix/mcp-server
Verify it is actually connected
- claude mcp list shows every configured server and whether it started.
- claude mcp get <name> prints the full config for one server.
- Inside a session, type /mcp to see connection status and the tools each server exposes.
- claude mcp remove <name> takes a server out again.
If a server shows as failed, run the command after the double dash by itself in a terminal first. Nine times out of ten the issue is a missing environment variable or a typo in the package name, and running it directly shows the real error instead of a silent failure.
A worked example: website feedback as agent context
The reason to wire MCP servers into Claude Code is context you cannot paste by hand. The Vynix server is a good example: your team points at elements on the live site and leaves notes, and Vynix captures the selector, DOM snippet, console errors and failed network calls for each one. With the server connected, you can ask Claude Code to "list open Vynix annotations and fix the first one" and it pulls that exact context through MCP tools instead of you re-describing the bug.
The same pattern applies to any MCP server you add: the agent stops guessing about the world outside the repo and starts reading it. Start with one server that removes your most annoying copy-paste, verify it with /mcp, and grow from there.