LetterMCP

Model Context Protocol and OpenAI Agents SDK Compatibility

OpenAI's Agents SDK lacks multi-user credential management that enterprises need at scale.

· 9 min read · Updated
Cover illustration for “Model Context Protocol and OpenAI Agents SDK Compatibility”
Agentic AI Foundations · August 30, 2026 · 9 min read · 1,952 words

The Model Context Protocol is now the standard way AI agents reach outside their own walls to touch files, databases, and business software, and if you build on the OpenAI Agents SDK, you need to understand how it fits in. MCP is an open standard built on JSON-RPC 2.0, released by Anthropic in late 2024, and it does something simple but powerful: one protocol replaces dozens of custom, one-off API connectors that used to be built separately for every file system, database, API, and SaaS tool a company relied on. A taxonomy study of MCP server attacks found more than 16,000 active public servers indexed online by August 2025, and the protocol now runs in production at the majority of enterprise AI teams. A tool built once against the MCP spec works on ChatGPT, Claude, Gemini, Copilot, and Cursor without separate engineering for each vendor, and that interoperability is the main reason enterprises are standardizing around it.

How OpenAI wired MCP support into the Agents SDK

OpenAI built MCP support directly into the Agents SDK, so the protocol negotiation happens automatically and developers can connect existing servers without rewriting them. As of April 2026, OpenAI supports MCP across three products: the Agents SDK, the Responses API, and ChatGPT desktop. Under the hood, the Agents SDK uses the MCP TypeScript SDK v2 client, but it does not force MCP servers to migrate to the newer v2 server package. For stdio and Streamable HTTP connections, the SDK negotiates the protocol on its own and stays compatible with servers built on the older MCP TypeScript SDK v1, so backward compatibility is built into the design rather than left to developers to manage.

On the connector side, eight first-party integrations ship out of the box: Dropbox, Gmail, Google Calendar, Google Drive, Microsoft Teams, Outlook Calendar, Outlook Email, and SharePoint. Developers control what the model can see and do through two mechanisms. You see what the model can even look at through allowed_tools, but when require_approval generates approval-request items, your application code has to answer before anything executes. OpenAI's own documentation is direct about the risk here: sensitive actions should always require approval, and tool outputs should be treated as a surface where prompt injection can occur. This guidance matters because OpenAI already knows an MCP connection can carry risk the model itself can't police.

Where the SDK's credential and multi-user model runs out

The SDK handles a single developer or a prototype well, but it has no built-in system to manage credentials when many users or autonomous agents run at scale. The authorization parameter carries an OAuth access token, but OpenAI does not store it, so you have to resend it on every single request. The JavaScript SDK accepts an authProvider through an OAuthClientProvider interface, and the Python SDK mirrors that with its own first-class OAuthClientProvider option, including a ClientCredentialsOAuthProvider. These are real building blocks, but the documented connector example reads its token from an environment variable, and that works for a demo, not for a product that has to serve hundreds of distinct users.

As of June 2026, neither the connectors and MCP guide nor the broader Agents SDK documentation lays out a multi-user credential pattern. You get no structure from the SDK for storing or rotating tokens across hundreds or thousands of users. That gap pushes enterprises toward a shortcut that creates its own danger: relying on static service accounts. If a single persistent API key sits behind an MCP connection, then once that connection is breached, the attacker gets access to every system the key touches. None of this is a knock on OpenAI's engineering.

What the MCP authentication spec requires

The protocol does better than the SDK alone, but gaps remain once autonomous agents, not just humans, make the requests. For spec-compliant remote MCP servers, OAuth 2.1 with PKCE is required wherever authorization is implemented, every endpoint has to run over HTTPS, authorization server metadata has to be discoverable, and Resource Indicators under RFC 8707 have to be validated to stop token audience confusion. In June 2026, MCP stabilized Enterprise-Managed Authorization, letting organizations plug in an existing identity provider such as Okta to control employee access to MCP servers, with Microsoft Entra ID following with its own EMA support in July 2026.

That mechanism solves a specific problem well: human access control. It does not solve a different one. Enterprise-Managed Authorization does not establish the workload identity of an autonomous agent when no human is present. The MCP OAuth Client Credentials extension starts to address unattended client authentication, but agent identity and delegation still have no settled standard, only active work. Two proposals that would give a workload a verifiable identity of its own, the DPoP Profile for MCP under SEP-1932 and Workload Identity Federation under SEP-1933, were still open pull requests as of the sources reviewed. The guidance coming out of CoSAI after RSAC 2026 is specific about what to do in the meantime: don't pass through OAuth tokens handed over by the user. Instead, you perform token exchange with the authorization server using RFC 8693, so each operation gets a new token scoped to that task alone, with an auditable exchange record attached.

The threat surface that opens when agents connect to thousands of external MCP servers

Connecting an AI agent to MCP servers at scale doesn't just add capability. It opens an attack surface that traditional security tooling was never built to see. Tool poisoning is one method: attackers plant malicious instructions inside tool descriptions and metadata, text the model reads in full but the user never sees. Rug pulls are another: a tool gets approved once while clean, then silently updates to malicious behavior later, with no re-approval step and no alert generated anywhere in the chain. Supply chain attacks round out the picture. The first confirmed malicious MCP package appeared in public registries in September 2025, and typosquatting along with fake "official" servers have become common tactics since.

