Connecting an AI agent to every available service can make it less effective: tool definitions and results compete with code for context, while each connection adds an attack surface. Model Context Protocol (MCP) reduces integration friction, but it does not eliminate the need to select and govern tools. section 3.3.5 section 9.5.1
MCP is an open standard based on JSON-RPC for communication between AI systems and external data sources or tools. An MCP client runs where the agent runs; domain-specific MCP servers expose structured, callable tools and translate requests to external systems. This replaces many one-off integration interfaces with a consistent protocol. section 3.3.1
Figure 3.2 MCPs and universal integration tools for agents - The MCP client (center) communicates with domain-specific servers via a standard protocol. Each server translates between the agent's requests and the external system's API, returning structured data the model can reason about.

The client connects to specialized servers through the same protocol; each server bridges to its external system. section 3.3.1
Building a component with current context
For a React profile card, an agent can retrieve design tokens and layout constraints through Figma, inspect an existing card through GitHub or a filesystem server, and look up the API response schema through a documentation server. The Figma call supplies a snapshot, not a live link: referencing a shared token is distinct from keeping the generated component connected to the design file. section 3.3.2 section 3.3.1
MCP can also extend research beyond the repository. A library-research server can find candidate file-picker packages, while Context7 retrieves installation instructions, API references, and examples for a selected library version. For code semantics, an MCP connection to the Metals language server can expose resolved Scala types and dependencies. That is build-time information, not proof of production configuration or runtime behavior. section 3.3.3 section 3.3.4
Keep the integration useful without letting it consume the working context:
- Choose a small set of integrations for the task and vet servers like production dependencies. Prompt injection, tool poisoning, and permission escalation are risks. section 3.3.5
- Measure context use. In one Claude Code session, MCP definitions occupied 58,400 tokens, or 29% of the window, leaving less room for code and conversation. section 9.5.1
- Consider a CLI when it provides the same function without persistent tool-definition overhead. Where many servers are needed, a proxy can load relevant capabilities on demand; a gateway can enforce access policies and audit requests. section 9.5.1 section 3.3.5
Treat MCP as the interface to information, not the information itself. Structured project knowledge can persist outside a session, while curated MCP integrations let an agent retrieve what a task needs. section 3.5.3 section 3.7




















