· mcp · model context protocol · tutorial · april 2026 ·

MCP server tutorial 2026: install, configure, run

// figure MCP server lifecycle — from config to Claude tool call
MCP server lifecycle diagram Four boxes in a horizontal flow: settings.json config, server process spawn, tool registration, Claude tool call. Arrows connect each stage left to right. SETTINGS.JSON CONFIG ~/.claude/ or project SERVER PROCESS SPAWN npx / node / uvx TOOL LIST REGISTERED tools/list handshake CLAUDE CALLS tools/call JSON-RPC over stdio
// FILED MCP · Tutorial // SOURCE Septim Labs // PERMALINK /blog/mcp-server-tutorial-2026.html cite this →
E
By the Septim Labs team
Published April 28, 2026
Find your tool →
TL;DR
  • MCP (Model Context Protocol) is an open standard that lets Claude Code call external tools — databases, browsers, APIs — through a consistent JSON-RPC interface. Servers run as local processes; Claude calls them via stdio.
  • Configuration lives in .claude/settings.json (project-level) or ~/.claude/settings.json (global). Each server entry needs a command, args, and any environment variables for credentials.
  • The five servers worth installing first: Filesystem, Memory, GitHub, Playwright, and Fetch. Each covers a distinct capability gap that stock Claude Code cannot fill.

What MCP actually is

The Model Context Protocol is a specification published by Anthropic in November 2024. It defines a standard way for language models to call external tools — and for external tools to expose themselves to models. Before MCP, every AI tool integration was custom; MCP makes integrations composable.

The architecture is simpler than the name suggests. An MCP server is a process that runs on your machine (or remotely, for hosted servers). When Claude Code starts, it launches each configured MCP server, receives a list of the tools that server provides, and can then call those tools by name during any session. All communication happens over stdin/stdout using JSON-RPC 2.0. No HTTP, no ports, no network configuration for local servers.

A deeper conceptual treatment is in the What is MCP primer. This post focuses on the practical setup.

Where the config lives

MCP server configuration lives in a settings.json file. There are two locations:

The project-level file is the one to prefer for project-specific servers (a database server scoped to one project's connection string). The global file is for servers you want everywhere (Fetch, GitHub).

Security note

The .claude/settings.json file in a project directory should be in .gitignore if it contains credentials. The CVE-2026-21852 disclosure involved credentials shipping in this file via npm. See the credentials leak prevention guide.

The basic config structure

The mcpServers key in settings.json is a map from server name to server configuration. Each server configuration specifies how to start the server process.

{
  "mcpServers": {
    "filesystem": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem",
        "/path/to/allowed/directory"
      ]
    },
    "github": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-github"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_fine_grained_token_here"
      }
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

A few notes on this structure:

The five servers to install first

01 Filesystem MCP

Gives Claude Code read and write access to specific directories. Without it, Claude Code can only read files you explicitly paste into the conversation or that are already in its working directory. With it, Claude can navigate your file tree, read arbitrary files by path, and write to disk.

The path argument after the package name is the allowed root. Pass the project root for a project-scoped install. Pass your home directory only if you specifically need Claude to navigate broadly — and understand the security implications before you do.

02 Memory MCP

Adds a local knowledge graph that persists across sessions. Claude can store facts, relationships, and observations — and retrieve them in future sessions without re-reading source files. Stored as JSON in ~/.claude-memory/ by default.

The memory server is the closest thing Claude Code has to "remembering" your project. It is not automatic — Claude must explicitly store observations — but once configured, it substantially reduces the exploration overhead of returning to a project after a break.

03 GitHub MCP

Gives Claude access to GitHub's API: read issues and PRs, search code, create issues, post comments, manage branches. Requires a fine-grained personal access token scoped to the repositories you want Claude to access.

{
  "github": {
    "command": "npx",
    "args": ["-y", "@modelcontextprotocol/server-github"],
    "env": {
      "GITHUB_TOKEN": "github_pat_..."
    }
  }
}

