Model Context Protocol (MCP) Design Patterns logopeterindia.net
Knowledge Hub

Model Context Protocol (MCP) Design Patterns

Six common ways to structure MCP servers — from a thin wrapper over one API to hierarchies of domain servers — with the specification, SDKs and security guidance behind them.

46 topics•6 categories•Updated October 2026

Choosing an MCP Design Pattern

3 entries

The Model Context Protocol (MCP) lets an AI agent discover and call tools, read resources and use prompts exposed by servers. How a server is structured matters as much as the protocol. Six patterns come up repeatedly. A direct API wrapper maps tools one-to-one onto an existing API and suits stable APIs and quick integrations. A composite service hides several APIs behind higher-level tools for complex workflows. An MCP-to-agent server calls specialist agents for focused reasoning. An event-driven server publishes events or runs long operations asynchronously so the agent does not block. A hierarchical setup puts a domain-level server in front of sub-domain servers. A local resource access server runs on the same machine for files and other local data. These patterns can be combined; this page links each to the specification and tools that support it. The six-pattern framing follows an infographic shared by Rakesh Gohel (@rakeshgohel01); the descriptions here are written independently.

The Six Patterns

6 entries

Each pattern with a resource that supports it.

Specification & Core Concepts

11 entries

The protocol features patterns are built from.

SDKs, Frameworks & Tools

10 entries

Build, test and publish MCP servers.

Security & Governance

4 entries

Authorization and risks that grow with each pattern.

Related Pages

12 entries

Neighbouring pages on this site.

Frequently Asked Questions

What are MCP design patterns?

They are recurring ways of structuring MCP servers: wrapping one API directly, composing several APIs into higher-level tools, delegating to specialist agents, handling events and long-running work asynchronously, organizing servers in a hierarchy, and exposing local resources. The names are conventions, not part of the specification.

When should I use a direct API wrapper?

When you already have a stable API and want agents to use it quickly. Mapping each endpoint to a tool is simple, but a long list of fine-grained tools can overwhelm a model, so consider a composite service if workflows span many calls.

What is the difference between MCP and A2A?

MCP connects an agent to tools and data exposed by servers, while the Agent2Agent protocol is for communication between agents. An MCP-to-agent pattern combines them by letting a tool call another agent.

How do I handle long-running work in MCP?

Use an asynchronous approach so the agent does not block, for example the Tasks extension documented by MCP, or tools that start a job and return an identifier to poll. Check the current specification for supported features.

Is a local MCP server safer than a remote one?

Not automatically. A local stdio server avoids network exposure but still runs with the user's permissions and can read or change local files, so limit its scope with least privilege and explicit paths (the Roots feature is deprecated in the current specification). Remote servers need authorization and the guidance in the MCP security best practices.

How current is this page?

Links were checked in October 2026. The pattern names below are common ways of describing how MCP servers are used, not terms defined by the MCP specification, which changes over time. Sites that block automated checks are kept and may need a manual click.