MCP servers

Working with Claude on Projects

Chapter 7  ·  MCP Servers

By default, Claude can read and write files, run shell commands, and search the web — the tools that ship with Claude Code. The Model Context Protocol (MCP) is a standard that lets you connect additional servers to Claude, giving it new tools: reading from a database, controlling a browser, querying an API, interacting with your desktop. This chapter explains what MCP is, how it works, the servers that matter most in practice, and how to connect them to your project.

What Is MCP?

MCP is an open protocol — think of it as a USB standard for AI tools. Any application can implement an MCP server, which exposes a set of named tools that Claude can call. Claude doesn't need to know in advance what tools a server provides; it discovers them at connection time and can use them immediately.

Model
Claude
Protocol
MCP
Server
MCP Server
Resource
App / API / File

The flow for every MCP tool call:

  1. Claude decides it needs a tool (e.g. "take a screenshot of the browser")
  2. It calls the tool by name with parameters, via the MCP protocol
  3. The MCP server executes the action against the real application or API
  4. The result is returned to Claude as context for its next response

From your perspective as the user, this is invisible — Claude just seems to be able to do more things.

Servers Available in This Session

Claude Code ships with several built-in MCP servers, and your session may have additional third-party servers connected. Here are the ones active in this project:

Filesystem (built-in)
Built-in · always active

Core file operations — reading, writing, editing, searching. The Read, Write, Edit, Glob, and Grep tools you see Claude use constantly are all backed by the filesystem server.

Read · Write · Edit · Glob · Grep
Bash / Shell (built-in)
Built-in · always active

Runs arbitrary shell commands. Gives Claude access to any CLI tool installed on the machine — Python scripts, git, npm, system utilities.

Bash · PowerShell
Computer Use
MCP server · requires approval

Takes screenshots of the desktop, moves the mouse, types keystrokes, and interacts with native applications. Tiered by app category: full, click-only, or read-only depending on the app.

screenshot · left_click · type · scroll · key
Claude in Chrome
Browser extension · requires install

DOM-aware browser control. Faster and more reliable than pixel-clicking for web apps. Can read page content, fill forms, click elements, and read network requests — without needing a screenshot.

navigate · find · form_input · read_page · get_page_text
Web Search / Fetch (built-in)
Built-in · always active

Searches the web and fetches URLs. Gives Claude access to current information beyond its training cutoff. Used for documentation lookups, current package versions, and research.

WebSearch · WebFetch
Session Management
MCP server · project-specific

Provides tools for archiving sessions, listing past sessions, and searching transcripts. Used in this project to resume context from previous sessions.

list_sessions · search_session_transcripts · archive_session

Connecting a Third-Party MCP Server

MCP servers for popular services exist for Slack, Linear, GitHub, Notion, Postgres, MySQL, and many more. Connecting one to your project takes a config entry in .claude/settings.json:

.claude/settings.json — adding an MCP server
{
  "mcpServers": {
    // A local server run as a subprocess
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "POSTGRES_CONNECTION_STRING": "postgresql://user:pass@localhost/mydb"
      }
    },

    // A remote server reached over HTTP/SSE
    "linear": {
      "type": "sse",
      "url": "https://mcp.linear.app/sse",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Local servers (the command form) are launched as a subprocess by Claude Code when the project opens — they start automatically and stop when the session ends. Remote servers (the sse form) are reached over HTTP; they run independently and must be available at the URL.

Keep secrets out of settings.json
The settings.json file is often committed to source control. For API keys and connection strings, use environment variables ($MY_API_KEY) in the config and set the actual values in your shell profile or a .env file that's in .gitignore.

Permissions and Approval Tiers

Not all MCP tools run automatically. Claude Code has a permission model that determines which tool calls require explicit user approval:

TierBehaviourExamples
Auto-approve Runs immediately, no prompt File reads, Grep, Glob, WebSearch
Prompt once Asks approval the first time per session Shell commands, file writes, browser navigation
Always prompt Asks approval every time Computer use actions, destructive operations, external API writes

You can adjust the permission level for individual tools or entire servers in your project settings. In Claude Code's desktop app, the settings panel exposes permission controls per connected server. In the terminal, use the /permissions command (available in interactive sessions).

Browser tier restriction
Browsers (Chrome, Firefox, Safari, Edge) are granted at a restricted "read" tier by the computer-use server — Claude can see their screen but cannot click or type. For web automation, use the Claude in Chrome MCP (DOM-based) instead of computer-use mouse clicks on a browser window.

Real-World MCP Use Cases

  • postgres / mysql Claude queries your database directly — no copy-pasting schemas or results. "What are the top 10 users by order count this month?" gets answered with a live query, not a guess.
  • github Claude reads issues, PRs, and comments from GitHub without you needing to paste them. "Summarise all open issues labelled 'bug'" works as a single command.
  • linear / jira Claude reads your task tracker. "What tickets are in the current sprint?" pulls live data. Claude can also create and update issues directly.
  • slack Claude reads channel history. Useful for context: "What did the team decide about the auth approach last week?" without you needing to summarise the discussion.
  • filesystem (remote) Connect a remote filesystem server to give Claude access to files on a server that isn't your local machine — logs, config files, build artefacts.
  • computer-use Claude interacts with any native desktop app — testing a GUI application, filling a form in software that has no API, reading output from a dashboard that can't be scraped.

Finding MCP Servers

The MCP ecosystem is growing quickly. Places to find servers:

  • Anthropic's MCP registry — the official catalogue, searchable from within Claude Code via the MCP registry tool
  • GitHub — search modelcontextprotocol; many community servers are open source
  • npm / PyPI — servers are distributed as packages; @modelcontextprotocol/server-* is the common namespace for official ones
  • Service documentation — major SaaS providers (Linear, Notion, Slack) now publish their own MCP servers with setup guides
Write your own
If no server exists for a tool you use, the MCP SDK (available for TypeScript and Python) makes it straightforward to wrap any API. A minimal server that exposes three or four tools can be built in a few hours. The protocol handles authentication, discovery, and serialisation — you just implement the tool functions.
Next — Chapter 8: Designing a Project from Scratch
The final chapter. A practical walkthrough of setting up a new Claude Code project from zero: choosing what goes in CLAUDE.md, designing the memory structure, deciding which MCP servers to connect, and building the shorthand prompt map — using a real project as the worked example.