The Auth Chain
There are three hops in the full chain. Here’s what happens at each one:Hop 1: Widget → Crow Backend
The widget sends the user’s identity token (a JWT your backend minted) with every chat message.
This is the standard Identity Verification flow. If you haven’t set it up, users are treated as anonymous and identity headers won’t be available.
Hop 2: Crow Backend → Your MCP Server
When Crow connects to your MCP server to execute tools, it sends three types of headers:
Your MCP server automatically receives the service key — Crow reads it from your product config and injects it into every request. You don’t need to configure anything for this to happen.
Hop 3: Your MCP Server → Your Backend API
Your MCP server wraps your existing backend API. When a tool executes, it calls your API endpoints to actually do the work (query your database, create records, etc.). Your backend API already has auth — Clerk, Auth0, Firebase, API keys, whatever you use. The MCP server can’t use those because it’s not a user. It’s a service acting on behalf of users. The solution: your backend adds a second auth path that accepts the service key. When the service key is present and valid, your backend trusts the request and reads scoping context (user ID, tenant ID) from headers instead of from a user JWT.Your existing user auth (Clerk, Auth0, Firebase, etc.) stays completely unchanged. The service key adds a second auth path alongside it — it doesn’t replace anything.
Service Keys
A service key is a shared secret that lets your MCP server authenticate with your backend API. Think of it like a Stripe secret key — Crow generates it, you copy it to your backend.How It Works
Crow is the source of truth. You never generate the key yourself.
Where to Find Your Service Key
- Go to Deploy → API Keys in the Crow dashboard
- Copy the Service Key
- Add it to your backend’s
.env:
Adding Service Key Auth to Your Backend
Add a ~15-line middleware alongside your existing auth. This does not replace your current auth — it adds a second path.X-User-ID, X-Tenant-ID, etc.) because the caller has proven it’s a trusted service. Without the service key, those headers are ignored and normal user auth applies.
Your MCP Server — Forwarding the Key
Your MCP server receivesX-Service-Key from Crow automatically. It just needs to include it when calling your backend:
Identity Headers
Identity headers let your MCP server (and your backend) know who the end user is. Crow extracts claims from the user’s identity token and sends them as HTTP headers.How Identity Flows Through the Chain
Configuring Header Mappings
In the dashboard, under Integration → Server-Side MCP → Header Mappings, add mappings:Available Sources
identity.* — Any claim from the user’s identity JWT:
Identity claims are only available for authenticated users. If the user hasn’t been identified via Identity Verification, identity headers won’t be sent.
product.* — Fields from the Crow product configuration:
Reading Identity Headers in Your MCP Server
Putting It All Together
Here’s the complete picture: Crow calls your MCP server, which calls your backend API, which serves user-specific data. Dashboard configuration:.env:
