Quickstart7 min read

MCP: Model Context Protocol - Quickstart

SFEIR Institute•

TL;DR

Set up your first MCP server in Claude Code in under 5 minutes. This guide shows you how to add an MCP server via stdio or SSE, test the available tools, and secure your connections - step by step, with no unnecessary theory.

Set up your first MCP server in Claude Code in under 5 minutes. This guide shows you how to add an MCP server via stdio or SSE, test the available tools, and secure your connections, step by step, with no unnecessary theory.

Adding an MCP server (stdio, SSE, HTTP) in 5 minutes is an essential aspect of mastering Claude Code.

MCP (Model Context Protocol) is an open standard created by Anthropic that allows Claude Code to connect to external tools (databases, browsers, APIs) via a unified protocol. MCP supports three transport modes: stdio, SSE, and Streamable HTTP. hundreds of community MCP servers are available, covering use cases ranging from web search to browser automation.

SFEIR Institute trainings

Claude Code Training

1 day · Fundamentals

View program

AI-Augmented Developer

2 days · Intermediate

View program

What are the prerequisites to get started with MCP?

Before launching your first MCP server, verify these four points. If you have already installed Claude Code, you are almost ready.

  • Node.js 18 or higher installed (node -v)
  • Claude Code recent version (claude --version)
  • npx available in your terminal (npx --version)
  • A GitHub account with a personal token (for the GitHub MCP server)
ToolMinimum versionVerification command
Node.js18.0.0node -v
Claude Codea recent 2.1.x releaseclaude --version
npxbundled with Node.js 18+npx --version
Gitany recent version (optional)git --version

In practice, an outdated Node.js version is a common cause of MCP startup errors. Run node -v before anything else.

Key takeaway: four tools are enough: Node.js 18, an up-to-date Claude Code, npx, and a GitHub token.

How to add a stdio MCP server in 2 minutes?

The stdio transport is MCP's default mode. The server runs as a child process of Claude Code, which simplifies configuration. To understand the protocol fundamentals, check the complete MCP guide which details each concept.

Run this command to add a stdio MCP server. The Filesystem server is a good first example, since it runs locally and needs no API key:

claude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /path/to/dir

Claude Code registers the server at the default local scope, stored in ~/.claude.json for the current project (use --scope project to write a shared .mcp.json instead). Verify that the server is properly listed:

claude mcp list

You should see a line fs: connected (stdio). The first npx invocation may download the package, so it can take longer on the initial run.

GitHub is added differently: the official integration is a remote HTTP server authenticated with a GitHub personal access token, not a stdio package. Run:

claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer YOUR_GITHUB_PAT"

Generate a fine-grained token from your GitHub token settings with access to the repositories you want Claude to work with. After adding it, claude mcp list shows github: connected.

To add the Brave Search server (a community/archived reference server), the syntax is the stdio form (pass your API key via --env):

claude mcp add brave-search --env BRAVE_API_KEY=$BRAVE_API_KEY -- npx -y @modelcontextprotocol/server-brave-search
MCP ServerAdd commandTransport
GitHubclaude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer YOUR_GITHUB_PAT"http
Brave Searchclaude mcp add brave-search --env BRAVE_API_KEY=$BRAVE_API_KEY -- npx -y @modelcontextprotocol/server-brave-searchstdio
Playwrightclaude mcp add playwright -- npx -y @playwright/mcp@lateststdio
Filesystemclaude mcp add fs -- npx -y @modelcontextprotocol/server-filesystem /pathstdio

The stdio mode runs the server locally as a child process, which keeps tool-call overhead low; SSE and HTTP add a network round-trip.

Key takeaway: a single claude mcp add command is enough to connect a stdio server.

How to configure an MCP server in SSE or HTTP mode?

For remote MCP servers, prefer the Streamable HTTP transport. The SSE (Server-Sent Events) transport is deprecated; use HTTP servers instead where available, and treat SSE only as a legacy fallback. If you are new to Claude Code, the first conversations guide will help you understand tool interaction.

# Legacy fallback: SSE is deprecated, prefer HTTP when available
claude mcp add my-remote-server --transport sse https://mcp.example.com/sse

For the Streamable HTTP transport, introduced in the 2025-03-26 MCP spec revision:

claude mcp add my-http-server --transport http https://mcp.example.com/mcp
TransportUse caseLatency profileAuthentication
stdioLocal serversLowest, runs locallyToken env var
SSE (deprecated)Remote serversAdds a network round-tripHeader token or OAuth 2.0
Streamable HTTPCloud APIsAdds a network round-tripOAuth 2.0 or header token

The authentication column lists the typical choice per transport, not an exclusive rule. Both SSE and HTTP accept a static header token (--header "Authorization: Bearer ...") as well as OAuth 2.0, with OAuth being the recommended path for HTTP servers.

In practice, the stdio mode is suitable for most local use cases. Reserve Streamable HTTP (and, only as a legacy fallback, SSE) for servers hosted on a remote machine or in the cloud.

Here is how to verify the connection to a remote server:

claude mcp get my-remote-server

