Skip to content

Using SSO with MCP servers

What SSO does for MCP servers

SSO integration with MCP servers solves repeated authentication across multiple AI tools. Instead of juggling separate credentials for each integration, your corporate credentials unlock access to all approved workflow tools in one step.

Tallyfy’s MCP server already implements OAuth 2.1 with PKCE, Dynamic Client Registration (RFC 7591), and authorization server metadata discovery (RFC 8414). The well-known endpoint at /.well-known/oauth-authorization-server lets AI clients like ChatGPT and Claude Desktop discover OAuth endpoints automatically. Scopes use dot notation - for example, mcp.tasks.read, mcp.processes.write, and mcp.templates.read.

The authentication challenge in MCP

MCP servers don’t know who you are by default. They receive requests from AI agents with no identity or context. This creates gaps when accessing enterprise systems that need user credentials.

Common workarounds and their problems:

  • Embedding API keys as environment variables - doesn’t scale
  • OAuth Device Authorization Flow for local servers - clunky UX
  • Manual token management per tool - shadow IT risk and compliance headaches

How SSO bridges the gap

SSO integration with MCP uses OAuth 2.1 flows that delegate authentication to enterprise identity providers.

Interactive delegation flow

  1. User initiates connection - AI agent requests access to a tool
  2. SSO redirect - MCP server redirects user to corporate identity provider
  3. Corporate authentication - user logs in with SSO credentials (including MFA)
  4. Token exchange - identity provider returns an authorization code, which the MCP server exchanges for an access token
  5. API access - MCP server uses the token to call service APIs

This diagram shows how SSO authentication flows between users, AI agents, MCP servers, and identity providers.

Diagram

What to notice:

  • Step 4-5: The identity provider validates corporate credentials including MFA and conditional access policies before issuing tokens
  • Step 8-9: The MCP server handles token exchange automatically - users never see raw tokens
  • Steps 10-13: Once authenticated, the MCP server can make multiple API calls on behalf of the user without further prompts

Bearer token acceptance

Advanced implementations let MCP servers accept existing SSO tokens directly:

  • AI client presents a valid OIDC ID token or access token from the identity provider
  • MCP server verifies token authenticity and extracts user permissions
  • Server performs token exchange to get service-specific API credentials
  • Already-authenticated users skip additional login prompts

Identity provider support

Microsoft Entra ID (Azure AD)

  • Full OAuth 2.1 and OIDC support with PKCE
  • On-behalf-of (OBO) token exchange for Microsoft Graph APIs
  • Conditional Access Policies apply automatically to MCP connections
  • Native integration with Microsoft 365 and Azure services

Limitations: Tokens are designed primarily for Microsoft APIs. No native cross-provider token exchange. Each MCP server must be registered as an app manually.

Okta

  • OAuth 2.0 with device flow support
  • Custom authorization servers for API-specific scopes
  • Dynamic client registration and flexible token refresh
  • Okta Integration Network (OIN) listing for one-click deployment
  • SCIM provisioning for automated user management

Discovery: Okta supports both /.well-known/openid-configuration and /.well-known/oauth-authorization-server (RFC 8414). The RFC 8414 endpoint is the standard for pure OAuth 2.0 flows.

Google Workspace Identity

  • OAuth provider for Google services (Gmail, Drive, Calendar) and OIDC identity provider for third-party apps
  • Domain-wide delegation lets admins pre-authorize applications and service accounts
  • Admin-managed app whitelisting and Google Workspace Marketplace integration

OneLogin and other providers

Most enterprise identity providers offer SAML 2.0 and OIDC/OAuth 2.0 compatibility with similar token exchange limitations and marketplace integration options.

Current gaps and challenges

Users face multiple OAuth consent flows for each tool integration, even when using the same SSO credentials. An employee with email, calendar, Slack, GitHub, and Salesforce integrations hits five separate login prompts.

Shadow OAuth visibility

Token exchanges between AI applications and services often happen outside IT’s oversight. There’s no centralized view of which apps access which data for which users - making offboarding and access revocation difficult.

Implementation complexity

Each MCP server developer must implement OAuth components (authorization endpoints, token management, client registration). Building secure OAuth flows requires specialized knowledge, and mistakes introduce vulnerabilities.

Token lifecycle management

Coordinating token refresh, expiration, and revocation across multiple identity domains remains hard. There’s no universal token exchange between providers, and revocation signals don’t propagate consistently.

Solution approaches

Centralized profile system

A cloud service acts as a universal integration broker - similar to mcp.run’s profile system. Users connect tools once on a dashboard, group them into profiles, and AI applications request access to the whole profile through a single OAuth flow.

