Tenant Pair

by studiomeyer-io

189 downloads
Not rated
GitHub Website

About

Foundation library + reference MCP server for multi-user tenancy (couples, families, groups). Bi-temporal storage, conflict-resolver interface, SQLite + Postgres adapters, MCP-Spec 2025-06-18.

Details

Author
studiomeyer-io
Downloads
189

- ManualResolver — returns no resolutions; conflicts stay pending until a human resolves them externally
- Per-pair pending-invite cap (default 25, configurable via maxPendingInvites)
- Owner-only kick. Owner cannot kick themselves; use leave instead
- Time is injectable (now: () => Date) for deterministic tests
- Pair creation (8)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Tenant Pair
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

The README includes setup instructions such as | Node | >= 20.0.0 |.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "tenant pair": {
            "mcp-tenant-pair": {
                "command": "npx",
                "args": [
                    "mcp-tenant-pair-cli",
                    "pair",
                    "create",
                    "--member-id",
                    "alice"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-tenant-pair": {
        "command": "npx",
        "args": [
            "mcp-tenant-pair-cli",
            "pair",
            "create",
            "--member-id",
            "alice"
        ]
    }
}

mcp-tenant-pair

<!-- badges -->
npm version
npm downloads
License
Last commit
GitHub stars
<!-- /badges -->Foundation library + reference MCP server for multi-user tenancy in consumer MCP servers (couples, families, small groups). Identity-separated state, bi-temporal storage, conflict-resolver interface.

Spec: MCP 2025-06-18
License: MIT
Repo layout: monorepo (npm workspaces)

packages/
  lib/        mcp-tenant-pair          (TypeScript library)
  cli/        mcp-tenant-pair-cli      (commander CLI)
  demo/       mcp-tenant-pair-demo     (reference Low-Level MCP server, stdio)

A note from us

We have been building tools and systems for ourselves for the past two years. The fact that this repo is small and has few stars is not because it is new. It is because we only just decided to share what we have built. It is not a fresh experiment, it is a long story with a recent commit.

We love building things and sharing them. We do not love social media tactics, growth hacks, or chasing stars and followers. So this repo is small. The code is real, it gets used, issues get answered. Judge for yourself.

If it helps you, sharing, testing, and feedback help us. If it could be better, an issue is more useful. If you build something with it, tell us at hello@studiomeyer.io. That genuinely makes our day.

From a small studio in Palma de Mallorca.

Why this exists

Most MCP servers today are single-user. The moment you want to share state across two or more humans (couples, families, small groups) you hit the same five sub-problems each time: pair creation, invite flow, identity-separated state, conflict resolution, voluntary leave / kick. This library solves them once, so downstream MCP servers (Pet-Platform, recipe-sharing, household, calendar) do not re-invent them.

5-Minute Quickstart

Library

import { TenantPair, SqliteTenantStore, LWWResolver } from "mcp-tenant-pair";

const tp = new TenantPair({
store: new SqliteTenantStore({ path: "./tenant-pair.sqlite" }),
resolver: new LWWResolver(),
});

const { pairId, inviteToken } = await tp.createPair({ creatorMemberId: "alice" });
await tp.acceptInvite({ inviteToken, memberId: "bob" });

await tp.setMemberPreference(pairId, "alice", "allergy", ["nuts"]);
await tp.setSharedState(pairId, "alice", "tonight", "pizza");

const aliceConstraints = await tp.getMemberConstraints(pairId, "alice");
const shared = await tp.getSharedState(pairId);

CLI

npx mcp-tenant-pair-cli pair create --member-id alice
npx mcp-tenant-pair-cli pair invite --pair-id <id> --member-id alice
npx mcp-tenant-pair-cli state set --pair-id <id> --member-id alice --key tonight --value pizza
npx mcp-tenant-pair-cli state get --pair-id <id>

Demo MCP server

```sh
node packages/demo/dist/server.js

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.