MCP: Model Context ProtocolBeginnerModule 01 — Understanding the need for MCP

What integration problems was MCP designed to solve in multi-host environments?

Question 5 of 43 · Updated

On this page

Short answer#

The Model Context Protocol (MCP) was designed to solve the problem of repeatedly building custom connections between AI applications and external tools or data sources. When several AI hosts need the same business capabilities, each host may otherwise require its own integration code, tool descriptions, discovery logic and result conversion. A common protocol allows service developers to expose a reusable capability through an MCP server while compatible hosts implement an MCP client interface to consume it.

The result is a standardized integration boundary: hosts and service integrations can evolve more independently. MCP does not remove all integration work, guarantee compatibility between every pair of implementations, or authorize all hosts to access the same data.

Learning scope: This beginner lesson explains the multi-host integration problem through a concrete example and a simplified counting model. The previous four questions introduce MCP and practical LangChain connections, transport configuration and credentials. This lesson explains why a reusable protocol boundary matters. Subsequent roadmap questions examine the older integration approaches, operational scaling challenges and interoperability in more depth.

Verification note: Prepared using the authorized offline research exception and established protocol knowledge. MCP specification 2025-06-18 is used as a historical baseline, not asserted to be the latest revision. Official links were not opened live. The dependency-free integration-count example was executed with Python 3.13.5; all ten checks passed. The diagrams use standard fenced Mermaid flowchart syntax; actual Mermaid parsing and website rendering were not verified in this environment. No live SDK integration or performance measurement is claimed.

1. Imagine three AI applications at one company#

An online retailer has three separate AI applications:

  • A developer assistant used inside an IDE.
  • A customer support assistant used by employees.
  • An operations assistant used by warehouse staff.

They need access to four systems: inventory, orders, product documentation and delivery tracking.

In this example, each of the three AI applications needs an appropriate subset of those four services. To illustrate the maximum integration problem, assume all three require all four. Their users and permissions may differ, even when they use the same service.

The underlying inventory service is not new. It already provides an API or database that can report the number of units in stock. The problem is providing that existing capability to multiple AI applications with different frameworks, tool interfaces and runtime environments.

Without a shared integration boundary#

Loading diagram…

Each arrow represents a potential host-specific integration, not necessarily a separate network connection or a separate running service. Three hosts times four services produce twelve possible pairings.

For example, the developer assistant might describe a stock lookup as get_inventory(sku), the support assistant might expose check_stock(product_id), and the operations assistant might expose warehouse_inventory(item_code). These names are illustrative. If each implementation independently maps model arguments to the inventory API, the company must maintain several descriptions, validation paths, result mappings and error translations for essentially the same capability.

Common utility libraries, existing REST APIs, shared OpenAPI descriptions, gateways and internal SDKs can already reduce duplication. MCP did not invent reuse. Its distinguishing contribution is a shared protocol designed for AI application integrations, including capability discovery and invocation across compatible implementations.

2. What exactly is difficult about custom integrations?#

Problem A: Repeated translation#

AI applications may have different ways to represent a callable tool. The business service may use REST requests, database queries or another internal protocol. Each integration translates between these layers.

For a stock lookup, one application might expect the result to be a number, another a text response and a third a dictionary with an availability field. If those mappings are all embedded in host-specific integrations, adding a new host repeats the work.

MCP standardizes a portion of this boundary by defining messages and discoverable capabilities. Hosts can implement their own model-provider mappings once for supported MCP capabilities instead of building a bespoke framework-specific translation for every service.

Problem B: Inconsistent capability discovery#

How does a new AI application know which operations an inventory service supports? Without a shared convention, developers may rely on handwritten configuration, separate documentation or framework-specific registries.

An MCP server can advertise its supported tools, resources and prompts through the appropriate protocol mechanisms. For example, a compatible client can discover a stock tool with its name, description and input schema rather than requiring a new hardcoded interface for each host. Not every server exposes all capability types; clients need to check what their negotiated implementation supports.

Discovery makes the service contract easier to consume, but it does not automatically grant permission to execute a tool. The host and server still apply security policy.

Problem C: Tightly coupled changes#

Suppose the inventory API changes its internal field name from quantity to available_units. If all three hosts call the API directly and depend on the original name, each may need an update.

An MCP server can adapt to the new internal API while preserving a compatible stock tool contract. The hosts can continue using the same contract if its semantics remain unchanged.

