---
title: "Build a Secure TypeScript MCP Client with Cross App Access (XAA)"
description: "Cross App Access (XAA) lets an enterprise IdP vouch for a signed-in user across app boundaries, replacing per-app OAuth consent screens and shared service accounts with admin-set policy."
url: "https://swe.quest/articles/build-a-secure-typescript-mcp-client-with-cross-app-access-xaa-192e23b51ee31d20"
canonical: "https://developer.okta.com/blog/2026/10/09/typescript-mcp-sdk-cross-app-access/"
source: "Okta Developer"
published: "2026-10-09"
difficulty: "medium"
kind: "How-to"
reading_minutes: 20
tags: ["identity-auth","ai-agents","typescript"]
---

# Build a Secure TypeScript MCP Client with Cross App Access (XAA)

A post on [Okta Developer](https://swe.quest/sources/okta-developer.md), published 2026-10-09, 20 min read, How-to. Original: [https://developer.okta.com/blog/2026/10/09/typescript-mcp-sdk-cross-app-access/](https://developer.okta.com/blog/2026/10/09/typescript-mcp-sdk-cross-app-access/)

## Summary

Cross App Access (XAA) lets an enterprise IdP vouch for a signed-in user across app boundaries, replacing per-app OAuth consent screens and shared service accounts with admin-set policy. The tutorial builds a TypeScript MCP client that signs in via OIDC with PKCE and exchanges the ID token for an ID-JAG (RFC 8693). It then trades the ID-JAG for an access token via the JWT bearer grant (RFC 7523) and calls a protected MCP server, using the MCP SDK's CrossAppAccessProvider against the xaa.dev playground. Key pitfalls: keep separate client credentials for the IdP and the resource authorization server, avoid trailing slashes in audience URLs, and make sure the ID-JAG's resource claim matches the access token's aud.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [AI agents](https://swe.quest/tags/ai-agents.md) (AI & ML)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- OAuth 2.0 concepts ([easy posts on Identity & auth](https://swe.quest/tags/identity-auth.md?difficulty=easy))
- OpenID Connect and PKCE
- JWT basics
- Node.js and Express ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))

## Keywords

Cross App Access, ID-JAG, Model Context Protocol, MCP TypeScript SDK, RFC 8693, RFC 7523, xaa.dev, SEP-990

## Related posts

- [Implement Secure Cross App Access (XAA) in Go](https://swe.quest/articles/implement-secure-cross-app-access-xaa-in-go-0a6938474ca2d783.md): Okta Developer · 2026-11-23 · Medium · 15 min read · Identity & auth, Go, AI agents
  Cross App Access (XAA) lets an app or AI agent reach another app's API on a signed-in user's behalf without a second sign-in or consent screen.
- [Build "Sign in with Your App" using Supabase Auth](https://swe.quest/articles/build-sign-in-with-your-app-using-supabase-auth-a42222eedce43362.md): Supabase · 2025-12-04 · Medium · 6 min read · Identity & auth, AI agents, PostgreSQL
  Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with \[Your App\]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO.
- [Learnings from building our public MCP server](https://swe.quest/articles/learnings-from-building-our-public-mcp-server-4745c00cbf09b9ab.md): Wealthfront Engineering · 2026-11-02 · Medium · 8 min read · AI agents, Identity & auth, API design, Payments & fintech
  Wealthfront built a public MCP server so users can connect their cash and investing accounts to AI applications, using Streamable HTTP transport with synchronous calls only, all capabilities exposed as tools with per-tool scope enforcement, and OAuth for authentication.
- [Managed Better Auth is now an OAuth provider, with MCP support](https://swe.quest/articles/managed-better-auth-is-now-an-oauth-provider-with-mcp-support-613f00a7521407ac.md): Neon · 2026-11-02 · Medium · 5 min read · Identity & auth, AI agents, PostgreSQL
  Neon's Managed Better Auth now supports the OAuth Provider plugin, turning an auth instance into an OAuth 2.1 authorization server that both companion apps and MCP clients can use to sign users in.
- [Supabase Auth: SSO, Mobile, and Server-side support](https://swe.quest/articles/supabase-auth-sso-mobile-and-server-side-support-6a2bc9b0f4a5ef26.md): Supabase · 2023-04-13 · Medium · 7 min read · Identity & auth, PostgreSQL, Multi-tenancy, Mobile
  Supabase Auth adds SAML 2.0 single sign-on, a PKCE authorization flow for server-side rendering and mobile apps, and native Sign in with Apple on iOS.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
