Source: ai-research (web research, 2026-04-11)

MCP (Model Context Protocol) servers give Claude Code access to external systems — repositories, browsers, databases, error trackers, and documentation. Not all MCP servers are equally useful. This guide covers the highest-value servers to set up first, the three scope levels for configuration, and security practices for evaluating community servers.

Highest-Value MCP Servers

GitHub MCP + Filesystem Server

  • GitHub MCP — the single highest-frequency MCP server for most developers
    • PR operations: create, review, merge, comment
    • Issue management: create, update, search, label
    • Code search across repos
    • Branch management and commit operations
  • Filesystem server — file operations outside the project directory
    • Read/write files in other repos, config directories, or shared assets
    • Useful when Claude needs to coordinate across multiple project directories

These two cover the most common use cases. Start here.

Context7

  • Documentation lookup for any library, framework, or API
  • Resolves a library name to its documentation, then queries specific topics
  • Especially valuable when working with fast-moving frameworks where Claude’s training data may be outdated
  • Use for: API syntax, configuration, version migration, library-specific debugging, CLI tool usage

Playwright

  • Browser automation for testing, screenshots, and iterative UI fixes
  • Run end-to-end tests directly from Claude Code
  • Take screenshots of pages to verify visual changes
  • Iterate on fixes by running tests, seeing failures, and fixing in a loop
  • Often distributed as a plugin that bundles the MCP server with testing skills

Sentry

  • Pull error context directly into Claude Code: stack traces, breadcrumbs, user impact data
  • Useful for debugging production issues without leaving the development environment
  • Claude can read the error context and propose targeted fixes

Sequential Thinking

  • Helps Claude break down complex multi-step refactors and reasoning chains
  • Not an external system connector — it is a structured thinking tool
  • Most useful for: architectural decisions, large refactors, multi-file changes where order matters

PostgreSQL

  • Direct database access for database-heavy development work
  • Query data, inspect schemas, test migrations
  • Essential for backend developers working with relational databases

Draw.io (diagrams rendered inline)

  • Official jgraph/drawio-mcp server (Apache-2.0, maintained by the draw.io organization, 3,025+ stars)
  • Exposes a single create_diagram(xml) tool that renders draw.io XML inline in the chat as an interactive iframe — zoom, pan, layer toggle, fullscreen, and an “Open in draw.io” edit button
  • Uses the MCP Apps protocol — hosts without MCP Apps fall back to returning XML as text
  • Zero-install path: add https://mcp.draw.io/mcp as a remote MCP server in Claude.ai — the official hosted endpoint
  • Self-hosting paths: Node.js HTTP server (npm start:3001/mcp), Claude Desktop stdio transport, or Cloudflare Workers (npm run deploy)
  • Use for: architecture diagrams, flowcharts, sequence diagrams, ER diagrams — anywhere you would otherwise paste mermaid or ASCII art and hope for the best
  • Pairs well with Claude’s structured-thinking output: ask for the system design, then ask it to render the diagram with create_diagram

MCP Scope Levels

MCP servers can be configured at three levels, from broadest to narrowest:

ScopeLocationShared?Use case
User (global)~/.claude/ configNo — personal onlyTools you use in every project (e.g., filesystem, sequential thinking)
Local (per-project)Project-level config, not committedNo — personal onlyProject-specific tools you do not want to impose on the team
Project (shared).mcp.json in repo rootYes — committed to GitTools the whole team needs (e.g., GitHub MCP, project database)

Best practice: put team-essential MCP servers in .mcp.json (project scope) so everyone gets them automatically. Keep personal preference servers in user scope.

Per-tool result-size override (v2.1.91, Week 14 2026)

MCP server authors can raise the truncation cap on a specific tool by setting anthropic/maxResultSizeChars in the _meta object of the tool’s tools/list entry, up to a hard ceiling of 500K characters. Before this, the cap was global — tools that occasionally returned inherently large payloads (full database schemas, file trees, dump exports) hit the default limit and got persisted to disk with a file reference, forcing Claude to re-read them through the filesystem. Per-tool overrides keep those results inline when the tool legitimately needs the size.

{
  "name": "get_schema",
  "description": "Returns the full database schema",
  "_meta": {
    "anthropic/maxResultSizeChars": 500000
  }
}

Use sparingly: 500K is the ceiling, not the default. Only annotate tools that would otherwise be unusable at the global cap.

Tool Search and Context Efficiency

  • Claude Code uses Tool Search to manage MCP tool definitions
  • Only loads tool schemas on demand when a tool is needed — not all at once
  • This achieves 95% context reduction compared to dumping all tool definitions upfront
  • Practical impact: you can configure many MCP servers without worrying about context window bloat
  • The system is designed for breadth — having 10+ MCP servers configured is fine

Security Practices

MCP servers run code on your machine and have access to the systems they connect to. Treat them like any other dependency:

  • Audit source code before installing any community MCP server
  • Prefer official vendor servers over community forks — e.g., use Sentry’s official MCP server, not a third-party wrapper
  • Review permissions — understand what each server can access (read-only vs. read-write, which APIs, which scopes)
  • Pin versions in production environments to avoid unexpected changes from auto-updates
  • Minimize scope — if you only need read access to GitHub, do not configure a server with write permissions

For a typical full-stack development workflow:

  1. GitHub MCP (project scope) — repo operations for the whole team
  2. Filesystem server (user scope) — personal file operations
  3. Context7 (user scope) — documentation lookup across all projects
  4. One domain-specific server based on your stack:
    • Playwright for frontend/testing
    • PostgreSQL for backend/database
    • Sentry for production debugging
    • Draw.io for architecture docs and system design conversations

