Core MCP Concepts
Foundational components of the Model Context Protocol.
MCP Client & host
The host application (e.g. Claude Desktop, cursor, or your custom agent runner) that coordinates LLM reasoning. It queries servers for capabilities and feeds tool outputs back to LLMs.
MCP Server
A lightweight, decoupled process exposing resources (read-only documents), tools (write/execute functions), and prompt templates to client applications.
Sampling Protocol
Allows an MCP server to request LLM generations from the client. Enables agentic feedback loops where the server can request sub-tasks or translations dynamically.
Roots API
Exposes client-managed workspace paths and folders to servers. Allows servers to safely scan and understand project layouts with explicit client consent.
Transport Layer
Supports local connection via stdio pipes (stdin/stdout) and network orchestration via SSE (Server-Sent Events) over HTTP endpoints.
Contextual Prompts
Templates exposed by servers. Provides preset instruction patterns so clients can format specific database structure queries or schema checks cleanly.
Protocol Specification
JSON-RPC 2.0 message format exchanges under MCP standard.
1. Listing Tools (`tools/list`)
Sent by the client to query available executable capabilities of the server.
2. Calling Tools (`tools/call`)
Sent by the client to invoke a tool function with parameters on the server.
Setup & Installation
Configure your environment for building and running MCP servers and clients.
1. SDK Installation
Install the official developer toolkits for Python and TypeScript/Node.js.
2. Claude Desktop host config
Expose custom servers to Claude Desktop by updating the configuration file:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Developer Implementations
Complete, production-ready server and client implementations in Python.