LogoLogo
PlatformConnectivityFlowsLearn
  • Getting Started
    • Welcome to Fastn
    • How Fastn Works
  • Your First Automation
  • UCL - Unified Command Layer
    • About Fastn UCL
    • Getting Started with UCL
    • Multitenancy
    • Embedding Fastn UCL onto your AI Agent
  • UCL Monitoring
  • Fastn UCL Use Cases
    • Create a Google Doc and Share it to Slack - using Fastn UCL
    • Connect Fastn UCL to AI Assistant Preview for task Assignment in Jira
    • Connect Fastn UCL to Cursor and access data from Notion
  • Customer-Facing Integrations
    • Introduction to Embedded Integrations
    • Custom Webhooks: Automatic Triggers
    • Configuring the Embedded Experience
    • Workspace Management
  • Analytics & Monitoring
  • Building Flows
    • Flow Setup Essentials
    • Designing a Flow
    • Using Templates
  • Connecting Apps
    • Connector Types & Setup
    • Managing & Using Connectors
  • Data & Storage
    • Connect to the Fastn DB
    • Connecting External Databases
  • Unified MCP Server
  • Built for Multitenancy: How Fastn UCL Manages Context and Isolation at Scale?
  • Additional Resources
    • Glossary
    • FAQs
Powered by GitBook
On this page
  • The Problem with “Single-Tenant” AI Workflows
  • How Fastn UCL Solves Multitenancy
  • Code Example: Multitenant MCP Config
  • Real-World Example
  • Built for Scale, Security, and Simplicity
  • Conclusion: Multitenancy That Just Works

Was this helpful?

Built for Multitenancy: How Fastn UCL Manages Context and Isolation at Scale?

PreviousUnified MCP ServerNextGlossary

Last updated 1 day ago

Was this helpful?

AI-native apps don’t run in a vacuum—they run across workspaces, users, and tenants. When your AI agent is expected to interact with Slack for one customer, Gmail for another, and Notion for a third, the system behind it must know whose data to fetch, which app to talk to, and how to do it securely.

That’s why Fastn UCL (Unified Command Layer) is built with multitenancy at its core—not as an afterthought.


The Problem with “Single-Tenant” AI Workflows

Many early-stage tools—especially those using just the MCP protocol or a gateway vendor—are built around the assumption of a single tenant or user. That’s fine for personal use or prototyping.

But in a real SaaS product, your AI assistant might receive:

  • A command from Customer A to send a Slack reminder

  • A command from Customer B to retrieve a Google Doc

  • A command from Customer C to create a Jira task

Each of these customers has their own:

  • Workspace and tools

  • Auth tokens and permissions

  • Isolation and compliance requirements

Without multitenancy, you'd be forced to spin up and manage separate infrastructure for each customer. That doesn't scale.


How Fastn UCL Solves Multitenancy

Fastn UCL is designed to make multitenant integration seamless, with features like:

1. Tenant and Workspace Context Detection

Each incoming command carries metadata—such as tenant ID, user ID, and workspace context—so Fastn knows exactly who made the request and which connector to use.

2. Context-Aware Routing

Fastn UCL dynamically routes each MCP command to the correct tool, tenant, and workspace based on your configuration. You don’t need to hardcode logic or write glue code.

3. Token Management Per Tenant

OAuth tokens and API keys are securely stored and scoped to individual tenants and connectors. There’s no leakage between tenants, even when they use the same tools.

4. Tenant-Specific Logging & Observability

Fastn UCL provides per-tenant logs, metrics, and error reports—so you can debug and monitor integrations without crossing workspace boundaries.

5. Multi-Workspace Support

You can define multiple workspaces per account, each with its own connector configuration, usage limits, and access controls. Switching context is seamless and automatic.


Code Example: Multitenant MCP Config

Let’s look at what this looks like when configuring Fastn UCL with Cursor:

jsonCopyEdit{
  "mcpServers": {
    "fastn": {
      "transport": "streamable_http",
      "url": "https://mcp.ucl.dev/shttp/space_id={}&tenant_id=test-tenant&auth_token=customAuthToken"
    }
  }
}

The tenant_id and space_id here allow Fastn to isolate access per customer. Even if customers use the same underlying tools (e.g. Slack), each call is made using their tokens, with their scope.

This configuration supports:

  • Multiple customers using the same AI assistant

  • Each customer getting personalized results

  • Strict separation between workspaces and environments


Real-World Example

Suppose you’re building a “Daily Summary” feature powered by an AI agent.

  • Customer A uses Slack to receive the summary

  • Customer B prefers email via Gmail

  • Customer C stores summaries in Notion

With Fastn UCL:

  • The assistant sends a single MCP command

  • Fastn UCL detects which tenant sent it

  • It selects the correct action (Send Slack message, Send Email, Create Notion Page)

  • It runs that action with tenant-specific credentials

No duplicated logic. No risk of cross-tenant data leaks.


Built for Scale, Security, and Simplicity

Here’s how Fastn UCL simplifies multitenancy:

Feature
Without Fastn UCL
With Fastn UCL

Token management

You build and store it

Automatically managed per tenant

Context detection

Manual via headers or custom code

Built-in per command

Error handling

Per-tenant logic required

Built-in retries and isolation

Tenant observability

DIY dashboards or logs

Real-time per-tenant dashboards

Scaling

Add infra manually

Fully managed backend infrastructure


Conclusion: Multitenancy That Just Works

Building AI-powered SaaS tools shouldn’t mean reinventing your integration infrastructure for each customer. With Fastn UCL, your AI agents can route, authenticate, and execute commands per tenant—with no extra logic or complexity on your side.

You define your actions. Your users connect their apps. Fastn UCL takes care of the rest.


Next Step: Explore the multitenant-aware integration guide on Want help building a real use case? Let us know, and we’ll show you how to embed your first multitenant agent.

ucl.dev
Agentic Actions Across Integrations | Paragon Use Cases
Logo