Security & Identity · Integration
Clerk
Add Clerk to your product for your customers, and give your AI agents governed access to it.
Clerk splits into a frontend API that the browser SDKs talk to and a Backend API at api.clerk.com/v1, and only the latter accepts a secret key as a bearer token, so server-side work runs against users, organizations, organization_memberships, invitations and sessions. Instances are environment-scoped: development and production keys address entirely separate data sets and user IDs do not carry between them, which surprises teams who expect to promote records from one to the other. Custom attributes live under public_metadata, private_metadata and unsafe_metadata, and only the backend secret key can write the private variety, so a client-side integration silently cannot set the fields you most want protected. Sessions are short-lived JWTs and deletions take effect immediately, so anything caching user records should consume the user.deleted and session webhooks rather than polling for absence. fastn holds each customer's Clerk secret key per instance and keeps every call pinned to the right environment.
In your product
Embedded for your customers. Per-tenant auth, no per-customer code, maintained by fastn.
Let a customer connect their own Clerk instance so your product provisions and deprovisions users in their directory
Mirror Clerk organisations and memberships into your own tenancy model so roles stay in step
Suspend or ban a user in Clerk when an admin removes them in your product, and reflect the reverse
Read organisation membership counts to drive seat-based billing without asking the customer for a manual headcount
For your AI agents
Governed, audited access for the agents you build, through the MCP server.
Ask an agent to list users in a customer's Clerk instance with no verified email and no session in ninety days, with each read audited per tenant
Have an agent add a new joiner to the correct organisation with the right role, following an approval step
Let an agent report which organisations have more than one owner so an admin can tidy up permissions
Example prompt
Which users in our Clerk org have not signed in for the last three months?
Set up Clerk in 4 steps
- 01Enable the Clerk connector from your fastn dashboard.
- 02Have each customer authorise their own Clerk account, so calls run under their credentials rather than a shared key.
- 03Decide which users, groups and roles your product needs, map those fields, then enable the actions and triggers you want.
- 04Call it from your product and expose it to your agents through the same governed connection.
Why teams use the Clerk integration
What you get by embedding it with fastn instead of building it yourself.
- Ship a Clerk integration without building it. Your customers connect their own Clerk account inside your product and work their users, groups and roles there, with no per-customer code on your side.
- Handle the part that actually costs time: the blast radius of an error is large, so least-privilege and auditability are non-negotiable. fastn owns the auth, token refresh, rate limits, pagination and breaking-change fixes, so a Clerk update is not your on-call problem.
- One integration serves your product and your agents. The same governed Clerk connection powers in-product features and gives AI agents scoped, audited access, so you keep access and identity in step across a customer's estate without wiring it twice.
Used by these teams
Compare with
Often used alongside
Tools the same teams tend to run next to Clerk, across other categories.
Clerk integration FAQ
How do I add a Clerk integration to my product?
Enable the Clerk connector in your fastn dashboard, then let each customer authenticate their own Clerk account. fastn handles the OAuth flow, token storage and refresh per tenant, so there is no Clerk client code in your app and no per-customer branch in your codebase. Setup is 4 steps.
Do my customers each connect their own Clerk account?
Yes. Every connection is scoped to the individual customer, so each authorises their own Clerk account and only ever sees their own users, groups and roles. That per-tenant isolation is the point of an embedded integration: you support the long tail of customer setups without maintaining an integration per customer.
Can AI agents use this Clerk integration?
Yes. The same connection is exposed to your agents through the fastn MCP gateway, with permissions scoped per tenant and every call audited. Ask an agent to list users in a customer's Clerk instance with no verified email and no session in ninety days, with each read audited per tenant
Who maintains the Clerk integration?
fastn does. When Clerk changes an endpoint, deprecates a field or alters its auth, the fix lands in the connector rather than in your backlog, and your customers' connections keep working.
What permissions does the Clerk integration need?
Only the scopes required for the actions you enable. Each customer grants access to their own Clerk tenant, permissions are scoped per tenant, and every call is recorded so an access change can be traced to its source.
Can access changes be automated safely?
Yes. Provisioning and deprovisioning can be driven from your product or an agent within governed permissions, with every action audited, which is what makes automated access changes reviewable after the fact.
What can I build with the Clerk integration?
A common starting point: let a customer connect their own Clerk instance so your product provisions and deprovisions users in their directory. Teams also use it for the other use cases listed above, and expose it to agents for governed reads and writes.
How much does the Clerk integration cost?
It is included. Pricing is based on connected accounts, not on how many connectors you enable, so adding Clerk does not change your per-connector cost. You can start free with 3 connected accounts.
Add Clerk to your product
Start free with 3 connected accounts. No sales call required, and no per-customer integration code.