Skip to main content

What is Multi-Tenant?

A multi-tenant MCP server is one canister that serves many users, where each user’s data is segregated by their principal ID. When to Use:
  • βœ… Todo/task lists, notes, calendars, settings
  • ❌ Token custody, financial operations, per-user contracts
Trade-offs:
  • Pros: Cost-effective, simple deployment, shared resources
  • Cons: Shared storage limits, requires careful access control

Example: Multi-Tenant Todo List

Let’s build a simple todo list MCP where each user has their own isolated tasks.

1. Define Your Data Model

2. Set Up Principal-Based Storage

3. Create MCP Tools

4. Register with MCP Server


Key Security Principles

1. Always Check the Caller

2. No Cross-User Access

3. Validate All Inputs


Testing Your Multi-Tenant App

1. Deploy Locally

2. Create API Keys for Different Users