TL;DR: Third-party MCP servers inside Claude Code and Cursor move trust into the IDE loop, where they can read sensitive context, shape code changes, and expose secrets before CI or review controls engage, according to Akto. The governance gap is not code quality but unmanaged third-party integration risk at the developer boundary.
At a glance
What this is: Akto examines how third-party MCP servers inside AI IDEs expand the trust boundary into development environments and create exposure before traditional AppSec controls see a change.
Why it matters: IAM, NHI and platform teams need to govern AI IDE integrations like other privileged third-party access points because context sharing, auditability and egress now determine whether sensitive data leaves the endpoint.
Context
Third-party MCP servers in AI IDEs are not just another productivity integration. They create a new privileged integration surface inside the developer workflow, where tools can request context, return results and influence what the IDE suggests or changes.
That shifts the governance question from code quality to access control, data handling and auditability. In practice, the security gap is that context can leave the endpoint before source control, CI or review-based controls have any chance to intervene.
Key questions
Q: What breaks when third-party MCP servers are allowed inside AI IDEs?
A: What breaks is the assumption that the IDE is a local, low-risk workspace. Third-party MCP servers can inspect project context, send data outward and influence suggestions before commit-time controls engage, so governance must move to the endpoint and the IDE boundary.
Q: Why do many MCP servers create more risk than a single development server?
A: Because scale turns a simple integration pattern into a distributed access problem. A single server can be reviewed manually, but many servers create separate credentials, policies, and visibility gaps. That increases the chance that an agent reaches privileged tools or data through an approval path nobody is watching closely.
Q: How do security teams know whether MCP server governance is working?
A: They should be able to answer four questions at any time: what servers exist, which are official, what credentials they can use, and what systems they contact. If those answers are unclear, governance is not working. The signal is not just fewer alerts, but clear attribution and scoped access across the fleet.
Q: When should organisations restrict third-party MCP servers to org-hosted tools only?
A: They should do so for high-risk repositories containing authentication, payments, security controls or regulated data. In those environments, the cost of uncontrolled context sharing is high enough that third-party exposure should be tightly limited or removed entirely.
Technical breakdown
How MCP changes the AI IDE trust boundary
Model Context Protocol lets an IDE or model call tools that can be local or remote and request context during development. In Claude Code and Cursor, that means the integration is not a passive plugin layer. It can pull files, inspect project state and feed results back into the coding workflow. Once that happens, the IDE is no longer only a local editor. It becomes a runtime integration point where third-party services participate in what is read and what is sent.
Practical implication: Treat MCP-enabled IDEs as privileged integration surfaces, not ordinary developer tooling.
Why wide-context export creates an NHI governance problem
The article’s central technical risk is that the tool requests more context than the developer intended. That can include adjacent directories, shared libraries, logs, sample configs or credentials embedded in project files. This is a classic non-human identity problem because the external tool behaves like a delegated access path that can observe and process data outside the narrow task the human had in mind. The problem is amplified when access, retention and downstream use are opaque.
Practical implication: Define exactly which paths, files and repositories a third-party MCP server may touch.
Why downstream AppSec controls miss the timing of exposure
Most downstream controls operate after code exists as a diff, after it is committed, or after it enters CI. MCP risk happens earlier, while context is assembled and shared inside the IDE session. That timing matters because a secret, architecture detail or internal control description may already have left the endpoint before review begins. The control failure is temporal, not just procedural: the protection exists, but at the wrong stage.
Practical implication: Move governance to the endpoint and IDE boundary, then add egress and audit controls.
Threat narrative
Attacker objective: The objective is to obtain sensitive development context and credentials early enough to enable downstream compromise, lateral movement or disclosure.
- Entry occurs when a developer enables a third-party MCP server inside Claude Code or Cursor and grants it access to project context.
- Credential or sensitive-context exposure follows when the tool ingests files such as .env values, logs, stack traces or sample configs that contain real secrets.
- Impact appears when the data leaves the environment before CI or review controls engage, creating IP leakage, credential compromise and uncertain incident scope.
Breaches seen in the wild
- Sentry MCP Agentjacking 2026: Researchers showed a fake Sentry error, posted with a public DSN, could make AI coding agents run attacker code with developers' credentials.
Read and download The State of NHI & AI Agent Breach Report 2026, covering 200+ breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Third-party MCP servers in AI IDEs create a privileged integration surface, not a harmless plugin layer. Once the IDE can request context and return results from an outside tool, the trust decision has moved into the development session itself. That changes the governance model from downstream review to upstream access control. Practitioners should treat these tools like repo-scoped applications with standing ability to observe sensitive context.
Context spillage is the real control failure, not model-generated code quality. The article correctly separates code correctness from data handling, because most mature engineering teams already have review and scanner controls for bad output. The harder problem is that project context, secrets and internal architecture can leave the endpoint before those controls see anything. That makes auditability and egress governance the primary control plane.
Identity and access governance must now cover developer-environment integrations with the same rigor as CI plugins and GitHub Apps. This is where third-party access, runtime tooling and source-code sensitivity intersect. A generic allow-anything posture is no longer compatible with regulated repos, auth flows or security-sensitive codebases. The practical conclusion is simple: if the tool can read the repo, it belongs in the access model.
Blind spots around MCP usage will become an incident-response problem long before they become a tooling problem. If teams cannot answer which server, which repo, which files and which session were involved, they do not have sufficient governance. That is a lifecycle and accountability failure, not just a logging gap. Security teams should treat MCP inventory as a first-class control domain, not an optional inventory exercise.
From our research library:
- 24,008 unique secrets were exposed in MCP configuration files in 2025 alone, the protocol's first year of widespread adoption, according to the State of Secrets Sprawl 2026.
- Claude Code-assisted commits leaked secrets at a rate of 3.2%, more than double the human-only baseline of 1.5%, with peaks reaching 31 secrets per 1,000 commits in August 2025, according to the State of Secrets Sprawl 2026.
- Read next: MCP Security Guide
What this signals
Third-party integration now starts at the IDE boundary: AI coding environments are becoming the place where sensitive context is assembled, not just where code is written. That means security teams need a boundary that covers identity, egress and audit together, or the control model will always lag the workflow.
Context visibility is the new governance gap: once an MCP server can see project files, logs or sample configs, the issue is no longer just model behaviour but uncontrolled data exposure through delegated tooling. Teams should decide which repos can tolerate any third-party MCP at all, especially where authentication or regulated data is involved.
For practitioners
- Inventory every AI IDE and MCP server Build a current register of Claude Code, Cursor and other MCP-enabled IDE usage, including owner, repo scope and hosting location.
- Enforce corporate identity for MCP access Require corporate accounts and managed keys for AI IDE integrations so developer activity can be tied to a real user, device and session.
- Block sensitive paths from leaving the endpoint Deny export of .env files, secrets directories, production folders and credential stores until the control is technically enforced.
- Apply stricter modes to high-risk repositories Use a no-third-party-MCP stance, or an org-hosted-only posture, for auth, payments, security and regulated-data repositories.
- Collect session-level audit evidence Log developer identity, device identity, IDE version, MCP server identifier, repo identifier and timestamped session metadata.
Key takeaways
- Third-party MCP servers move trust into the developer workflow, where external tools can observe and shape sensitive context before review-based controls begin.
- The main risk is not code generation quality but early data exposure, especially when secrets or internal architecture are present in project files and logs.
- Governance has to cover inventory, allowlisting, endpoint controls and audit evidence if teams want to keep AI IDE integrations inside a defensible perimeter.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-53 Rev 5 sets the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 — Vulnerable Third-Party NHI | Third-party MCP servers introduce external identity and trust risk inside the IDE workflow. |
| NHI-10 — Human Use of NHI | Developers are using delegated machine-access paths from within human workflows and need governance. | |
| NHI-04 — Insecure Authentication | The article stresses corporate identity, managed keys and auditability for AI IDE integrations. | |
| Recommendation — Restrict third-party MCP exposure and verify ownership, hosting and data handling before allowing access. Govern developer use of MCP-backed access paths as delegated non-human identity access. Require corporate identity and managed credentials for MCP access to preserve traceability. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | Sensitive repos need tighter scope control over what third-party integrations can reach. |
| Recommendation — Apply least privilege to MCP access so tools can only reach the files and repos they truly need. | ||
| MITRE ATT&CK | TA0006;TA0008 — Credential Access; Lateral Movement | The article describes secrets exposure that can lead to credential compromise and onward movement. |
| Recommendation — Map MCP-driven secret exposure to credential access and lateral movement detection priorities. | ||
Key terms
- MCP governance: MCP governance is the set of policies, controls, and oversight used to manage how AI agents use the Model Context Protocol to reach tools and data. It defines approved connections, authentication, authorization, logging, data handling, and change control so agent actions remain traceable, bounded, and aligned with security and compliance requirements.
- Privileged Integration Surface: A privileged integration surface is a tool or environment boundary that can read sensitive context, influence outputs or move data in ways that affect security decisions. In AI IDEs, third-party MCP servers become privileged because they operate inside the workflow where source code, secrets and architecture details are exposed.
- Context Spillage: Context spillage is the unintended transfer of files, logs, credentials or internal documentation to a tool that requested only a narrow task context. In AI IDEs, it is dangerous because the leak can happen before source control, CI or review controls have any chance to inspect the data.
- AI Auditability Gap: The AI auditability gap is the distance between what an organisation says it governs and what it can prove with evidence. It typically appears when inventory data, ownership records, access paths, and monitoring outputs are fragmented or incomplete.
Deepen your knowledge
NHI governance, agentic AI identity, and machine identity lifecycle are core topics in our NHI Foundation Level course, the industry's only accredited NHI security programme. If you are building or maturing an IAM programme, it is worth exploring.
Published by the NHIMG editorial team on August 2, 2026.
Updated on October 12, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org