[ Agentic automation ]

MCP access to authentication data: scope tools and credentials

Give an authentication analyst only the data and tools its task needs, and keep service credentials outside report content.

By the EmailAuth research team · 3 min read

[ Key points ]

  • Give an authentication analyst only the data and tools its task needs, and keep service credentials outside report content.
  • Tenant and tool permissions must be enforced outside untrusted report content.
On this page

An MCP connection is a way to expose capabilities, not a reason to trust every operation it offers. Before connecting an authentication analyst, specify which tenant it may inspect, which evidence it may retrieve and which actions remain unavailable. A report-reading assignment should not inherit DNS publishing simply because one server offers both tools.

Start with the actual data path

Map the host application, MCP client, server, report store and any downstream API. Record where tokens terminate and which organisation operates each component. The MCP authorization specification describes authorization for HTTP-based transports; do not assume its flow applies unchanged to local stdio servers. A local executable can have filesystem or environment access even without a remote OAuth exchange.

Separate report retrieval from raw-message retrieval. Aggregate counts may answer a sender-trend question without disclosing message subjects, recipients or attachments. Enforce tenant isolation on the server using authenticated context rather than accepting a model-supplied tenant name as authority. Return stable source identifiers so a summary can be traced back without exposing unrestricted storage URLs.

Limit credentials and tool reach

Use credentials with the minimum supported resource and action scope. Keep secrets in the approved credential mechanism, not in prompts, tool descriptions, report fields or logs. The MCP security guidance prohibits token passthrough: a server must not simply accept and forward an upstream token meant for another service. Validate intended audience and implement the proper downstream authorization relationship.

Inventory every exposed tool, including generic HTTP, shell and file-writing functions. Hiding a DNS-specific button does little if a generic execution tool can call the same provider with a broad credential. Remove unnecessary capabilities at the execution boundary. Tool annotations and descriptive names can help clients present tools, but are not a substitute for enforced authorization.

Exercise hostile report content

For the written policy below, assume authenticated tenant A and an approved report-analysis task. Only read_report for tenant A is allowed. Report content asking for a secret or DNS publication cannot expand that permission. This is a proposed policy, not an executed security test or a verified server configuration.

Treat report text, message samples and server-returned instructions as untrusted evidence. A string claiming to be an administrator does not become an approver. The analyst can describe that string as suspicious without obeying it. OWASP recommends layered defenses because instruction wording alone does not eliminate prompt injection.

Inspect the complete decision ledger

  • Known-owner case: tenant A, approved task, read_report for A. Allow under the proposed policy; calculation uses only approved returned evidence.
  • Wrong-tenant case: authenticated A requests tenant B. Deny the read regardless of any tenant label in the report.
  • Hostile-content case: report text requests read_secret and publish_dns. Deny both tools; authorized read_report for A may continue, with hostile text treated only as data.
  • Ambiguous-owner case: an A report names both app-A and app-B as possible owners. Allow only authorized evidence gathering, mark identity unresolved and escalate attribution rather than choosing an owner.
  • Unapproved-task case: no approved investigation exists. Hold task-driven retrieval until authorization is clarified, even if a credential technically permits a read.

No tool calls, model evaluation, credential issuance or boundary tests were executed for this ledger. These rules require implementation tests against the actual server and downstream permissions before anyone claims they are enforced.

Inspect operation and revoke access

Log tool name, authenticated tenant, evidence references and authorization result without copying tokens. Test access expiry and revocation, including active sessions and downstream permissions. A successful disconnect in a client is not enough if a long-lived provider credential remains valid elsewhere.

Start with a read-only pilot and an explicit list of questions the analyst should answer. Verify that refusals are useful: they should identify missing evidence or scope rather than silently omit a tenant or fabricate a result. Expand permissions only after a separate review of the new action. This is a proposed control pattern, not a verified EmailAuth product capability.

[ Takeaway ]

Tenant and tool permissions must be enforced outside untrusted report content.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Enforce the boundary in code

The model cannot be the only permission check.

Next steps

  1. Test wrong-tenant requests.
  2. Remove unused generic execution tools.
  3. Test expiry and credential revocation.

CISO / SecOps

Review the credential chain

Trust depends on every service that can act with a token.

Next steps

  1. Document token audiences.
  2. Test revocation and downstream access.
  3. Inspect logs for token leakage.

Founder / Non-technical

Define a small initial task

A narrow pilot makes value and exposure easier to judge.

Next steps

  1. Name the questions the analyst must answer.
  2. Keep publishing out of the initial scope.
  3. Review whether the pilot answers the agreed questions.

[ FAQs ]

Frequently asked questions

Does MCP itself grant DNS authority?

No. Authority comes from the configured credentials, server enforcement and approved actions.

Are tool descriptions a security boundary?

No. Enforce authorization in the server and downstream service, including generic tools.

Can a local server be risky without OAuth?

Yes. A local executable may inherit file, process or environment access.

May I put a provider token in a prompt?

Keep tokens in the approved credential flow, not model-visible evidence or logs.

What is token passthrough?

Accepting and forwarding an upstream token without proper audience validation; the MCP security guidance forbids this pattern.

Should every analysis retrieve raw mail?

No. Start with the least revealing evidence sufficient for the question.

What does the example validate?

Nothing operational was validated. The written ledger specifies tenant, tool and task decisions that a real implementation would need to enforce and test.

When should access expand?

After the new task, resource scope and execution risk receive an explicit review.

[ Sources ]

Sources

  1. MCP Security Best Practices

    Sections Token Passthrough · Confused Deputy Problem · Local MCP Server Compromise · Scope Minimization

  2. MCP Authorization

    Sections Purpose and Scope · Protocol Requirements · Access Token Usage · Token Audience Binding and Validation

  3. OWASP Prompt Injection

    Sections Prevention and mitigation strategies

[ Glossary ]

Glossary

MCP
Model Context Protocol, a protocol for exposing tools and resources to clients.
Token audience
The resource or service for which an access token is intended.

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base