MCP through Dapr service invocation
Run MCP clients and servers as Dapr apps and govern the traffic between them with App ID identity, access policies, bearer middleware, mTLS, and observability
Dapr supports MCP by using its service invocation API. Off-the-shelf Model Context Protocol (MCP) clients and agent frameworks (LangGraph, the official MCP SDK, custom HTTP clients) point at the local Dapr sidecar and reach MCP servers by App ID. Dapr governs the traffic with the same controls it applies to any other service-to-service call: App ID identity, access policies, HTTP middleware, mTLS, observability, and resiliency.
Both the agent and the MCP server run as Dapr apps, each with its own App ID. The MCP client directs requests to its local sidecar and sets the dapr-app-id header (or uses the full service-invocation URL). Dapr resolves the target by App ID, applies the policies attached to the MCP server’s App ID, and forwards the request.
For each call, Dapr can:
Off-the-shelf MCP clients work unchanged — there is no Dapr-specific MCP SDK to adopt for this path.
Configuration accessControl and OPA for MCP| Layer | What it controls | Reference |
|---|---|---|
| mTLS + SPIFFE identity | Every Dapr-to-Dapr call is mutually authenticated using identities Sentry issues and rotates automatically. On by default. | Dapr mTLS |
Configuration accessControl | Which caller App IDs may reach which MCP servers. Default-deny is supported. | MCP access control |
| HTTP middleware (bearer / OAuth2) | Inbound JWT validation on appHttpPipeline; outbound token acquisition on httpPipeline. | Authenticating an MCP server |
| OPA per-tool policies | Argument- and tool-aware authorization that inspects the MCP JSON-RPC body. | MCP access control |
For the threat-model framing, default postures, and what stays your responsibility, see MCP security posture.
MCPServer resource (workflow-centric path)There is a second way to use MCP with Dapr — the MCPServer resource. This path turns MCP integration into a deploy-time concern: you declare each MCP server as a YAML resource, and Dapr discovers tools, manages connections, and registers a built-in durable workflow per tool. Calling a tool becomes “start a workflow.”
In exchange, you face the following tradeoffs:
DurableAgent), every tool call multiplies into a child workflow.MCPServer-backed tool calls requires the Dapr Workflow client; off-the-shelf MCP clients cannot drive these flows in the current release.Use the MCPServer resource when you specifically need:
beforeCallTool / afterCallTool / beforeListTools / afterListTools).See the MCPServer resource page for the full comparison with the service invocation path and a step-by-step guide.
Run MCP clients and servers as Dapr apps and govern the traffic between them with App ID identity, access policies, bearer middleware, mTLS, and observability
How to enable MCP client-side and server-side authentication
Define per-agent access control policies for MCP servers using Configuration accessControl rules
How Dapr enforces agent identity, authorization, and auditability across agents and MCP servers, and what stays your responsibility
Declare MCP server connections as first-class Dapr resources for durable tool execution
Use MCPServer resources to discover and call tools on MCP servers