---
title: "Model Context Protocol Basics"
description: "MCP as the standardized bridge between LLM applications and external tools/data — the client-server layer beneath tool calling."
section: "concepts"
type: "concept"
created: "2026-08-30"
updated: "2026-08-30"
confidence: "high"
tags: ["agents", "tool-use", "protocols", "llm-fundamentals"]
canonical: "https://pyweb.dev/wiki/model-context-protocol-basics"
---
# Model Context Protocol Basics

The **Model Context Protocol (MCP)** standardizes how LLM applications connect to external tools and data sources. Where [tool calling loop](/wiki/tool-calling-loop) describes the in-conversation mechanics (tool calls and results inside the message history), MCP describes the plumbing: a client-server protocol where a host application (e.g. Claude Code) connects to MCP servers that expose tools, prompts, and resources.

## What It Looks Like in Practice
- A minimal MCP server can be a single script: create the server, connect it to a client like Claude Code, and expose "run this script" as a callable tool.
- Servers can expose **prompts** (reusable prompt templates, invocable like tools — `using-mcp-prompts`) and **resources** (data the client can read), not just tools.
- The value is composability: one server, many clients; one client, many servers — instead of N×M bespoke integrations.
- **Logging is a footgun:** verbose MCP server logging flows straight into the agent's context window; it must be treated as a [context budget audit](/wiki/context-budget-audit) cost, not free observability.

## Why It Matters
MCP decouples tool implementation from tool consumption. An agent harness ([agent harness engineering](/wiki/agent-harness-engineering)) can grow its capability surface by plugging in MCP servers without changing its core loop — the same [model provider abstraction](/wiki/model-provider-abstraction) logic applied to the tool side.

## Related
[tool calling loop](/wiki/tool-calling-loop), [llm message protocol](/wiki/llm-message-protocol), [agent native infrastructure](/wiki/agent-native-infrastructure), [ag ui protocol](/wiki/ag-ui-protocol), [model provider abstraction](/wiki/model-provider-abstraction).

---

## Agent Navigation

cluster: person (170 pages) | betweenness: 112.7

### References (outbound)
- [Tool Calling Loop](https://pyweb.dev/wiki/tool-calling-loop.md)
- [Context Budget Audit](https://pyweb.dev/wiki/context-budget-audit.md)
- [Agent Harness Engineering](https://pyweb.dev/wiki/agent-harness-engineering.md)

### Evidence (verified primary sources)
- raw/aihero-video/Qy8eUULqAyzkPzbq6YkSYPhrcrc00q01A5W01zzBYcAb01Y.md (internal workspace doc)
- raw/aihero-video/21vr8u5N01YJ023LXY00cjR01rWQXb1mpC2bVOibt64obKo.md (internal workspace doc)
- raw/aihero/using-mcp-prompts.md (internal workspace doc)
- raw/aihero/logging-a-huge-mcp-footgun.md (internal workspace doc)
- raw/aihero/how-does-the-model-context-protocol-work.md (internal workspace doc)

### Machine endpoints
- Knowledge graph: https://pyweb.dev/api/graph.json
- Graph analysis: https://pyweb.dev/api/graph-analysis.json
- Context index: https://pyweb.dev/llms.txt
