Skill Locker
All posts
byJames Cooper

How to Use MCP Servers with Claude Code

MCP servers connect Claude Code to GitHub, databases, Slack and more. What MCP is, how to add a server, the scopes that matter, and which servers are worth it.

Claude CodeMCPIntegrations

MCP servers are how you connect Claude Code to the rest of your stack — GitHub, databases, Slack, browser automation, your internal APIs. Out of the box, Claude Code reads your codebase and runs shell commands. Add MCP servers and it can also query your production database, open pull requests, or pull tickets from your issue tracker, all inside the same conversation.

This guide explains what MCP is, how to add a server to Claude Code, the connection scopes that matter, and which servers are actually worth your time.

What is MCP?

MCP stands for Model Context Protocol — an open standard, created by Anthropic, for connecting AI assistants to external tools and data sources. Think of it as a universal adapter. Instead of every tool needing a custom integration, anything that speaks MCP can plug into Claude Code (or any other MCP-compatible client).

An MCP server is a small program that exposes a specific capability — "query Postgres," "search GitHub," "control a browser" — in the MCP format. Claude Code is the MCP client that talks to those servers.

How to add an MCP server to Claude Code

The simplest path is the claude mcp add command. The general shape:

claude mcp add <name> <command-to-run-the-server>

For example, adding a filesystem server:

claude mcp add filesystem npx -y @modelcontextprotocol/server-filesystem ~/projects

Claude Code stores the configuration and connects to the server on the next session. You can list configured servers with claude mcp list and remove one with claude mcp remove <name>.

Many servers need configuration — an API token, a database URL, a path. Those are passed as environment variables or arguments when you add the server. Never hard-code secrets into a config file that's committed to version control; use environment variables instead.

MCP scopes: local, project, and user

This is the part people get wrong. When you add a server, it's stored at one of three scopes:

  • Local — only for you, only in the current project. Good for personal experiments.
  • Project — shared with everyone working in the repo (committed as .mcp.json). Good for servers the whole team needs, like a shared database or the project's issue tracker.
  • User — available to you across every project. Good for personal tools you always want, like a notes or browser server.

Choosing the right scope avoids two common problems: leaking personal credentials into a shared repo, and re-adding the same server in every project.

MCP servers worth adding

There are hundreds of MCP servers. The ones that deliver the most for most developers:

  • GitHub / GitLab — read issues, open PRs, review code without leaving the terminal
  • A database server (Postgres, SQLite, Supabase, etc.) — let Claude inspect schemas and query data while debugging
  • Browser automation (Puppeteer/Playwright-style) — Claude can navigate, screenshot, and test web pages
  • Filesystem — controlled access to directories outside the current project
  • Your issue tracker / docs (Linear, Jira, Notion) — pull context from where work actually lives

Start with one. Adding ten servers you don't use just clutters the context and slows things down.

Choosing the right servers without trial and error

The hard part isn't adding a server — it's knowing which ones map to your workflow and how to configure them safely. That's exactly the kind of repeated decision a skill is built for: our AI Foundations pack includes an MCP Server Picker and an MCP Connection Guide that recommend the right servers for your use case and walk through wiring them up correctly.

If you're newer to Claude Code itself, start with the complete guide, then come back to MCP once the basics are comfortable.

A note on security

MCP servers run with whatever access you give them. A database server with write credentials can modify data. A filesystem server can read whatever directory you point it at. Treat MCP configuration like any other credential decision:

  • Grant the minimum access the task needs (read-only DB credentials if Claude only needs to inspect data)
  • Keep secrets in environment variables, never committed config
  • Be deliberate about project-scope servers — everyone in the repo inherits them

FAQ

What is an MCP server in Claude Code?

An MCP (Model Context Protocol) server is a small program that exposes a capability — like querying a database or searching GitHub — in a standard format Claude Code can use. It extends Claude beyond your codebase to external tools and data.

How do I add an MCP server to Claude Code?

Use claude mcp add <name> <command>. Claude Code stores the config and connects on the next session. List servers with claude mcp list and remove them with claude mcp remove <name>.

What's the difference between local, project, and user scope?

Local scope is just you in the current project. Project scope is shared with the whole repo via a committed config. User scope follows you across all your projects. Pick project scope for team tools, user scope for personal ones.

Which MCP servers should I install first?

Start with one that matches your daily work — usually GitHub/GitLab, a database server, or your issue tracker. Adding many unused servers clutters context and slows responses.

Are MCP servers safe to use?

They run with the access you grant them, so treat them like credentials. Use least-privilege access (read-only where possible), keep secrets in environment variables, and be careful with project-scoped servers since the whole team inherits them.

Is MCP specific to Claude Code?

No. MCP is an open standard. Claude Code is one MCP client, but the same servers work with any MCP-compatible tool, which is the point of having a shared protocol.

Get the MCP skills

Wiring MCP correctly the first time saves hours of trial and error. Our AI Foundations pack includes guided MCP skills that pick the right servers and configure them safely.

Browse the skill library →

Ready to supercharge Claude Code?

296 pre-built skills across 33 categories. One purchase, lifetime updates.

Browse skills