EresusSecurity
Back to Research
AI Security

Shadow MCP Servers and OAuth Token Scope Creep in Enterprise Engineering

Eresus Security Research TeamSecurity Researcher
November 25, 2026
3 min read

How shadow MCP servers appear inside engineering teams

As coding assistants, internal copilots, and workflow orchestrators adopt the Model Context Protocol (MCP), developers frequently connect local or team-hosted MCP servers to Jira, GitHub, Slack, Kubernetes clusters, and cloud billing APIs. Because these integrations are often configured in personal IDE settings or ad-hoc container manifests, security teams rarely have an accurate inventory of which MCP servers exist or what credentials they hold.

This creates a modern shadow-IT layer directly inside developer workstations and CI runners. Unlike traditional SaaS integrations that appear in an identity provider's enterprise app catalog, a local stdio or SSE-based MCP server can quietly bundle broad personal access tokens and expose dozens of write-capable tools to any prompt processed by the assistant.

Why OAuth scope creep is amplified by MCP tool discovery

In standard web integrations, an OAuth token's scopes are exercised by fixed application code paths. In an MCP environment, the client dynamically discovers tool definitions at runtime and delegates execution decisions to an LLM. Three failure patterns repeatedly surface during Eresus Security engagements:

  1. Over-broad wildcard scopes: Teams grant repo, admin:org, or full cloud-read/write scopes during initial prototyping and never narrow them before rolling out to an entire engineering group.
  2. Capability drift without re-approval: A remote MCP server adds new destructive tools in a minor update; because the existing OAuth token already covers the broader scope, the client silently exposes the new tools without triggering a security review.
  3. Plaintext token persistence: Local MCP wrappers store long-lived refresh tokens or static PATs in unencrypted configuration files that infostealers and malicious npm/Cargo build scripts routinely harvest.

Auditing MCP inventories and narrowing token boundaries

Securing MCP adoption does not require blocking developer productivity; it requires bringing MCP servers under the same release and identity controls as any internal microservice:

Audit Step Engineering Action Security Outcome
Registry & Allowlist Publish an approved internal catalog of signed MCP servers and block unknown endpoints at the proxy Eliminates unreviewed third-party and shadow servers
Short-Lived Scoped Tokens Enforce OAuth 2.1 with PKCE, resource indicators, and short TTLs per task Prevents lateral movement from stolen workstation configs
Tool-Level Policy Gate Inspect tools/list responses and pin approved tool schemas by hash Detects capability drift and rug-pull tool descriptions
Egress & Network Segmentation Route remote MCP traffic through a central gateway with mutual TLS and audit logging Centralizes visibility and rate limiting

What happens when an MCP server changes its tool descriptions?

When an untrusted or compromised MCP server alters tool descriptions or injects hidden instructions into schema metadata, the LLM may treat those descriptions as authoritative system guidance. Pinning tool manifests by cryptographic hash and reviewing diffs in CI prevents silent capability drift from reaching developer or production agents.

How can security teams discover shadow MCP servers quickly?

Teams can start by scanning developer dotfiles, IDE configuration directories, repository .mcp.json manifests, and outbound egress logs for known MCP transport patterns, then migrating approved integrations behind a managed MCP gateway with centralized OAuth enforcement.

AI Security Starter Training

Request a practical checklist for prompt injection, RAG data leakage, MCP risks, and model-file security before launch.

Prompt injection and guardrail bypass checks.
RAG data leakage and permission-boundary review.
MCP identity, transport, and command-risk controls.

No spam. Used only to send the resource and related security notes.

Related Research

Related Services

Scope Estimator

Get a rough engagement size before the scoping call.

What this depth covers
Full coverage of the OWASP-family test plan for the in-scope targets: broken access control, injection, authn and authz flaws, business-logic abuse, findings with reproduction steps.
What it does not cover
Multi-week adversary emulation, physical and phishing vectors, custom exploit development, source-code review.

Indicative effort

~5 tester-days

Estimate only, not a quote. It scales with the three factors above and assumes the targets are reachable and test accounts are provided in the test window.

Request exact scope