Skip to main content
MCP is a sibling of your OData API. Lock {prefix}/mcp the same way you lock the API. The harness (Claude Desktop, Cursor, Claude Code, VS Code, …) presents whatever credential that pipeline already accepts. Customers paste https://your-host/odata/mcp into the harness.

Require a signed-in caller

Your existing authentication pipeline applies. Anonymous /mcp is refused. Token issuance stays with that pipeline. A 401 on /mcp can carry resource_metadata="…" so an OAuth-capable harness finds your authorization server. Publish that document with AddProtectedResourceMetadata. There is no Use call. Token validation stays with your JWT handler or gateway.
If the protected resource is not the whole host, set options.Prefixes ("" for the root, "odata" for /odata).

Browser hops

When an action opens a login page, the harness shows a URL. Access tokens from that hop never belong in the chat. See Elicitations.