Join our Newsletter — 33% off our NHI Course
Home› Guides› MCP Client and Server Security Responsibilities: Who Owns…
Guide MCP, Protocols & Agent Platforms

MCP Client and Server Security Responsibilities: Who Owns Which Control and Why

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 17 min read
On this page

Most Model Context Protocol (MCP) security advice is written for server builders, which leaves the teams that run MCP hosts and clients (desktop assistants, IDE plugins, coding agents, agent platforms) without a clear list of what they own. The MCP specification splits normative duties between hosts, clients, servers and authorisation servers, and several of the most damaging failures seen so far happened on the client side of that line. This guide maps each control to its owner, explains where the trust boundaries sit, separates tool poisoning from server compromise, and gives an implementation order for each side. It is written for platform engineers, AppSec teams and identity architects who need to agree who does what before MCP use spreads further. It is a concept guide, not a product comparison, and it is based on the MCP specification version 2025-11-25 as published when checked in November 2026.

Key takeaways

  • The host is the security enforcement point. The specification makes the host responsible for consent, user authorisation decisions and isolation between servers; a server cannot enforce any of these for you.
  • The client owns most of the authorisation flow hygiene. PKCE with S256, the RFC 8707 resource parameter, redirect URI registration, authorisation URL scheme checks and SSRF protection during discovery are client duties.
  • The server owns token validation and tool safety. Audience checks, refusal of token passthrough, input validation, rate limiting, output sanitisation and secure session handling sit with the server operator.
  • Tool poisoning and server compromise need different owners. Poisoned descriptions are caught at the client by treating metadata as untrusted and pinning definitions; a compromised server is caught by the server operator and the organisation's supply chain controls.
  • Some controls belong to the organisation, not either side. Inventory, approved server lists, credential issuance and logging aggregation need a named platform owner, often via a gateway or registry.

The roles the specification defines

MCP uses a client-host-server architecture. A host application creates and manages several client instances, and each client holds one stateful session with one server. The specification gives each role distinct duties, which is the basis for any responsibility split. Authorisation adds a fourth party: the OAuth 2.1 authorisation server that issues tokens for remote servers.

RoleTypical examplesSpecification duties (summary)Who usually operates it
HostDesktop assistant, IDE, coding agent CLI, agent platform runtimeCreates clients, controls connection permissions and lifecycle, enforces security policies and consent, handles user authorisation decisions, coordinates sampling, aggregates context, enforces boundaries between serversApplication vendor for the code; the deploying organisation for configuration and policy
ClientThe MCP connector inside the hostOne session per server, protocol and capability negotiation, OAuth flow on HTTP transports, token storage, roots exposure, elicitation and sampling handlingSame as host
ServerLocal STDIO process or remote Streamable HTTP service exposing tools, resources and promptsValidate inputs, enforce access control, rate limit, sanitise outputs, validate tokens as an OAuth resource server, publish Protected Resource Metadata, manage sessions securelyServer publisher for code; whoever runs the process or service for operations
Authorisation serverEnterprise identity provider or a dedicated OAuth serverImplement OAuth 2.1, validate exact redirect URIs, require PKCE, issue short-lived and audience-bound tokens, rotate refresh tokens for public clientsIdentity team

For the protocol walk-through itself, see the MCP Security Guide and the MCP Authorisation Specification Guide. This page does not repeat them; it assigns ownership.

Where the trust boundaries sit

Responsibility follows the boundaries data and authority cross. There are five that matter in practice.

  • User to host: the user's intent becomes model actions. The host must show what will run and obtain consent. The specification states that hosts must obtain explicit user consent before invoking any tool and before exposing user data to servers.
  • Host to server (data in): everything a server returns, including tool descriptions, annotations, tool results and resource content, enters the model context. The specification says clients must treat tool annotations as untrusted unless they come from trusted servers.
  • Host to server (authority out): tool arguments, roots and tokens leave the host. Roots must be exposed only with appropriate permissions, and tokens must only go to the server they were issued for.
  • Server to upstream API: the server acts as its own OAuth client to downstream services. The token it received from the MCP client must not be passed through.
  • Server to server, through the host: the host holds the full conversation and controls cross-server interactions. Output from one server reaching another server's tool arguments is a host decision, not a server one.

A useful test: if the control depends on seeing the user, the model context or more than one server, the host owns it. If it depends on the token, the backend data or the tool's internal logic, the server owns it.

Authorisation responsibilities, side by side

