Est.

MCP Server vs AI Agent Responsibilities

Agents decide what to do; MCP servers decide what's allowed.

Staff Writer · · 11 min read · Updated
Cover illustration for “MCP Server vs AI Agent Responsibilities”
MCP Server Management · September 1, 2026 · 11 min read · 2,544 words

AI agents decide what to do. MCP servers decide whether they're allowed to do it. That distinction sounds obvious once someone says it out loud, but a growing share of enterprise AI deployments treat the two as interchangeable parts of one blurry "AI stack," and the confusion now shows up in breach reports rather than architecture diagrams. Anthropic introduced the Model Context Protocol in November 2024 as an open standard for connecting agents to tools and data; governance of the protocol moved to the Linux Foundation, through the Agentic AI Foundation, in December 2025. That handoff signals enterprise intent, but most organizations still can't say with confidence which layer owns which decision. That confusion is the whole subject here, and most teams are getting it backwards: they harden the agent and leave the server wide open, when the server is where the real damage happens.

An agent's job is cognitive. It takes a goal, breaks it into steps, picks which tools to call and in what order, and adjusts when something doesn't go as planned. Interpreting, deciding, acting, and iterating in a loop is the entire job description. The attack surface that comes with it is behavioral too: an agent talked into calling a tool it shouldn't has suffered a failure of judgment, and no amount of infrastructure fixes bad judgment after the fact.

An MCP server's job runs in the opposite direction. It exposes a defined set of capabilities, tools, data, actions, through a standard interface, and it decides what an agent actually gets to retrieve or execute. It handles authentication and authorization against whatever sits downstream, a Postgres instance, a Salesforce API, an internal billing system, and it resolves the right stored credential for the right user or service context. In theory it enforces least privilege while doing this. Its attack surface looks nothing like the agent's: overly broad scopes, sloppy secret storage, no real audit trail.

Here's the part that gets glossed over constantly: the agent typically authenticates once, to the MCP server, using a server-level credential, and from that point forward, the server carries all downstream authorization on the agent's behalf. That's a convenient design, and it's also why a compromised MCP server does more damage than a compromised agent ever could on its own. The State of MCP Server Security 2025 report from NHI Management Group found that 53% of MCP servers expose credentials through hard-coded values sitting in configuration files. That's the median, not an outlier.

Agent-side credentials come in three flavors, and they don't behave the same way at all. Static API keys are cheap to issue and a pain to revoke cleanly once something goes wrong. OAuth 2.0 client credentials map onto identity infrastructure most enterprises already run. OIDC workload tokens expire on their own, which makes them the closest thing to a credential that cleans up after itself.

Where the boundary breaks down and what it costs

The blur runs in two directions, and neither is defensible. Sometimes agents get handed direct system access, skipping the MCP layer entirely because wiring it up properly takes longer. Other times MCP servers get stuffed with decision logic they were never built to hold: business rules, conditional branching, judgment calls that belong upstream with the agent. Either pattern erases the line between who decides and what's permitted, and once that line is gone, there's no clean place left to hang a control.

The resulting mess has a name: shadow AI. When agents run without a governed MCP layer in front of them, nothing records what they touched, what credential they used, or what they did once inside. Nobody's watching, because nobody built the thing that watches.

The trend line is bad and getting worse. Organizations that call shadow AI a definite or probable challenge jumped from 61% in 2025 to 76% in 2026. IBM's 2026 Cost of a Data Breach Report traced 43% of breached organizations' incidents to shadow AI, more than double the 20% figure from the year before. This is a measured, growing breach vector, documented in incident data rather than raised as a hypothetical in a meeting.

The operational cost compounds the financial one. Shadow AI breaches took an average of 247 days to detect, six days longer than standard breaches, and they exposed customer PII at a much higher rate, 65% against a 53% global average. AI agents also move roughly 16 times more data than a typical human user, so compromising one agent operating across a blurred boundary produces a breach that scales with everything that agent could reach. Ask who's accountable for catching that kind of breach, the agent or the server, and the honest answer, absent a clear boundary, is neither.

Why prompt injection hits differently when agents and servers share unclear authority

Prompt injection sits at the top of the OWASP Top 10 for LLM Applications 2025, a ranking that stands as the security community's clearest possible statement about where agentic systems actually bleed.