Add more servers as concrete needs arise. Do not pre-install servers “just in case.”

Community recipe — M365 access via Power Automate + FastMCP (no tenant admin needed)

[Reddit signal — r/ClaudeAI 2026-05-19] reddit-1thabze (ChiGamerr, 86 score / 47 comments, “Workaround” flair): A user without Microsoft 365 tenant admin built read-inbox / send-draft / check-calendar / write-OneDrive / create-Planner-task / append-Excel / fill-Word-template tools by wrapping Power Automate flows in a small FastMCP server. Every action is one PA flow with an HTTP-request trigger; FastMCP exposes those as MCP tools (m365_send_email, m365_calendar_read, onedrive_create_file, …) that POST JSON to the PA webhook URL. PA executes under the user’s own M365 permissions, so no Graph-permission approval needed. Stack:

Claude → MCP tool → FastMCP server → Power Automate webhook → M365 connector

22 flows total, ~200 lines of Python plus a JSON config of flow names + URLs on a cheap VPS. Recommended discipline: keep webhook URLs private (treat like passwords), add a duplicate-URL check at startup, log tool name + status but not secrets, start with read-only tools before granting send/write, and make every flow narrow instead of one “do anything” endpoint. Power Automate Pro tier required. Pattern generalizes — same wrapper architecture (FastMCP + signed-webhook → enterprise SaaS connector) works anywhere a user has app-side access but no tenant-admin OAuth permission, which is most non-admin employees in most organizations.

MCP transport types (2026-06-14 reference update)

Four transport types are now documented in the official Claude Code MCP reference:

TypeWhen to useAdd via
http (alias: streamable-http)Remote servers that respond to requests; supports OAuthclaude mcp add --transport http or .mcp.json
sseDeprecated; use HTTP insteadclaude mcp add --transport sse
stdioLocal processes needing direct system accessclaude mcp add -- <command>
wsServers that push events to Claude unprompted (bidirectional persistent connection).mcp.json or claude mcp add-json only

WebSocket (ws) transport — key notes:

  • Suited for MCP servers that push events into your session (similar to a Channel but server-managed rather than user-opted-in)
  • Does NOT support OAuth or the --transport CLI flag — configure via claude mcp add-json
  • Same JSON fields as http: url, headers, headersHelper, timeout, alwaysLoad
  • Configure example: claude mcp add-json events-server '{"type":"ws","url":"wss://mcp.example.com/socket","headers":{"Authorization":"Bearer YOUR_TOKEN"}}'

Official resources and scaffolding (2026-06-14 reference update)

  • Anthropic Directory (claude.ai/directory) — browse reviewed MCP connectors from the official directory. Every server listed there is compatible with claude mcp add, using the same MCP infrastructure as Claude Code.
  • mcp-server-dev plugin — official Anthropic plugin that scaffolds a new MCP server interactively. Install with /plugin install mcp-server-dev@claude-plugins-official, then run /mcp-server-dev:build-mcp-server. Claude asks about your use case and generates a remote HTTP or local stdio server stub.

CLAUDE_PROJECT_DIR in stdio servers (2026-06-14 reference update)

For stdio MCP servers, Claude Code sets CLAUDE_PROJECT_DIR in the spawned server process’s environment. This is the project root (same path that hooks receive as ${CLAUDE_PROJECT_DIR}). Read from inside your server:

  • Node.js: process.env.CLAUDE_PROJECT_DIR
  • Python: os.environ["CLAUDE_PROJECT_DIR"]

Important expansion caveat: This variable is in the server’s environment, not Claude Code’s own environment. When referencing it in .mcp.json command or args via ${VAR} expansion, include a default: ${CLAUDE_PROJECT_DIR:-.}. Plugin-provided MCP configs substitute it directly and don’t need the default.

Reserved server name: workspace is reserved for Claude Code’s internal use. If your .mcp.json defines a server with that name, Claude Code skips it at load time and shows a warning asking you to rename it.

Key Takeaways

  • GitHub MCP + Filesystem server cover the highest-frequency cases — start there
  • Context7 is high-value for any project using third-party libraries (i.e., nearly every project)
  • Playwright, Sentry, and PostgreSQL address specific workflow needs — add when relevant
  • Three scope levels (user, local, project) let you share team-essential servers via .mcp.json while keeping personal tools separate
  • Tool Search means context cost is not a concern — configure liberally, Claude loads schemas on demand
  • streamable-http and http are equivalent type values for HTTP servers in .mcp.json — the MCP specification uses streamable-http as the official name, so paste configs from server docs as-is without renaming the type field (confirmed live in docs 2026-05-17)
  • Four transports now documented: http/streamable-http, sse (deprecated), stdio, ws (WebSocket — push-based, add-json only)
  • Anthropic Directory (claude.ai/directory) is the official curated source for reviewed connectors; all are compatible with claude mcp add
  • CLAUDE_PROJECT_DIR is available in stdio server processes; use ${CLAUDE_PROJECT_DIR:-.} when referencing in .mcp.json args expansion
  • workspace server name is reserved — rename any server using it to avoid silent skipping at load time
  • Security: audit source, prefer official servers, minimize permissions

Try It

  1. Check your current MCP setup: look at .mcp.json in your project root and ~/.claude/ for user-level config
  2. If you have zero MCP servers: add GitHub MCP first — it is the highest-ROI server for most workflows
  3. Add Context7 to your user scope — it pays off immediately for any project with third-party dependencies
  4. For frontend work: install Playwright MCP (available as a plugin for one-click setup)
  5. Commit .mcp.json to your repo so teammates automatically get the project’s MCP servers
  6. Before installing any community MCP server, read its source code and check its permissions model