> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Why AI Integration Was Broken The NM Problem

> Explains how AI integrations scale poorly as N agents times M tools and advocates a shared adapter standard like MCP to reduce complexity from N×M to N+M

Think of the drawer full of chargers and cables at home. You probably own several different types, and the exact one you need is seldom where you expect it. For many years, AI integrations produced the same kind of clutter: lots of bespoke connectors, duplicated effort, and growing maintenance costs.

## The core problem: N agents × M tools

On one side you have AI assistants or agents — call that count N. On the other side you have the internal systems those agents must interact with (GitHub, Jira, Postgres, Slack, etc.) — call that count M.

Without a shared integration standard, engineers build direct, custom connectors for every agent-tool pair. Each connector must implement authentication, map data to/from the tool’s API, and handle retries and errors. Even when two agents integrate with the same service, they often implement that integration independently.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/MhECTHF5dIfjn_ai/images/AI-Foundations-for-Technical-Professionals/The-Ecosystem-MCP-Frameworks-and-Automation/Why-AI-Integration-Was-Broken-The-NM-Problem/man-lightboard-integrations-gh-jira-slack.jpg?fit=max&auto=format&n=MhECTHF5dIfjn_ai&q=85&s=30f4dc4c8a285c4b536b8c76f3e4fbf5" alt="A man stands beside a glowing lightboard holding a marker. The board shows three green boxes labeled A1–A3 connected by lines to four yellow boxes labeled GH, Jira, PostG, and Slack, with &#x22;N x M&#x22; and the number 12 written." width="1920" height="1080" data-path="images/AI-Foundations-for-Technical-Professionals/The-Ecosystem-MCP-Frameworks-and-Automation/Why-AI-Integration-Was-Broken-The-NM-Problem/man-lightboard-integrations-gh-jira-slack.jpg" />
</Frame>

This direct-pairing model produces N × M custom integrations to build and maintain. For example:

* With 3 agents and 4 tools: 3 × 4 = 12 connectors.
* With 50 agents and 10 tools: 50 × 10 = 500 connectors.

Each additional agent adds M connectors; each new tool adds N connectors. At scale that quickly becomes unsustainable.

## Why this is costly

* Duplication of effort across teams.
* Inconsistent authentication and error semantics.
* Fragmented maintenance: bug fixes and feature changes must be applied across many connectors.
* Slower onboarding for new agents or tools.

| Pattern | Implementations required | Example (N=50, M=10) |
| - | -: | -: |
| Direct pairings (N × M) | N × M connectors | 50 × 10 = 500 |
| Adapter/standard (N + M) | N + M adapters | 50 + 10 = 60 |

## The maintainable alternative: a shared standard and adapters

A far more maintainable approach is to introduce a shared integration standard between agents and tools. Each agent implements a client-side adapter for that standard, and each tool implements a server-side adapter. Instead of N × M pairings, you build N client adapters plus M tool adapters — a total of N + M implementations.

That dramatically reduces integration surface area and simplifies cross-team coordination.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/MhECTHF5dIfjn_ai/images/AI-Foundations-for-Technical-Professionals/The-Ecosystem-MCP-Frameworks-and-Automation/Why-AI-Integration-Was-Broken-The-NM-Problem/lightboard-apps-to-services-s-architecture.jpg?fit=max&auto=format&n=MhECTHF5dIfjn_ai&q=85&s=7a5206f51d0ace6312414e88e81e979f" alt="A presenter gestures next to a glowing lightboard diagram. The board shows three apps (A1, A2, A3) wired to services like GH, Jira, PostG and Slack, with a simplified consolidated &#x22;S&#x22; architecture on the right." width="1920" height="1080" data-path="images/AI-Foundations-for-Technical-Professionals/The-Ecosystem-MCP-Frameworks-and-Automation/Why-AI-Integration-Was-Broken-The-NM-Problem/lightboard-apps-to-services-s-architecture.jpg" />
</Frame>

This is analogous to how USB-C standardized hardware power and data connections: both sides agree on a single protocol so you don’t need a different charger for every device. In software, a shared protocol centralizes responsibilities (authentication flows, data serialization, error semantics) and moves them into the standard and its adapters, reducing duplication.

## MCP: the shared standard for AI integrations

For AI applications and tools, the shared standard often used is MCP. When hosts, clients, and servers adopt MCP, the architecture becomes modular: defined adapters handle the integration boundaries, and the standard ensures consistent behavior across the ecosystem.

<Callout icon="lightbulb" color="#1CB2FE">
  Using a shared standard like MCP converts the integration problem from O(N×M) work to O(N+M). That reduces long-term maintenance, accelerates onboarding, and makes security and observability consistent across integrations.
</Callout>

Key responsibilities for each adapter typically include:

* Authentication and authorization flows for the specific tool or agent.
* Data serialization and mapping between the standard’s contract and the tool’s API.
* Error semantics, retries, and observability (logging/metrics/tracing).
* Security controls and permission checks at the integration boundary.

<Callout icon="warning" color="#FF6B6B">
  Without a standard, teams accumulate technical debt: duplicated connectors, inconsistent behavior, and an exploding maintenance burden. Introducing a well-defined adapter pattern early avoids costly refactors later.
</Callout>

## Links and references

* [USB-C (standardization analogy)](https://en.wikipedia.org/wiki/USB-C)
* Learn more about MCP and adapter design patterns in your platform documentation.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/ai-foundations-for-technical-professionals/module/dc9aae13-d9f2-42ee-8f39-75abdf313e95/lesson/028e6380-4ecf-4a91-b1a5-1956599ce156" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.