Scope the PAT to the minimum repositories. A PAT with write access to every repo in your account is a significant credential — treat it with the same caution as a deploy key.

04 Playwright MCP (Microsoft)

Gives Claude a real browser via Playwright. It can navigate pages, click, fill forms, take screenshots, and extract page structure. This is distinct from the Fetch server — Playwright renders JavaScript; Fetch does not.

{
  "playwright": {
    "command": "npx",
    "args": ["-y", "@playwright/mcp@latest"]
  }
}

The browser starts on demand and closes when Claude Code's session ends. It is not visible by default — add "--headed" to the args if you want to watch it run.

05 Fetch MCP

Fetches web content and converts it to Markdown. Lighter than Playwright for pages that do not require JavaScript rendering — documentation sites, GitHub READMEs, blog posts. Part of Anthropic's official reference set.

{
  "fetch": {
    "command": "uvx",
    "args": ["mcp-server-fetch"]
  }
}

This server requires uvx (the Python package runner from Astral). Install it with pip install uv or follow the Astral install instructions. If you prefer to stay in Node, there are community npm wrappers, but the official version is Python.

Septim Vault — $29 pay-once

A pre-built MCP configuration pack: eight server configs ready to paste into your settings.json, with credentials templates, path allowlist guidance, and a verification checklist for each server. Skip the per-server setup documentation hunt.

Get Septim Vault — $29 → Or try Septim Tether ($19) for the minimal config toolkit →

Verifying a server is working

After editing your settings.json, start a new Claude Code session. At the prompt, ask Claude to list the available tools:

What MCP tools do you have access to?

Claude should list the servers you configured and their available tools. If a server is missing, the failure is usually one of three things:

  1. The package is not installed. The -y flag on npx will install it, but the first run can fail if npm's registry is slow or your network has a firewall. Run the npx command manually in a terminal to see the error.
  2. The path is wrong. The Filesystem server takes an absolute path. A relative path or a path with a typo will cause a startup failure. Claude Code logs MCP server errors to ~/.claude/logs/ — check there first.
  3. The credential is invalid. If the server starts but its tools return errors, the most common cause is an expired or misconfigured API key. Test the credential directly in curl or the provider's API playground before debugging the MCP layer.

Project-level vs. global configuration

A common pattern at Septim: global config has Fetch, Memory, and Playwright — servers that are useful in any project. Project-level config has Filesystem (with the project root as the allowed path), the project's database server, and GitHub (scoped to the project's repo).

This structure means you can drop into any project directory and have Claude Code automatically pick up the right servers without manually toggling configs. The project-level file overrides the global file for servers with the same name, so you can have different database connections per project without them conflicting.

Remote MCP servers

Anthropic added support for remote MCP servers (accessed over SSE rather than stdio) in early 2026. The configuration uses a url key instead of command and args:

{
  "mcpServers": {
    "stripe": {
      "url": "https://mcp.stripe.com",
      "headers": {
        "Authorization": "Bearer sk_live_..."
      }
    }
  }
}

Remote servers are convenient for services that maintain their own hosted MCP endpoints (Stripe and several others do). The tradeoff is a network round-trip per tool call and the credential going over the wire — use HTTPS-only remotes and treat the authorization header the same way you would an API key in an environment variable.

Security considerations before you add more servers

Each server you add expands the attack surface of your Claude Code session. The MCP server vulnerability checklist covers the 24-point evaluation framework. The short version for tutorials:

The full curated list of servers worth running — each with its security caveat — is in the best MCP servers 2026 post.

Septim Vault — $29 · 8 pre-built MCP configs

Eight server configurations, credentials templates, path allowlist guidance, and a verification checklist. Also includes the settings.json security hardening guide from the CVE-2026-21852 post. Pay once.

Buy Septim Vault — $29 → Septim Tether ($19) — minimal MCP config toolkit →