Auth and identity for AI apps, agents, and MCP servers · Logto
Make your product AI-ready, without a second auth stack
Your AI apps, agents, and MCP servers inherit everything you already built in Logto: sign-in, enterprise SSO, MFA, RBAC, and Organizations. Ship AI features enterprises can actually adopt, in an afternoon.
What you already built in Logto
- Sign-in experience
- Enterprise SSO
- MFA & step-up
- RBAC & scopes
- Organizations (multi-tenancy)
Enable Dynamic app
CIMD under the hood
Now applies to
- Every MCP client and AI agent
- Scoped, per-user access tokens
- Consent your users can see and undo
- Audit logs of every grant
Prefer to vet every client yourself? Register them as third-party apps instead. Third-party app docs →
Enable AI agent access to your MCP server
AI agent or MCP client
'%20fill='url(%23paint0_linear_409_3627)'/%3e%3ccircle%20cx='4'%20cy='31.5'%20r='3'%20fill='%234BB8FC'%20stroke='%238AD2FF'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_409_3627'%20x1='0.5'%20y1='0'%20x2='0.5'%20y2='30'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%234BB8FC'/%3e%3cstop%20offset='1'%20stop-color='%234BB8FC'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e)
Logto as identity provider
to manage agent access and consent
Your MCP server
Turn your MCP server into a resource server and give AI agents scoped access, with user sign-in and explicit consent.
How it works
- Two ways to register clients: enable Dynamic app so any MCP client can connect, with CIMD under the hood; or pre-register each client as a third-party app when your security review demands it.
- Agents request scopes; users approve or deny.
- Full audit logs of every grant and revocation.
Read the MCP server tutorial →
Make your app agent-friendly
AI agent or MCP client
Logto as identity provider
to secure API access
Your app or API
Open your app or API to AI agents with access you choose. Logto manages authentication, scope, and tokens behind the scenes.
How it works
- Register agents as third-party apps, just like any other OAuth client.
- Agents request user consent with specific scopes.
- Logto handles access and refresh tokens, so agents call your APIs securely.
Read the third-party app tutorial →
Authentication flows built into chat
'%20/%3e%3cpath%20opacity='0.7'%20d='M2.28101%2051.836C2.28101%2043.441%209.08701%2036.636%2017.482%2036.636H33.258C41.653%2036.636%2048.458%2043.441%2048.458%2051.836V56.966C48.458%2059.765%2046.19%2062.033%2043.392%2062.033H7.34801C4.55001%2062.033%202.28101%2059.765%202.28101%2056.966V51.836Z'%20fill='url(%23paint1_linear_57_18024)'%20/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_57_18024'%20x1='10.2988'%20y1='15.885'%20x2='39.897'%20y2='15.885'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23D2C4FF'%20/%3e%3cstop%20offset='1'%20stop-color='%23ECD5FF'%20/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_57_18024'%20x1='-3.38985'%20y1='49.3345'%20x2='28.1092'%20y2='23.1131'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23A278FF'%20/%3e%3cstop%20offset='1'%20stop-color='%23F3A8FF'%20/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e)
Can you show me my balance?
Sure! I can help you with that. Please sign in first.
Sign in
SSO
Embed sign-in and SSO directly into your chatbot flow. Users are prompted when needed, and sent right back to the chat once signed in.
How it works
- Prompt users in the chat and redirect to Logto for secure sign-in.
- Passwordless, social, and enterprise SSO out of the box.
- Step-up auth or MFA for high-value actions.
Authentication flows built for the terminal
$agent login
Opening your browser…
✓ Signed in as dev@example.com
# headless box? device code
$agent login
Visitexample.com/device ·AH7-3K9P
✓ Token saved to keychain
AI coding tools and agents ship as CLIs. Give them real sign-in: device code when there is no browser, authorization code with PKCE when there is.
How it works
- Device code flow covers SSH boxes, containers, and headless machines; users approve from any browser.
- Authorization code with PKCE opens the browser when one is available and returns straight to the terminal.
- Tokens are stored, refreshed, and locked across processes, with keychain integration built in.
Explore the cli-auth library → Learn how to get CLI auth right →
Stop bots and abuse before it starts
'%20/%3e%3cpath%20d='M437.156%2076.3728C337.495%20-23.2883%20175.987%20-23.405%2076.1798%2076.0206L437.509%20437.349C536.934%20337.542%20536.817%20176.034%20437.156%2076.3728Z'%20stroke='white'%20stroke-opacity='0.02'%20/%3e%3ccircle%20cx='255.6'%20cy='256.129'%20r='153.1'%20stroke='white'%20stroke-opacity='0.1'%20/%3e%3ccircle%20cx='256.2'%20cy='266.729'%20r='50.7'%20stroke='white'%20stroke-opacity='0.2'%20/%3e%3cg%20filter='url(%23filter0_d_234_3628)'%3e%3ccircle%20cx='148'%20cy='149.529'%20r='11.5'%20stroke='%239DC7FF'%20stroke-opacity='0.2'%20shape-rendering='crispEdges'%20/%3e%3c/g%3e%3cg%20filter='url(%23filter1_d_234_3628)'%3e%3ccircle%20cx='148'%20cy='149.529'%20r='8.5'%20stroke='%239DC7FF'%20stroke-opacity='0.3'%20shape-rendering='crispEdges'%20/%3e%3c/g%3e%3cg%20filter='url(%23filter2_d_234_3628)'%3e%3ccircle%20cx='148'%20cy='149.529'%20r='6'%20fill='%23529BFA'%20/%3e%3ccircle%20cx='148'%20cy='149.529'%20r='5.5'%20stroke='%239DC7FF'%20/%3e%3c/g%3e%3cdefs%3e%3cfilter%20id='filter0_d_234_3628'%20x='116'%20y='121.529'%20width='64'%20height='64'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'%20/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'%20/%3e%3cfeOffset%20dy='4'%20/%3e%3cfeGaussianBlur%20stdDeviation='10'%20/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'%20/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.917518%200%200%200%200%200.967007%200%200%200%200%201%200%200%200%201%200'%20/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_234_3628'%20/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_234_3628'%20result='shape'%20/%3e%3c/filter%3e%3cfilter%20id='filter1_d_234_3628'%20x='119'%20y='124.529'%20width='58'%20height='58'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'%20/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'%20/%3e%3cfeOffset%20dy='4'%20/%3e%3cfeGaussianBlur%20stdDeviation='10'%20/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'%20/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.917518%200%200%200%200%200.967007%200%200%200%200%201%200%200%200%201%200'%20/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_234_3628'%20/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_234_3628'%20result='shape'%20/%3e%3c/filter%3e%3cfilter%20id='filter2_d_234_3628'%20x='122'%20y='127.529'%20width='52'%20height='52'%20filterUnits='userSpaceOnUse'%20color-interpolation-filters='sRGB'%3e%3cfeFlood%20flood-opacity='0'%20result='BackgroundImageFix'%20/%3e%3cfeColorMatrix%20in='SourceAlpha'%20type='matrix'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%20127%200'%20result='hardAlpha'%20/%3e%3cfeOffset%20dy='4'%20/%3e%3cfeGaussianBlur%20stdDeviation='10'%20/%3e%3cfeComposite%20in2='hardAlpha'%20operator='out'%20/%3e%3cfeColorMatrix%20type='matrix'%20values='0%200%200%200%200.917518%200%200%200%200%200.967007%200%200%200%200%201%200%200%200%201%200'%20/%3e%3cfeBlend%20mode='normal'%20in2='BackgroundImageFix'%20result='effect1_dropShadow_234_3628'%20/%3e%3cfeBlend%20mode='normal'%20in='SourceGraphic'%20in2='effect1_dropShadow_234_3628'%20result='shape'%20/%3e%3c/filter%3e%3clinearGradient%20id='paint0_linear_234_3628'%20x1='287.25'%20y1='226.279'%20x2='256.491'%20y2='257.039'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236FBEFF'%20stop-opacity='0'%20/%3e%3cstop%20offset='1'%20stop-color='%236FBEFF'%20stop-opacity='0.16'%20/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e)
Blocked: disposable@email.com
WebAuthn (Passkey)
Blocked: abuse+1@emaildomains.com
Verifying ...
Built-in security that is more than a CAPTCHA: layered protection right inside your sign-in experience. Logto brings security practices from SaaS to the agent world.
How it works
- Dynamic CAPTCHA challenges suspicious traffic, only when needed.
- Rate limits and blacklists stop repeat abusers.
- MFA, short-lived tokens, and revocation controls for anything sensitive.
Connect your agent to third-party APIs and MCP servers
Your AI agent or client
Logto Secret Vault
to manage tokens and secrets
Third-party APIs or MCP servers
Enable your agent to act on behalf of users with third-party APIs. No manual token juggling, no storing secrets in plain text.
How it works
- Get and refresh access tokens for Google, GitHub, or MCP endpoints via Logto’s APIs.
- Exchange tokens securely without exposing secrets in your agent codebase.
- Focus on workflows; Logto manages the auth dance.
Logto MCP Server runs on this exact stack.
It is live in production today. Logto MCP Server docs →
That includes the hard part for B2B products: multi-tenancy. Every token an agent gets is scoped to one organization and to that user’s role in it.
Watch what it can do, then build the same for your product with the guides below.
Ship user authentication with one prompt: introducing Logto MCP Server - YouTube
Tap to unmute
Ship user authentication with one prompt: introducing Logto MCP Server Logto
Logto438 subscribers
How we built ours
Remote MCP server in action: a new entry point for SaaS products in the AI era\ \ How to build a remote MCP server for your SaaS product: MCP vs Agent Skills, OAuth integration, and MCP tools design.\ Read the build story → How an MCP server calls your API on behalf of users: a production token strategy\ \ Why token passthrough, M2M, and PAT all fell short, and how subject tokens with org-scoped access keep AI inside each user’s permissions.\ Read the token strategy →
How to build yours
Enable auth for your MCP-powered apps with Logto\ \ Integrate Logto with your MCP server: authenticate users and retrieve their identity with the standard OpenID Connect flow.\ Add auth to your server → Enable third-party AI agent access to your MCP server\ \ Open your MCP server to third-party AI agents: client registration, user consent, and scoped access tokens.\ Open your server to agents →
Ship agent-ready auth this afternoon.
AI surfaces keep changing. Your identity layer does not have to: point the one you already trust at whatever comes next.