Overview
An MCP server exposes three high-level things that clients rely on:- Tools — callable functions or APIs the server offers.
- Resources — documents or data to help model reasoning (policies, guides, FAQs).
- Prompts — pre-defined instructions or behavior templates for LLMs.
Key entities exposed by an MCP server
Tools: what a client needs to know
When building a client you must first discover what tools a server offers — what can it do? Each tool includes:- A name and human-friendly title,
- A description,
- Input and output schemas (so the client and LLM know how to call and parse results).
Resources: structured supporting data
Resources are referenced by URI and contain metadata so models and clients know how to fetch and interpret them. A resource object typically includes:uri, name, title, description, and mimeType. URIs can be HTTPS, file URIs, or Git locations.
Example JSON-RPC result listing resources:

Prompts: instructing the LLM
Prompts encode behavior or constraints the LLM should follow when using tools or reasoning with resources. They can include argument schemas so the model knows what inputs to provide. Example user utterance and a prompt instruction:How server and client communicate: JSON-RPC
MCP uses JSON-RPC 2.0 as the RPC layer. JSON-RPC defines the envelope for requests and responses. Important fields:- Request:
jsonrpc(must be"2.0"),method,params,id - Response:
jsonrpc,result(orerror),id
Transports MCP commonly supports

Local vs Remote MCP servers
- Local hosting: run a server locally and connect over STDIO or HTTP. STDIO is common for IDE extensions because the editor spawns the server process and uses fast two-process communication.
- Remote hosting: connect to a vendor or central server over HTTPS. Remote hosting introduces security, authentication, and privacy concerns.
If you connect to a remote MCP server, ensure you understand the security and privacy implications. Transmitting sensitive user data to a third-party server requires clear policies and controls.
Best practice: prefer local servers or vetted private endpoints when handling sensitive data. If using remote MCP servers, enforce authentication, encrypt transport, and limit the scope of what is shared.
Why use MCP instead of calling upstream APIs directly?
Using an MCP server centralizes integration logic:- The server aggregates and standardizes third-party APIs into tools with consistent schemas.
- Resources and prompts live with the server, so the model can reference authoritative documents.
- Clients simply discover tools and call them via the MCP client, rather than re-implementing many API integrations.
Connecting an IDE or client to an MCP server: configuration examples
Clients typically configure MCP endpoints in a JSON file (e.g.,mcp.json) that lists servers and how to connect to them.
Example: spawn a local server via STDIO (useful for IDEs):
Typical client session flow (pseudocode)
A common flow when building an app or agent that uses MCP:Recap
This lesson covered:- The three core MCP entities: tools, resources, and prompts.
- How MCP uses JSON-RPC 2.0 as the RPC layer and supports multiple transports (HTTP, STDIO, TCP, etc.).
- How clients discover tools, fetch resources, and invoke tools through an MCP client.
- Configuration patterns for local STDIO-based servers and remote HTTP(S) servers.
- A typical session flow for integrating an MCP client into an application.
- JSON-RPC 2.0 specification: https://www.jsonrpc.org/specification
- If you plan to deploy MCP servers in production, document authentication, authorization, logging, and data retention policies for compliance and privacy.