The mechanism is almost insultingly simple. An agent gets compromised through content it was designed to read: a sentence buried in a retrieved document, a comment in a code file, text sitting on a webpage the agent was told to summarize. No stolen credentials, no malware, no exploit required. Just language doing what language does. If the MCP server behind that agent has zero visibility into what's being requested or why, it has no way to notice that three sentences of injected text just hijacked the agent's behavior.

IBM X-Force reported that prompt injection attacks targeting AI agents tripled in 2024. Indirect prompt injection attacks have moved well beyond lab demos and have been observed against live commercial platforms in the wild. And EchoLeak, a zero-click vulnerability in Microsoft 365 Copilot carrying a CVSS score of 9.3, showed exactly what happens when the gap between what an agent processes and what the serving layer can see gets exploited for real.

The fix is structural, and this is worth stating plainly: agent-side prompt hygiene alone will not save anyone. Filtering, careful system prompts, whatever else gets bolted onto the agent, helps at the margins but doesn't solve the problem, because it asks the compromised party to report its own compromise. The MCP server layer needs real-time traffic inspection so it can flag and block injection payloads before tool execution happens, well before any postmortem gets written after the damage is done. Server-side detection has to exist as an independent control, full stop.

The identity problem that spans both sides of the boundary

Here's a number worth sitting with: only 22% of organizations treat AI agents as independent, identity-bearing entities, even though those agents authenticate, act, and accumulate permissions exactly the way a service account does. Fewer still have a formal strategy for managing non-human identities at all, and this despite agents being in widespread active use across the industry. That gap is wide enough to call a canyon, and most of the industry is standing at the edge of it pretending the drop isn't there.

Agents need identities that the agent layer manages and owns, and MCP servers need to enforce access policy against those identities. Connecting the two takes infrastructure that, per the same numbers, roughly one in ten organizations actually has.

MCP's own authentication story reflects how young this all still is. The original specification shipped with no real authentication framework at all. The June 2025 update introduced OAuth 2.1 and established that MCP servers should function as OAuth Resource Servers, delegating token issuance to a separate Authorization Server instead of handling it themselves. That's a meaningful correction, and it maps cleanly onto identity providers enterprises already run: OAuth client credentials and OIDC workload tokens slot into the service principal constructs that Entra ID and Okta already support. But it only works if the agent gets registered as a real identity-bearing entity from the start, rather than left as an anonymous script with a key taped to it.

Static API keys are the hardest of the three credential types to govern and remain the most common choice in early deployments, which lines up with that 53% hard-coded-credential figure from earlier. OAuth 2.0 client credentials map to existing IAM constructs and support scoped access. OIDC workload tokens, short-lived and cloud-provider-issued, are the most auditable of the three. The identity gap shows up as a recurring line item in incident reports, with breach data consistently pointing to absent or insufficient AI access controls as a root cause.

The right model isn't complicated to describe, even if it's hard to build: agents carry fine-grained, role-based permissions tied to identity providers that already exist inside the enterprise, and MCP servers enforce those permissions at the moment of execution. Two layers, each doing its own job.

What a governed layer between agents and MCP servers actually does

Nothing in the MCP specification requires a gateway between agents and servers, but practice disagrees with the spec on this point, and practice wins. Once an organization runs more than a handful of MCP servers, has multiple teams building against them, touches regulated data, or answers to compliance obligations that don't disappear because the architecture is new, a gateway stops being optional. Picture a purpose-built reverse proxy for MCP traffic: centralized infrastructure that routes, authenticates, and watches everything passing between agents and the servers they call.

The gateway owns authentication, routing, policy enforcement, credential management, observability, shadow AI detection, and injection scanning. The MCP server still owns tool execution and the downstream connection itself. The gateway governs access to that gatekeeper, adding accountability above it rather than beneath it.

This is how a gateway closes the shadow AI gap described earlier. Route every agent connection through governed infrastructure, and the gateway can keep a catalog of approved MCP servers, enforce role-based access control against that catalog, and block any unauthorized server connection on sight. The visibility gap that let shadow AI spread in the first place stops existing, because there's no path around the gateway to begin with. Security-first gateway builds scan traffic in real time and block payloads that trip injection detection, the exact server-side control from the section above, moved onto infrastructure built to do nothing else.

