Agentic AI & Tool Use

Model Context Protocol (MCP)

The Model Context Protocol is an open standard for how a model-powered application connects to external tools, data, and prompts. Before such standards, every assistant wired each integration by hand, producing an N-by-M tangle of bespoke connectors. MCP plays the role USB or the language-server protocol played elsewhere: define one interface, and any compliant client can talk to any compliant server.

Architecturally a host application runs MCP clients that each maintain a session with an MCP server over JSON-RPC. Servers expose three primitives — tools (callable functions the model can invoke), resources (readable data the host can attach to context), and prompts (reusable templated instructions) — discoverable at runtime so the host learns a server's capabilities without being recompiled. Transport can be local over standard input/output or remote over HTTP with streaming, and the protocol specifies negotiation, capability advertisement, and structured results.

MCP standardizes the plumbing, not the policy: it does not decide whether a tool call is safe, correct, or authorized, so hosts must still layer permissioning, sandboxing, and human approval on top. A connected server can return adversarial content or instructions, making prompt-injection defense and least-privilege scoping essential parts of any real deployment.

MCP defines transport and capability discovery, not trust: a server's tools and returned resources are untrusted input and must be treated as a prompt-injection surface.

Also called
MCP模型上下文協定