S1 · E14 · Intermediate · Season 1: AI Agents & Tools

How do I connect my first MCP server safely?

Explained with Pizza

An MCP server gives an AI app like Claude Code new tools through the Model Context Protocol. In Claude Code you add one with the claude mcp add command, check it with claude mcp list, and approve its tools when Claude first calls them.

In short

  • Step 1: pick a server you trust. Start small, like the Claude Code docs search server.
  • Step 2: add it with one command. By default it is in local scope: private to you, only in this project.
  • Step 3: run claude mcp list, look for ✔ Connected, and approve the first call.
  • Servers that fetch outside content can bring prompt injection, so connect only what you trust.

Step 1: pick a server you trust

An MCP server gives Claude new tools, and Claude will read what those tools return. Claude Code's docs say it plainly: verify you trust each server before connecting it, because servers that fetch external content can expose you to prompt injection.

So start small. A good first server is the Claude Code documentation server: a hosted server with full-text search over the Claude Code docs. It needs no sign-in and no setup.

Step 2: add it with one command

In your terminal, inside your project, run:

claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp
  • --transport http: the server is hosted at a web address, not run on your computer.
  • claude-code-docs: a name you pick. Claude Code uses it to label the server's tools.
  • https://code.claude.com/docs/mcp: the address of the server.
  • Default scope is local: the server is private to you and only active in this project. Add --scope user to use it in all your projects.

Step 3: check it, then use it

Run claude mcp list. Next to the server you should see ✔ Connected. Other statuses, like ! Needs authentication or ✘ Failed to connect, tell you what to fix.

Then start Claude Code and ask something like: "Use the claude-code-docs server to look up what MCP_TIMEOUT does." If Claude Code asks for permission the first time Claude calls the server, approve it. The tool call is labeled with the server name, so you can see the answer came from the server.

Done with it? claude mcp remove claude-code-docs removes it again.

Season 1 in one card

  • Agents loop: plan, act, check, repeat.
  • Tools and MCP connect them to your apps and data.
  • Stay safe with permissions and a sandbox, and watch for prompt injection.
  • Mind memory, teams, costs and tests, and pick chat or agent for the job.

Next: Season 2

Season 2 is about Terraform: infrastructure as code, following the topics of the HashiCorp Terraform Associate exam.

Test yourself

5 quick questions. Pick an answer to check it.

1. What should you check before you connect an MCP server?
2. In claude mcp add --transport http claude-code-docs https://code.claude.com/docs/mcp, what is claude-code-docs?
3. By default, where is a server you add with claude mcp add active?
4. How do you check that the server works?
5. Which is part of the Season 1 recap?

Sources

Checked November 23, 2026.