This is not a guarantee of zero maintenance. If the meaning of the tool changes, its schema becomes incompatible, or clients support different protocol features, changes may still be required. A shared boundary simply makes it possible to isolate some changes in one place.

Problem D: Different release cycles#

The IDE team, support team and inventory service team may deploy on different schedules. Pairwise integration code makes it easier for a new business service version to require coordinated updates across application teams.

With a stable MCP contract, the service team can maintain its underlying adapter and the host teams can maintain their own client implementations. Compatibility tests and contract versioning help the teams release more independently. The protocol is a common language; it does not enforce organizational coordination or eliminate release management.

Problem E: Difficult reuse across frameworks#

An integration written specifically for a LangChain application might use abstractions that another host cannot directly consume. Rewriting the entire business integration when switching frameworks increases cost and introduces divergent behavior.

By exposing business capabilities through an MCP server, a LangChain host can use an appropriate MCP adapter, while a different compatible host can use its own MCP client. The reusable server need not depend on either agent framework. Provider-specific tool conversion and model behavior remain host concerns.

3. The same company using MCP#

Loading diagram…

Important: The middle box represents the common protocol contract, not an actual centralized router, gateway or running MCP process. Each host still establishes its own appropriate connections to the selected servers. In the session-oriented historical baseline, a client connection is associated with one server; a host can manage multiple clients. The figure groups those relationships to emphasize reusable implementation boundaries rather than the number of network connections.

The inventory MCP server is responsible for exposing an agreed inventory operation and mapping it to the underlying business service. The developer host, support host and operations host are responsible for their own MCP client support, authorization context and presentation of the result. The hosts can use different language models or frameworks.

This gives each side a smaller, clearer responsibility:

LayerResponsibility
Business systemStore data and enforce business rules
MCP serverExpose supported capabilities and adapt them to the business system
MCP clientCommunicate with a server using the supported protocol and transport
AI hostSelect appropriate capabilities, manage identity and consent, orchestrate the model and present results

A host is the application, such as an IDE or chat assistant. A model is only one part of that host. The model itself does not establish MCP connections or maintain credentials.

4. The M × N integration problem#

Let H be the number of AI hosts, and S be the number of external services.

In a simplified fully connected architecture, building a separate custom adapter for each pair can require up to H × S pair-specific adapter implementations.

Under ideal reusable-contract assumptions, each host implements compatible client support and each service exposes a compatible server adapter. This produces H + S conceptual integration components instead of H × S pair-specific adapters.

For three hosts and four services:

ArchitectureIllustrative component count
Custom pairwise integrations3 × 4 = 12
Common protocol integrations3 + 4 = 7

Now add one more AI host:

ArchitectureBeforeAfterAdded components
Pairwise12164
Shared protocol781

Alternatively, add one more service to the original three-host architecture. Pairwise implementations increase from 12 to 15, while the conceptual common-protocol component count increases from 7 to 8.

The H + S count is a useful mental model, not a law of MCP engineering. It assumes fully reusable compatible implementations, one client integration per host and one server integration per service. An organization may already share adapters; a host may consume a common client SDK without implementing protocol code from scratch; several services may be represented behind one server; and some host-service pairings may be unnecessary.

There can still be up to H × S runtime relationships, individual configurations, permission grants and compatibility checks. You should never report this formula as the exact number of sockets, sessions, processes, HTTP calls, developers or production deployments. It describes potential custom implementation reuse, not measured cost or throughput.

5. Test the counting model with Python#

A small standard-library-only exercise makes the assumptions visible. It does not implement MCP, and does not require a model, an API key or a server.

PYTHON
def integration_counts(hosts, services): if type(hosts) is not int or type(services) is not int or hosts < 1 or services < 1: raise ValueError('Use positive integer counts') return hosts * services, hosts + services assert integration_counts(3, 4) == (12, 7) assert integration_counts(4, 4) == (16, 8) assert integration_counts(3, 5) == (15, 8) assert integration_counts(1, 1) == (1, 2) assert integration_counts(2, 2) == (4, 4) assert integration_counts(10, 20) == (200, 30) for h, s in [(0, 4), (3, -1), (True, 4), (3.0, 4)]: try: integration_counts(h, s) except ValueError: pass else: raise AssertionError('Expected invalid count rejection') print('10 checks passed') for h, s in [(3, 4), (4, 4), (3, 5), (10, 20)]: print(h, s, *integration_counts(h, s))

