Someone on your platform team wired an AI agent into Microsoft Graph last month. It runs as an MCP server with a client secret in an environment variable, and nobody has asked who else can talk to it.

MCP server security is an identity problem now. Whatever credential sits behind an MCP server, the AI agent can use. So can anyone who reaches the server, and anyone who can slip instructions into what the agent reads. In 2026 attackers and researchers showed exactly how that goes wrong.

What is MCP?

The Model Context Protocol is an open standard that lets AI clients like Claude, Copilot or Cursor discover and call "tools" on a server: read a mailbox, query a database, open a ticket. The model reads each tool's description and decides what to call with which arguments. The server runs the call with its own credentials, so that's where the risk lives.

What happened in 2026

MCP vulnerabilities: six attack classes

The Microsoft 365 and Entra ID angle

An MCP server that calls Microsoft Graph is a service principal with a new front door. Anything that steers the agent inherits its permissions. A Graph app with application Mail.Read reads every mailbox in the tenant, and that exfiltration path never touches a user sign-in or an MFA prompt. We covered the identity side in AI agent identities and service principal sprawl.

What helps:

Start with this query and look for apps or IPs you can't explain:

AADServicePrincipalSignInLogs
| where TimeGenerated > ago(14d)
| summarize SignIns = count(), IPs = make_set(IPAddress, 20) by ServicePrincipalName, AppId
| order by SignIns desc

MCP security checklist

Copy it into your ticket system, one copy per server.

Inventory

Authentication

Authorization and scopes

Input validation

Egress

Logging

Human approval

The one thing to do this week

Pick the MCP server that holds a Graph credential and answer two questions: what can that secret read, and who can reach the server? If either answer surprises you, start there. If you want a second pair of eyes on which service principals hold tenant-wide permissions, SecValley's read-only Entra ID and Microsoft 365 scan lists them with credential expiry and owner state.

Frequently Asked Questions

What is MCP server security?

The controls that stop an MCP server from being misused: authentication on every remote server, least-privilege credentials, validated tool arguments, limited egress, logged tool calls and human approval for risky actions.

What is MCP tool poisoning?

A prompt injection hidden in a tool's description or output. The model follows it, for example by reading secrets and sending them out, while the user sees a normal tool call.

Does OAuth make an MCP server secure?

Only when it is checked properly. Servers must reject tokens issued for other services and never pass client tokens downstream, and clients must verify which authorization server receives their credentials.

How do I secure an MCP server that uses Microsoft Graph?

Treat it as a service principal: narrowest Graph permissions, scoped mailbox and SharePoint access, restricted user consent, monitored service principal sign-ins, and Conditional Access for workload identities where licensed.