Authentication and identity for MCP
Requests to the MCP endpoint are signed with AWS Signature Version 4 using the signing service name context-mcp (the AWS SDKs use context). mcp-proxy-for-aws signs for you.
Two checks apply to each call. context-mcp:InvokeMcp grants an identity use of the endpoint; it’s allowed by default, and an explicit Deny blocks MCP access. Then AWS Context checks the tool’s own action on the Agent context. To call an Agent context in another account, the owner must grant your account or role that action in the Agent context’s resource policy, and you must pass the full Agent context ARN in agentContextId (see Governing access).
The following policy grants the five retrieval actions on one Agent context.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "context:SearchAgentContext", "context:TraverseAgentContext", "context:AgenticRetrieve", "context:AgenticRetrieveStream", "context:ExecuteSql" ], "Resource": "arn:aws:context:us-east-1:111122223333:agent-context/ac-1234567890abcdef" } ] }
context:AgenticRetrieve and context:AgenticRetrieveStream are separate actions. Add the change-set and PutTrace actions if your agent uses those tools. For context___RetrieveKnowledgeBase, also grant bedrock:Retrieve on the knowledge base. For identity provider sign-in, the federated role also needs signin:AuthorizeOAuth2Access and signin:CreateOAuth2Token on arn:aws:signin:*:*:service-principal/context-mcp.amazonaws.com.
Each call runs as the identity that signed it; you can’t pass a different user in tool arguments. For per-user results, sign with a session that carries the user’s trusted identity, such as an IAM Identity Center session. See Configure trusted identity propagation.