The bridge service becomes the OAuth Authorization Server, storing encrypted API credentials in a token vault, routing MCP requests to appropriate services, and providing centralized audit logging.

Enterprise IdP extensions

An add-on for existing identity providers handles inter-application authorization. When an AI application needs a Slack token, it asks the mediation service, which validates the user’s identity with the corporate IdP, checks admin policies, and returns the token - all without user interaction.

This gives admins a dashboard for approving or denying AI-to-app connections with centralized policy enforcement and audit trails.

Developer SDK approach

Pre-built SDKs make OAuth manageable for MCP server developers by providing integrations for major identity providers, automatic token refresh, and consistent security patterns.

Implementation strategies

OAuth 2.1 standard compliance

Tallyfy’s MCP server already follows these OAuth 2.1 patterns. Here’s what any MCP implementation needs:

  1. Use PKCE for all flows

    PKCE protects against authorization code interception. Tallyfy requires S256 code challenge method - no plain text allowed.

  2. Implement metadata discovery

    Expose /.well-known/oauth-authorization-server per RFC 8414. This lets AI clients discover authorization, token, and registration endpoints automatically.

  3. Enable dynamic client registration

    RFC 7591 support lets AI applications register with MCP servers programmatically. Tallyfy’s DCR endpoint validates redirect URIs and blocks localhost domains.

  4. Plan for token exchange

    OAuth 2.0 Token Exchange (RFC 8693) enables on-behalf-of scenarios. Tallyfy implements refresh token rotation with reuse detection to protect against stolen tokens.

Security considerations

Token storage: Use encrypted key vaults, short-lived access tokens with refresh mechanisms, and monitor for unusual API usage patterns.

Network security: Require HTTPS for all authentication endpoints. Tallyfy’s MCP OAuth endpoints include rate limiting - 5 registrations per hour for DCR, 60 token requests per minute.

Access control: Map SSO roles to MCP tool permissions using scopes like mcp.tasks.read and mcp.processes.write. Support conditional access policies from identity providers.

Best practices for enterprises

Governance and compliance

Define approved AI applications and integrations. Document data access requirements. Log all token exchanges and API access, and schedule regular permission audits.

User experience optimization

Minimize authentication friction by using existing SSO sessions. Group related tools into logical profiles. Support different client types - web apps use authorization code flow, desktop apps use device authorization flow, and CLI tools use client credentials or device flow.

Technical architecture

Cache tokens to reduce identity provider load. Implement circuit breakers for external API calls and design graceful degradation when identity services go down.

Microsoft identity providers

Register as an Enterprise Application in Azure AD Gallery. Use Entra ID authentication for Copilot Studio connectors - enterprise security controls apply automatically.

Okta Integration Network

Submit through OIN: create an integration in Okta’s developer org, implement OIDC flow, add SCIM provisioning if applicable, then submit for certification. Okta customers get one-click configuration.

Google Workspace Marketplace

Requires OAuth application verification, privacy policy documentation, and minimal scope usage. Domain-wide installation gives admins centralized permission management.

What’s changing

The OpenID Foundation is developing cross-domain authorization chaining standards. OAuth 2.0 extensions will enable more flexible cross-provider token exchange. AI-specific authentication protocols are also in development.

The trend is moving toward user-controlled integration profiles that travel between AI applications, zero-trust architecture integration, and stronger audit trails for regulatory compliance.

Integrations > Authentication and SSO

Tallyfy offers free SSO on all paid plans with support for Microsoft Entra ID and Google Workspace and Okta and OneLogin and JumpCloud and any SAML 2.0 provider — letting teams log in with existing corporate credentials while also enabling SSO-based approval audit trails that can replace costly e-signature tools for internal use cases like purchase orders and policy acknowledgments.

Mcp Server > Using Tallyfy MCP server with Microsoft Copilot Studio

Microsoft Copilot Studio connects to Tallyfy’s hosted MCP server through Power Platform custom connectors and OpenAPI specifications enabling enterprise teams to automate workflows and manage processes via natural language while benefiting from strong security features like VNet isolation and DLP policies and multi-agent orchestration across HR and IT and training departments.

Authentication > Integrate Microsoft Entra ID SSO

Tallyfy integrates with Microsoft Entra ID (formerly Azure Active Directory) for SAML-based single sign-on by having an admin create an enterprise app in Entra ID and exchange SAML configuration values and certificates with Tallyfy Support so that users can log in automatically and get accounts provisioned on first access.

Integrations > MCP server

Tallyfy’s MCP Server lets you control workflows through plain English in any major AI platform like ChatGPT or Claude or Gemini or Copilot using the open Model Context Protocol standard to search tasks and launch processes and manage templates and set up automations without needing any API knowledge.