Skip to main content
Glama
aljon-zb

Unified Multi-Tenant MCP

by aljon-zb

Unified Multi-Tenant MCP

This project implements the architecture where all tenants use one public MCP endpoint:

https://mycompany.com/mcp

There is no public tenant-specific MCP URL such as:

/mycompany.com/peltierpro/mcp
/mycompany.com/zenbiz/mcp

Instead, the authenticated user/session resolves:

user -> tenant -> role -> permissions -> tenant integration

Existing tenants

  • PeltierPro

  • ZenBiz

Related MCP server: mcp-tenant-pair

Why the per-project public URLs were removed

The previous PELTIERPRO_PUBLIC_URL and ZENBIZ_PUBLIC_URL values are redundant in a single-gateway architecture.

Only one global public MCP endpoint is required:

MCP_PUBLIC_BASE_URL=https://mycompany.com
MCP_PUBLIC_PATH=/mcp

However, these are not redundant and remain tenant-specific:

PELTIERPRO_ODOO_URL=...
PELTIERPRO_ODOO_DATABASE=...
PELTIERPRO_ODOO_API_KEY=...

ZENBIZ_ODOO_URL=...
ZENBIZ_ODOO_DATABASE=...
ZENBIZ_ODOO_API_KEY=...

Those values point to different backend systems/credentials.

Identity modes

The project is prepared for:

shared
individual
hybrid

hybrid is recommended while migrating from one shared AI account to individual Business/Enterprise seats.

Shared account

Shared Claude/ChatGPT account
        |
        v
Your internal employee login
        |
        v
Internal user
        |
        v
Tenant + role + permissions

Individual seat

Employee's Claude/ChatGPT seat
        |
        v
OAuth / SSO identity
        |
        v
Internal user mapping
        |
        v
Tenant + role + permissions

Current bootstrap mode

OAuth is disabled in the provided .env.

For development only, the project contains:

system_bootstrap_as_tenant

so you can select peltierpro or zenbiz and test tenant routing.

Remove/disable this tool when real OAuth/SSO middleware is implemented.

Next production step

Replace bootstrap context with validated OAuth/SSO claims such as:

{
  "sub": "user_123",
  "tenant_id": "peltierpro",
  "role": "sales_manager",
  "identity_mode": "individual"
}

For a shared AI account, your own internal login can issue equivalent claims after the employee signs in.

Security note

The generated .env contains credentials supplied for this project and is excluded by .gitignore.

Do not commit .env to a Git repository.

mcp-zenbizsolutions

Railway runtime compatibility

This project is pinned to MCP Python SDK 1.x with mcp>=1.12.0,<2. FastMCP 1.x requires host and port to be assigned through mcp.settings before calling run(). Railway's injected PORT variable is preferred automatically, with MCP_PORT as the local fallback. MCP_PUBLIC_BASE_URL is also normalized to HTTPS when entered without a scheme.

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Aggregates multiple MCP servers behind a single, secure endpoint with unified tool/resource discovery, OAuth authentication, and resilient request routing. Enables users to manage and interact with multiple MCP backends through one centralized interface with load balancing and circuit breakers.
    2
    -
  • A
    license
    Not graded
    quality
    A
    maintenance
    Manages multi-user tenancy for consumer MCP servers, enabling pair creation, invite flows, identity-separated state, and conflict resolution.
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables dynamic aggregation of multiple MCP servers into a unified endpoint with middleware, orchestration, and gateway capabilities.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables clients to access multiple backend MCP servers through a single endpoint, with OAuth 2.1 authorization, namespaced tools, and secure credential management.
    MIT