The authorisation part of the specification applies to HTTP-based transports. Implementations using STDIO should not follow it and should instead retrieve credentials from the environment, which moves credential handling for local servers onto whoever configures the host. For remote servers, duties split as follows.

ControlClient ownerServer ownerAuthorisation server owner
DiscoveryMust use Protected Resource Metadata (RFC 9728) to find the authorisation server; must parse WWW-Authenticate and handle HTTP 401Must publish Protected Resource Metadata listing authorization_servers; should include a scope parameter in challengesMust provide OAuth 2.0 Authorization Server Metadata or OpenID Connect Discovery
Client registrationShould support Client ID Metadata Documents and preregistration; host the metadata document over HTTPS with a matching client_idNone directlyMust validate fetched client_id matches the URL and validate redirect URIs against the document; should warn on localhost-only redirect URIs
Code protectionMust implement PKCE, use S256 when capable, and refuse to proceed if code_challenge_methods_supported is absentNoneAdvertise code_challenge_methods_supported in metadata (required for OpenID Connect Discovery providers)
Audience bindingMust send the RFC 8707 resource parameter with the server's canonical URI in both authorisation and token requestsMust validate the token was issued for this server and reject othersShould issue short-lived access tokens
Token transportMust use the Authorization header on every request, never the query string; must not send tokens from other issuersMust return 401 for invalid or expired tokens and 403 for insufficient scopeMust serve all endpoints over HTTPS
ScopeShould start with baseline scopes and step up only when challenged; should cap retriesShould emit precise scope challenges, not the full catalogue; log elevation eventsMay issue a subset of requested scopes
Upstream callsNoneMust not pass through the client's token; obtain a separate upstream tokenSupports token exchange where used
Proxy consentNoneProxy servers using a static upstream client ID must keep per-client consent, exact redirect URI matching and single-use stateExact redirect URI validation

Two client duties are easy to miss because they look like server problems. First, SSRF: during discovery a malicious server can point resource_metadata, authorization_servers or token endpoints at internal addresses, including 169.254.169.254. The security best practices page says clients deployed to a server must consider SSRF and should require HTTPS, block private and link-local ranges, validate redirect hops and, for server-side clients, use an egress proxy. Second, authorisation URL handling: clients must allow only https (and http for loopback during development), must reject javascript:, data:, file: and vbscript:, and must not open URLs through a shell. See the MCP Authorisation URL Injection guide for the detail.

Tool poisoning versus server compromise

These two are often merged under "malicious MCP server", but they have different mechanics, detection points and owners. MITRE ATLAS describes AI Agent Tool Poisoning (AML.T0110) as altering tool behaviour such as parameters or descriptions to keep influence over an agent, and AI Agent Tool (AML.T0010.005) as a supply chain path into the agent's environment.

AspectTool poisoningServer compromise
What changesTool names, descriptions, annotations or results carry instructions aimed at the model (indirect prompt injection, AML.T0051.001)The server code, package, hosting or credentials are controlled by an attacker, so its actions are malicious even with honest metadata
Where harm happensInside the host: the model calls other tools, leaks context or follows planted stepsInside the server and its backends: data copied, actions taken with the server's own credentials
Who can see it firstClient owner: definition change detection, review of descriptions, tool call approvalServer operator: code review, release integrity, runtime monitoring; organisation: package provenance
Primary controlsTreat metadata as untrusted, pin and diff tool definitions, re-approve on notifications/tools/list_changed, show inputs before calls, restrict cross-server flowsSigned releases, version pinning, least-privilege server credentials, upstream token separation, egress limits, logging of every call
Typical containmentDisable the server in the host, revoke its approval, review recent tool callsPull the version, rotate every credential the server held, check backend logs

The postmark-mcp malicious server shows server compromise: after 15 working versions, one added line in version 1.0.16 blind-copied every outgoing email using the victim's own credentials. No client-side description check would have caught it; version pinning and provenance would. The Sentry MCP agentjacking research shows the other pattern: attacker-written error data came back as tool output and coding agents ran the planted steps. That is a host decision failure, and human approval for shell commands that originate in tool output is the client-side fix. For detection signals, see MCP Tool Poisoning Detection.

Controls the client and host owner must deliver