Actual output from Python 3.13.5:

10 checks passed
3 4 12 7
4 4 16 8
3 5 15 8
10 20 200 30

Each numeric output row shows host count, service count, conceptual pair-specific adapters and conceptual common-protocol components.

Six assertions check normal examples, including two important edge cases: one host and one service (1 versus 2) and two hosts and two services (4 versus 4). Four additional cases check invalid inputs. The example deliberately rejects booleans and floating-point numbers as counts.

The single-host case shows that MCP may introduce an extra boundary compared with a direct integration. A small project does not necessarily benefit from MCP just because it is standardized. The benefits are more compelling when capabilities are shared or integrations are expected to evolve independently.

These tests validate arithmetic and input checks only. They do not prove real-world cost savings, MCP conformance, authorization or interoperability.

6. Walk through one reusable business capability#

Suppose inventory exposes a stock lookup. The service's MCP tool advertises a contract that accepts a SKU and returns available stock. An example input is:

JSON
{"sku":"A12"}

The business meaning of the result could be:

JSON
{"sku":"A12","available_units":7}

These examples illustrate tool input and application-level output data, not complete MCP JSON-RPC request or result envelopes. A real implementation represents them using the relevant tool schema and result content format of the negotiated specification.

The three hosts can use that same contract for different purposes:

  • The developer assistant can help a developer investigate whether an inventory test fixture is consistent with an authorized stock lookup.
  • The support assistant can answer a customer question using a permitted product availability response.
  • The operations assistant can compare stock with a reorder threshold.

The server integration is reusable because the inventory lookup is independent of how each host phrases its answer or arranges its workflow. The operations assistant may have access to additional warehouse data, while the support assistant may receive only information appropriate for customers. Reuse does not mean identical permissions or a shared user session.

When the inventory team changes its internal storage system, it may preserve the outward tool contract by adapting the server implementation. The consumer does not need to learn the new storage schema unless the exposed business contract changes.

7. What MCP does not automatically solve#

A shared protocol solves a communication and integration contract problem. It does not automatically solve every other challenge in an AI system.

Incorrect assumptionCorrect interpretation
Every MCP server works with every hostClients and servers need compatible protocol versions, transports, capabilities and supported schemas
MCP replaces REST APIs and databasesMCP servers often wrap existing APIs, databases and other services
MCP removes all host-specific workHosts still manage model-provider mapping, UX, policies and orchestration
Connecting to one server grants access to every toolEach operation must be permitted for the authenticated identity
A shared protocol eliminates runtime connectionsEach host still needs appropriate configured communication paths
MCP makes tools accurate or trustworthy automaticallyBusiness correctness, security, testing and monitoring remain engineering responsibilities
MCP makes agent outputs deterministicModel decisions can vary and must be controlled appropriately

A reusable server can also become a shared dependency: a regression may affect several hosts rather than just one. Use contract tests, reviewed deployments, compatible changes and appropriate reliability controls. Whether the trade-off is worthwhile depends on the actual application, not just an integration-count formula.

8. Interview-ready answer#

MCP addresses the many-to-many integration problem between AI application hosts and external services. Instead of every host maintaining a bespoke adapter for every service, compatible hosts can implement a common MCP client interface and services can expose reusable MCP server capabilities. This standardizes discovery and invocation, reduces repeated translations and helps service implementations evolve separately from the host applications. In a simplified fully connected case, H hosts and S services may require H × S custom pairings versus H + S reusable integration components, but actual effort depends on compatibility, existing shared libraries, configurations and policies. MCP does not replace the downstream APIs, host orchestration or security controls.

Key takeaway#

Think of MCP as a common contract at the boundary between AI applications and the capabilities they need. Its value is not that all tools become identical; it is that different applications can consume appropriate capabilities through a consistent interface without rebuilding the entire business integration for each host.

The next lesson looks at the concrete ways developers connected AI applications to external systems before MCP, building on the custom-integration problem introduced here.

References

  1. 1.
    MCP documentationmodelcontextprotocol.io
  2. 2.
    MCP specification (2025-06-18)modelcontextprotocol.io
  3. 3.
    MCP architecture (2025-06-18)modelcontextprotocol.io
  4. 4.
    MCP tools (2025-06-18)modelcontextprotocol.io
  5. 5.
  6. 6.

Related questions

Explore other topics:Forward Deployed EngineeringAI AgentsLarge Language ModelsRetrieval-Augmented Generation