Key takeaway: stdio for local servers, Streamable HTTP for remote and cloud APIs (with OAuth); SSE is deprecated and only a legacy fallback.

How to use MCP tools in a Claude Code session?

Once your servers are added, Claude Code automatically detects the available tools. Start a session and ask Claude to use an MCP tool. The essential slash commands let you manage your servers directly in session.

claude
# In session, type:
> List the open issues of the anthropics/claude-code repo using the GitHub tool

Claude Code displays a permission request before each MCP call. Accept with y or configure auto-approval via permissions and security.

To see all available MCP tools in session, use the /mcp slash command:

> /mcp

This command displays the list of connected servers, their status, and exposed tools. Use /mcp to see the exact tools each connected server exposes (for GitHub, that typically covers issues, PRs, files, and branches). You can also check the conversation examples to see concrete MCP use cases.

Key takeaway: Claude Code detects MCP tools automatically. Ask in natural language what you want to do.

How to configure and secure MCP in 5 minutes?

MCP security relies on three mechanisms: environment variables for tokens, Claude Code permissions, and configuration scope. Configure your tokens via environment variables to avoid exposing them in configuration files. For more details, the MCP tips cover best practices.

export API_TOKEN="your_token_here"
claude mcp add my-server --env API_TOKEN=$API_TOKEN -- npx -y your-stdio-server

The --env option passes the environment variable to the stdio MCP process without writing it to .mcp.json. Many stdio MCP servers that require a token accept it via an environment variable. Remote servers such as GitHub instead use OAuth or a header-based token (--header "Authorization: Bearer ...").

To limit a server's scope to the current project, add the --scope project flag:

claude mcp add my-server --scope project --env API_TOKEN=$API_TOKEN -- npx -y your-stdio-server
ScopeConfig fileVisible to
user~/.claude.jsonAll your projects
project.mcp.json (project root)This project only

In practice, the project scope is recommended for repository-specific servers. The user scope is suitable for universal servers you want available across every project.

To dive deeper into the Claude Code permissions model, check the permissions and security guide which covers auto-approval rules.

Key takeaway: use --env for tokens, --scope project to isolate servers per project.

Here are widely used MCP servers from the community. Each can be installed with a single command. these servers are commonly adopted across MCP setups.

ServerFunctionInstallation
GitHubIssues, PRs, filesclaude mcp add --transport http github https://api.githubcopilot.com/mcp/ (remote HTTP)
PlaywrightBrowser automationnpx @playwright/mcp@latest
FilesystemFile read/writenpx @modelcontextprotocol/server-filesystem
PostgreSQLDatabase queriesnpx @bytebase/dbhub
Brave Search (archived reference)Web searchnpx @modelcontextprotocol/server-brave-search

The Playwright server can capture screenshots, navigate pages, and extract content. The GitHub server covers most common repository operations. Brave Search is an archived reference server, kept here as a historical example rather than a maintained option. Use /mcp to see the exact tools each connected server exposes.

To discover other servers and their advanced configurations, explore the MCP FAQ which answers the most frequent questions. You can also check the slash command examples to speed up your MCP workflow.

Key takeaway: GitHub, Playwright, and Filesystem cover most common MCP tool needs.

How to verify that everything works correctly?

Run this complete verification sequence in under 30 seconds. This test validates that your servers are connected, tools are accessible, and authentication works.

# 1. Check registered servers
claude mcp list

# 2. Launch Claude Code and test a tool
claude
> Use the GitHub tool to list my repos

If you see a spawn npx ENOENT error, your PATH does not contain npx. Fix with export PATH="$PATH:$(npm prefix -g)/bin" (the npm global bin directory shown by npm config get prefix). If a server shows disconnected, restart Claude Code. Restarting automatically reconnects all servers.

A stdio server starts quickly as a local child process, while a remote server takes longer to connect depending on network latency. To diagnose common issues, the installation tutorial includes a comprehensive troubleshooting section.

Key takeaway: claude mcp list is your primary diagnostic command. Use it at the slightest doubt.

How to go further with MCP and Claude Code?

MCP opens up extensive possibilities: chaining multiple servers, creating your own custom servers, and integrating CI/CD workflows. SFEIR Institute offers structured training to master these tools in real-world conditions.

To deepen your understanding of MCP and Claude Code, the one-day Claude Code training guides you through hands-on labs covering installation, MCP configuration, and advanced tool usage. You will leave with a fully operational augmented development environment.

If you want to integrate Claude Code into a complete development workflow, the two-day AI-Augmented Developer training covers assisted pair programming, test generation, and code review automation. For experienced developers, the one-day advanced training explores custom MCP server creation and multi-agent orchestration.

Here is how to continue your learning:

  1. Explore the complete MCP guide to understand the protocol architecture
  2. Practice with conversation examples integrating MCP tools
  3. Secure your configuration with the permissions guide
  4. Create your own MCP server by following the official specification on modelcontextprotocol.io

Key takeaway: MCP is an expanding ecosystem - start with the popular servers, then create your own based on your needs.

Recent articles about Claude

Recommended training

Claude Code Training

Master Claude Code fundamentals in 1 day with our expert instructors. 60% hands-on practice on real-world cases.

Discover the training