🎧 Listen to this article: English
🌍 Read this in your language: हिंदी · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · ଓଡ଼ିଆ · 日本語 · 中文
An AI coding assistant is only as useful as the tools it can reach. Out of the box it can read and edit files, but it cannot look up fresh library docs, drive a browser, or read your error tracker. MCP servers fill that gap, and setting them up takes only a few minutes.
Today is October 26, 2026. Teams keep adding more AI tooling, and each new tool raises a fair question: what can it touch, and how do I keep it safe? That question is exactly why it is worth learning how MCP setup works instead of pasting commands blindly.
What an MCP server is
MCP stands for Model Context Protocol. An MCP server is a small program that exposes a set of tools to your assistant. One server might search documentation, another might control a web browser, another might query a database. The assistant sees these tools and calls them when a task needs them.
There are two ways a server can run:
- Local (stdio): the assistant starts a program on your machine, usually with
npxoruvx. - Remote (http): the assistant connects to a URL, and you sign in with OAuth or an API key.
Step 1: Decide the scope
Claude Code can store a server in two main places:
- User scope: available in every project on your machine.
- Project scope: saved in a
.mcp.jsonfile in the project folder, so the setup travels with the project.
For a starter setup, project scope is the cleaner choice. Anyone who opens the folder gets the same tools.
Step 2: Add servers with the command line
The general pattern is claude mcp add, then a name, then the command that starts the server. Here are a few that need no API key:
claude mcp add -s project context7 -- npx -y @upstash/context7-mcp
claude mcp add -s project playwright -- npx -y @playwright/mcp@latest --headless
claude mcp add -s project filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/project
claude mcp add -s project --transport http sentry https://mcp.sentry.dev/mcp
Context7 gives the assistant up-to-date library documentation. Playwright lets it open pages and test them in a real browser. The filesystem server reads and writes only inside the folder you list. Sentry is remote, so it asks you to sign in the first time.
Servers that need a key work the same way, with the key passed as an environment variable:
claude mcp add -s project firecrawl -e FIRECRAWL_API_KEY=$FIRECRAWL_API_KEY -- npx -y firecrawl-mcp
Step 3: Or write the config file directly
The command above simply writes a .mcp.json file. You can create it by hand, which is easier to review and to keep in version control:
{
"mcpServers": {
"context7": {
"command": "npx",
"args": ["-y", "@upstash/context7-mcp"]
},
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp@latest", "--headless"]
},
"sentry": {
"type": "http",
"url": "https://mcp.sentry.dev/mcp"
}
}
}
Step 4: Check that everything connected
Restart Claude Code in the project folder. It will ask you to approve project servers the first time it sees the file. Then run claude mcp list in a terminal, or /mcp inside a session. You should see each server and whether it connected. Remote servers such as Sentry finish their sign-in from that same screen.
Step 5: Add the servers that need credentials
Once the basics work, add what your project really needs:
- Git and GitHub:
uvx mcp-server-gitfor local repositories, or GitHub's remote server with a personal access token. - Search: Exa or Brave Search, both with free tiers.
- Databases: a Postgres server or the Supabase server.
- Infrastructure: Kubernetes, Docker, AWS and Cloudflare servers.
Safety habits that matter
- Keep secrets out of the config file.
.mcp.jsonsupports${VAR}expansion, so reference environment variables instead of pasting keys. Check the file after using-e KEY=$KEY, because the literal value can be written into it. - Use read-only access where you can. A database role that can only read, or a cloud credential with limited permissions, limits the damage of a mistake.
- Expose the smallest folder possible to the filesystem server.
- Install only what you use. Every server adds its tool list to the assistant's context, which costs space and can make tool choice noisier.
- Watch memory. A headless browser is heavy. Run one big job at a time.
Conclusion
Adding MCP servers is a small amount of setup for a large gain. Start with a project-scoped .mcp.json holding a few keyless servers, confirm they connect, and only then add the ones that need credentials. Review what each server can touch before you approve it.
Merits
- Gives the assistant live documentation, browser testing and error data.
- A project
.mcp.jsonmakes the setup repeatable for everyone on the team. - Many servers are free or have free tiers.
- Servers can be added or removed in seconds.
Demerits
- Each server increases the assistant's context size.
- Servers with write access to databases or cloud accounts can cause real damage if misused.
- Package names and flags change over time, so commands can go stale.
- Remote servers depend on third-party uptime and sign-in flows.
Caution
This article is educational. Package names, URLs and flags were correct to the best of the author's knowledge but change often, so check each server's official documentation before installing it. Replace every placeholder path, token and project reference with your own values, never commit real keys, and verify what a server can access before you approve it.
Frequently asked questions
- What is an MCP server? — A small program or remote service that gives an AI assistant extra tools, such as searching docs or controlling a browser.
- Where does Claude Code store MCP settings? — In your user settings, or in a
.mcp.jsonfile in the project folder when you use project scope. - Do I need API keys for MCP servers? — Not for all of them. Context7, Playwright, Filesystem and Sentry work without a key; Firecrawl, Exa and Brave need one.
- How do I check that a server is working? — Run
claude mcp listin a terminal or/mcpinside a session to see connection status. - Is it safe to put API keys in
.mcp.json? — No. Use environment variable references so the file can be shared or committed safely. - Can too many MCP servers slow things down? — Yes. Every server adds tool descriptions to the context, so install only the ones you use.
- What is the difference between stdio and http servers? — Stdio servers run as a local process you start; http servers are remote URLs you connect to, often with OAuth.
- Should database servers get write access? — Prefer a read-only role unless you truly need writes, and test on a non-production copy first.
Tags
#MCP #ModelContextProtocol #ClaudeCode #AITools #DeveloperTools #Playwright #Context7 #Automation #Productivity #CodingAssistant
Prompt-Injection Defense Checklist
The controls that actually reduce the blast radius when your app feeds untrusted text to an LLM. Enter your email — you'll get the PDF instantly, plus new posts on AI, security & Linux.
Free. No spam — unsubscribe in one click.


Responses
Sign in to leave a response.