The demand for this isn't speculative. Security concerns rank as the top challenge for 53% to 62% of respondents in regulated industries deploying MCP, per 2025 enterprise AI infrastructure research. A vendor category has already formed around the gap: Lunar.dev's MCPX, TrueFoundry (named a Representative Vendor in Gartner's 2025 Market Guide for AI Gateways), Kong's Enterprise MCP Gateway, Bifrost, Lasso Security, WSO2, Tyk AI Studio, and Solo.io each attack the problem from a different angle, some from API gateway roots, some from security-first scanning, some from identity-native design.

The observability gap that governance frameworks rarely address

The EU AI Act, NIST's AI Risk Management Framework, and ISO/IEC 42001 all demand auditability. Demanding it and having it are two different states of being, and most organizations live in the first while regulators assume they've reached the second.

Regulatory pressure isn't easing up, either: more than 75 countries had adopted or begun drafting AI legislation as of July 2025, and audit requirements are multiplying across jurisdictions faster than most compliance teams can track them.

What actually needs capturing is specific, not abstract. Every tool invocation: which agent called which server, with what parameters, at what time. Every credential usage: which stored credential got resolved, for which downstream system. Cost telemetry: token consumption and compute cost tied to agent, team, and use case. Anomaly signals: unusual invocation volume, unexpected data pulls, activity at 3 a.m. with no business reason to exist. Most organizations aren't capturing most of this. Cisco's 2025 research found that 83% of organizations lack even basic controls to prevent AI-related data exposure, and 46% have already had internal data leaks through generative AI tools. Neither number should surprise anyone who accepts a simple premise: you cannot control what you cannot see, and most of the industry currently can't see much of anything.

That 247-day mean detection time for shadow AI breaches, cited earlier, is partly just an observability failure wearing a different name. Without telemetry sitting at the agent-server boundary, there's no signal to trigger detection in the first place. By design, the breach was never going to get caught at all, late or otherwise. Full-stack observability, agent behavior, server-side execution, credential usage, is what makes any policy enforceable once the system runs in production, and it earns that role through continuous use, not through a dashboard bolted on afterward for the compliance team to admire.

Assigning the right controls to the right layer in practice

The organizing principle fits in one sentence: controls belong to the layer that owns the responsibility they're meant to govern. Agent-side controls govern decision-making and invocation intent, while server-side controls govern access and execution authority. Mix the two up, and organizations end up auditing the wrong thing while the real risk sits untouched somewhere else. Most teams currently mix them up, which is exactly why the shadow AI numbers keep climbing instead of leveling off.

On the agent side, that means registering agent identities in the enterprise IdP, Okta or Entra ID, using OIDC workload tokens or OAuth client credentials instead of static keys that never expire on their own. It means scoping role-based permissions to what the agent's function actually needs, not the broadest grant available because someone was in a hurry to ship. Prompt hardening and input validation belong here too, as defense in depth alongside other controls. And it means building behavioral baselines, so a spike in invocation volume or a request routed to a server the agent's never touched before reads as a signal instead of vanishing into normal traffic.

On the server side: tool allowlisting, so only the minimum functions a use case needs are exposed at all. Scoped, short-lived credentials instead of static tokens that outlive the task they were issued for, paired with real-time traffic inspection for injection payloads and PII before tool execution runs, plus a complete audit trail of every invocation tied back to the specific agent identity that triggered it. That way an incident review doesn't turn into archaeology six months later.

Gateway-level controls span both layers by design. Centralized authentication routing means no agent reaches an MCP server without identity verification happening first. Policy enforcement reflects RBAC decisions already made in the identity provider, instead of getting re-implemented ad hoc at every server that gets stood up. Cost and usage telemetry aggregate across every agent-server pair the organization runs, giving finance and security the same picture instead of two conflicting ones. Any agent connection that skips the gateway gets flagged automatically as an unauthorized server connection, which is what shadow AI detection looks like in practice.

Governance frameworks, NIST's govern/map/measure/manage structure, EU AI Act audit mandates, ISO/IEC 42001 certification, supply the policy. The gateway layer supplies the plumbing, turning policy into something enforced at the speed agents actually operate: fast, continuous, unattended. The boundary between MCP servers and AI agents is the exact seam where sensitive data and real-world actions meet, and it's the correct place to put the weight of governance, because every other place is either too early to matter or too late to help.

Sources

  1. nhimg.org
  2. obsidiansecurity.com
  3. okta.com

More in MCP Server Management