Consent and visibility

  • Tool exposure: show which tools are available to the model and visibly indicate each invocation, with a human able to deny calls, as the tools section recommends.
  • Argument preview: show tool inputs to the user before sending them to the server for sensitive operations, to stop accidental or induced exfiltration.
  • Local server installation: where one-click local configuration exists, the client must show the exact command without truncation, flag it as code execution, require explicit approval and allow cancellation.
  • Workspace configuration: treat repository-level MCP config files as untrusted input. The Amazon Q MCP config vulnerability launched servers from a repository file on folder open, and the fix added a consent prompt before loading workspace servers.

Isolation and least privilege

  • Sandboxing: the specification recommends running local servers with minimal default privileges and restricted file system and network access, with explicit grants when needed.
  • Environment scrubbing: do not pass the developer's full environment (cloud keys, CLI sessions, SSH agent) to child server processes; inject only the credential each server needs. See How to give MCP servers and local agents secrets without plain-text config files.
  • Roots: clients must expose only roots with appropriate permissions, validate root URIs against path traversal, and should prompt before exposing them.
  • Cross-server flow: decide which servers may share a session, and require confirmation when output from one server becomes arguments for a write or send tool on another.

Server-initiated requests

  • Sampling: users must explicitly approve sampling requests and control the prompt and what results the server sees; set iteration limits on tool loops.
  • Elicitation: clients must show which server is asking, offer decline and cancel, and for URL mode must not pre-fetch, must show the full URL and must open it in a context the client and model cannot inspect. See the MCP Sampling and Elicitation Security Guide.

Tokens and logging

  • Token storage: store access and refresh tokens in the operating system credential store, not in plain configuration; handle MCP-Session-Id values securely.
  • Audit: log tool calls with server, tool, arguments hash, approval decision and outcome, as the tools section recommends, and forward to central logging in managed estates.

Controls the server owner must deliver

  • Token validation: validate every inbound request, check audience and issuer, and reject tokens not issued for this server. Servers must not use sessions for authentication.
  • No passthrough: obtain separate upstream tokens; passthrough breaks audit trails and lets a stolen token use the server as an exfiltration proxy.
  • Tool safety: servers must validate all tool inputs, implement access controls, rate limit invocations and sanitise outputs. Content returned from third-party data (tickets, errors, emails) should be marked or filtered, because the server is the last point that knows its provenance.
  • Session handling: use cryptographically random session IDs and bind queued state to the user, for example a <user_id>:<session_id> key, so a guessed ID cannot inject events.
  • Transport hardening: Streamable HTTP servers must validate the Origin header and return 403 when it is invalid; local HTTP servers should bind to 127.0.0.1, and local servers should prefer STDIO or authenticated IPC.
  • Scope design: publish a small baseline scope and step up per operation; avoid wildcard scopes and full catalogues in scopes_supported.
  • Elicitation state: bind elicitation to the user identity from the token (for example the sub claim), never request secrets via form mode, and never place pre-authenticated URLs in URL mode requests.
  • Release integrity: publish through one verifiable channel, sign releases and document tool definition changes so clients can re-approve. See the MCP Registry and Server Publishing Security Guide.

Controls the organisation owns

Several controls fail if left to either side alone. Name a platform owner for each.

ControlWhy neither side can own itTypical mechanism
Inventory of hosts, clients and serversDevelopers install servers per machine; vendors cannot see your estateEndpoint discovery of config files plus a registry. See How to audit MCP servers on developer laptops.
Approved server list and version pinningClients enforce, but someone must decideRegistry or gateway allow list, managed host settings
Credential issuance for serversEach server is a non-human identity with delegated accessPer-server scoped credentials from the secrets platform, short lifetimes
Central logging and correlationClient logs show intent, server logs show effectGateway logs or forwarded client and server logs keyed by correlation ID
Supplier assessmentThird-party remote servers are external servicesTrust assessment before approval. See MCP Server Trust Assessment.

A gateway can centralise several client and server duties, but it does not remove the host's consent duty or the server's token validation. See the MCP Gateway and MCP Server Governance Guide.

Implementation order

  1. Agree the RACI: take the tables above, assign a named owner per control for each host product and each internal server, and record gaps.
  2. Inventory first: find every host and configured server across endpoints and CI. Without it, the rest cannot be measured.
  3. Client quick wins: turn on tool call approval for write, send and shell tools; disable automatic loading of workspace config; update host versions to builds with untrusted server prompts.
  4. Credential separation: replace inherited environment credentials with per-server scoped secrets. Pilot with one team, compare tool success rates, then widen.
  5. Server conformance: for internal remote servers, test audience rejection (send a token for another resource and expect 401), passthrough absence, Origin validation and scope challenges in a staging ring before production.
  6. Pin and diff: pin server versions and tool definition hashes; alert on change and require re-approval.
  7. Central logging: forward tool call logs and server authorisation logs; build the metrics below.
  8. Rollback: keep the previous approved version and config per server so a bad release or a broken policy can be reverted within the host management tool in minutes.