The vulnerabilities aren't abstract. CVE-2025-49596, with a CVSS score of 9.4, let attackers run arbitrary commands through unauthenticated MCP Inspector instances. OX Security disclosed a systemic architectural flaw in April 2026 that affects an estimated 200,000 vulnerable instances across a supply chain spanning more than 150 million package downloads. The flaw sits inside every official MCP SDK rather than in one company's bad code, and the mechanism that makes it so dangerous is the MCP STDIO transport, which executes operating-system commands without sanitizing them first, opening the door to remote code execution. Credential aggregation compounds the damage once any one of these attacks succeeds: a single MCP server might hold credentials for Slack, GitHub, Postgres, and Salesforce at once, so compromising that one server breaches all four systems simultaneously.

Independent research backs up how widespread this is. MCPSecBench identified 17 distinct attack types spread across four attack surfaces, client, protocol, server, and host, and found that core vulnerabilities affected Claude, OpenAI, and Cursor platforms across the board, with existing protection mechanisms stopping less than a third of attempts on average. The NSA weighed in formally in May 2026 and named specific risks: dynamic tool invocation, where agents call new tools on their own at runtime; implicit trust between agents, where one agent trusts another's output without checking it; and context sharing across long-lived or overlapping context windows. Traditional application security tools, SAST and SCA scanners included, can't detect malicious instructions buried in tool descriptions. Shadow MCP servers slip past centralized policy entirely, and the runtime interactions between agents and servers stay invisible to most existing AppSec tooling.

Enterprise-grade credential and identity architecture for MCP agents

You can close the gap between what the SDK ships with and what enterprises actually need, but you have to build the architecture around workload identity and short-lived credentials, not static keys or tokens passed through from the user. Each agent runs with a verifiable workload identity of its own. It requests access through an identity-aware enforcement point rather than dialing a resource directly. A platform checks that identity along with policy and runtime context, and only then does it issue short-lived, scoped credentials for the specific resource you requested.

Workload-identity frameworks such as SPIFFE and SPIRE give each AI agent a cryptographic identity that travels with it through every hop of an MCP request chain, which produces an auditable record of what the agent did and when. Both CoSAI and NIST's ongoing agent identity guidance recommend this approach. In practice, this looks like an AI Identity Gateway that mints ephemeral, task-scoped tokens the moment an agent tries to reach a protected resource, using OPA policies to enforce fine-grained authorization based on runtime context. That collapses what the agent can reach down to what the task in front of it requires. MCP's own roadmap acknowledges the gaps that make this necessary: finishing Demonstrating Proof of Possession, defining a path through Workload Identity Federation, using the ID-JAG grant behind Enterprise-Managed Authorization, and relying on standard token exchange. These remain roadmap items rather than shipped capabilities.

The governance and audit requirements that apply once agents are running at scale

AI agents operating through MCP connections are privileged identities running at machine speed, and the rules that govern them are no longer aspirational. They're already in force. The Cloud Security Alliance frames the underlying issue clearly: AI agents are positioned between traditional user accounts and service accounts, executing on behalf of humans but often holding permissions that exceed what those humans themselves have. Most enterprises already have AI agents or workflows their own security teams don't know exist, making shadow MCP usage common.

The regulatory timeline is concrete. Under the EU AI Act, the majority of rules and enforcement activated on August 2, 2026, with full roll-out set for August 2, 2027. You have to log events automatically over the lifetime of high-risk systems under Article 12, and Article 26(6) sets a minimum log retention period of six months. A separate piece of EU legislation, the Digital Omnibus, entered into force on July 27, 2026, and proposes pushing high-risk stand-alone system obligations out to December 2, 2027. That proposal has not been finalized into law.

NIST published AI 800-4 on March 9, 2026, and the NCCoE released a concept paper on AI agent identity and authorization on February 5, 2026. The NCCoE paper, specifically, proposes that each AI agent should get a unique, revocable identity scoped to minimum permissions, and that every agent action invoking an external tool, modifying data, or executing a workflow step should be logged with enough context to support an audit after the fact. This remains a draft proposal rather than a finalized requirement. CISA issued an advisory setting out three headline requirements: tool-use authorization frameworks that scope permissions to specific tools for specific task contexts rather than granting blanket access, memory isolation so sensitive context doesn't persist across task boundaries without explicit authorization, and human-in-the-loop checkpoints for financial transactions, code deployment, data deletion, and similar high-stakes actions.

JSON-RPC 2.0 traffic doesn't fit the patterns traditional SIEM systems were built to read, so most security teams can't reconstruct an MCP attack timeline after the fact, and that is what stops them from meeting these requirements. That directly undermines the audit requirements regulators are now asking for. RSA 2026 named this the agentic AI governance gap, and the framing that came out of that conversation is the right one: security and IT teams should be the ones who make AI adoption possible across a company, not the ones slowing it down. If enterprises build MCP governance into the foundation of their agent deployments, rather than bolting it on after the fact, they can run agents at scale without carrying that regulatory exposure forward unresolved.

Sources

  1. Model Context Protocol (MCP)
  2. Model Context Protocol (MCP): Security Design ...
  3. MCP Security Crisis: Systemic Design Flaws in AI Agent Infrastructure
  4. MCPSecBench: A Systematic Security Benchmark and Playground for Testing Model Context Protocols
  5. When MCP Servers Attack: Taxonomy, Feasibility, and Mitigation
  6. Model Context Protocol (MCP)
  7. Introducing the Model Context Protocol \ Anthropic
  8. Specification - Model Context Protocol

More in Agentic AI Foundations