Decision guidance

  • Local STDIO or remote HTTP: local servers put almost every control on the host owner (sandbox, credentials, consent). Remote servers move token validation and data access control to the server operator but add the OAuth client duties. Prefer remote for shared, data-holding tools where the operator can enforce access centrally.
  • Gateway or direct: small teams with a few vetted servers can enforce through managed host settings. Larger estates benefit from a gateway that holds the allow list and logs, while hosts keep consent. See MCP Gateway vs Direct MCP Connections.
  • Vendor host or in-house host: with a vendor host, your duties shrink to configuration and policy, so test the vendor's consent, URL handling and environment behaviour yourself. With an in-house agent platform, every client "must" in this guide is your engineering backlog.

Detection and measurement

  • Monitor on the client side: new server registrations, tool definition changes, denied approvals, URL elicitation to new domains, shell commands following tool output.
  • Monitor on the server side: 401 rates by audience mismatch, scope elevation events, rate limit hits, unusual upstream data volumes, Origin rejections.
MetricOwnerTarget direction
Percentage of configured servers on the approved list with pinned versionsOrganisationTowards 100%
Percentage of hosts with approval required for write, send and shell toolsClient ownerTowards 100%
Servers using inherited environment credentialsClient ownerTowards zero
Internal remote servers passing audience rejection and no-passthrough testsServer ownerTowards 100%
Median time from tool definition change to re-approval or blockClient ownerDown
Tool calls with a correlation ID present in both client and server logsOrganisationUp

Common failure patterns

  • Assuming the server will refuse bad requests: host teams rely on server-side checks while the real harm comes from the model chaining honest tools, as in the Sentry case.
  • Auto-loading repository configuration: a cloned repository becomes a code execution path with the developer's credentials, as the Amazon Q case showed.
  • Unpinned server packages: trust built over many clean releases is spent in one update, as with postmark-mcp.
  • Token passthrough "for now": a server forwards the client token upstream, losing audit attribution and turning token theft into backend access.
  • Broad scopes requested up front: clients request everything in scopes_supported, so one leaked token reaches every tool.
  • No owner for inventory: each side assumes the other tracks installed servers, so incident responders cannot answer which machines ran the affected version. See the MCP Incident Response Playbook.

Framework mapping

AreaNIST SP 800-53 Rev 5NIST CSF 2.0Threat references
Consent, least privilege, rootsAC-6 Least Privilege, AC-21 Information SharingPR.AA-05OWASP LLM06:2025 Excessive Agency
Local server execution and sandboxingCM-7 Least Functionality, CM-11 User-installed SoftwarePR.PS-05ATLAS AML.T0010.005
Token audience and service authenticationIA-9 Service Identification and AuthenticationPR.AA-05MCP token passthrough
Tool poisoning and untrusted outputSC-7 Boundary ProtectionDE.CM-09ATLAS AML.T0110, AML.T0051.001; OWASP LLM01:2025 Prompt Injection
Server supply chain and third-party serversSR-3 Supply Chain Controls and Processes, SA-9 External System ServicesGV.SC-07ATT&CK T1195.002; OWASP LLM03:2025 Supply Chain
Inventory and loggingAU-12 Audit Record Generation, CM-10 Software Usage RestrictionsID.AM-02, DE.CM-09

Practitioner checklist

  • Publish a control ownership matrix covering host, client, server, authorisation server and platform owner for every MCP deployment.
  • Require explicit approval for write, send and shell tools in every managed host, and show arguments before execution.
  • Disable automatic loading of repository or workspace MCP configuration without a consent prompt.
  • Remove inherited environment credentials from local server processes and issue per-server scoped secrets.
  • Pin server versions and tool definition hashes, and re-approve on change.
  • Test internal remote servers for audience rejection, no token passthrough, Origin validation and precise scope challenges.
  • Verify host clients enforce PKCE S256, the resource parameter, authorisation URL scheme allow lists and SSRF blocking during discovery.
  • Maintain an inventory of hosts and servers with owners, and correlate client and server logs centrally.

Standards and references

Related NHI Mgmt Group resources: MCP Security Guide · Local MCP Server Security Guide · MCP Authorisation Specification Guide · MCP Gateway and MCP Server Governance Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.