npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reaatech/multi-tenant-mcp-config-isolation

v0.1.0

Published

Per-tenant configuration isolation and validation for multi-tenant MCP

Readme

@reaatech/multi-tenant-mcp-config-isolation

npm version License: MIT CI

Status: Pre-1.0 — APIs may change in minor versions. Pin to a specific version in production.

Per-tenant configuration with Zod schema validation, base-config merging, and versioned migration support.

Installation

npm install @reaatech/multi-tenant-mcp-config-isolation
# or
pnpm add @reaatech/multi-tenant-mcp-config-isolation

Feature Overview

  • Schema validation — Zod-powered: missing or malformed configs are rejected with human-readable errors.
  • Base-config inheritance — Set shared defaults in a base config; tenant configs override individual fields.
  • Pluggable storage — In-memory store ships out of the box; implement TenantConfigStore for any backend.
  • Versioned migrationsConfigMigrationRunner runs ordered migrations when your config schema evolves.

Quick Start

import { z } from 'zod';
import {
  InMemoryConfigStore,
  ZodConfigValidator,
  TenantConfigManager,
} from '@reaatech/multi-tenant-mcp-config-isolation';

const schema = z.object({
  theme: z.string().default('light'),
  model: z.string().optional(),
  maxTools: z.number().min(1).default(5),
});

const validator = new ZodConfigValidator({ schema });
const store = new InMemoryConfigStore({ defaults: { theme: 'light', maxTools: 5 } });
const manager = new TenantConfigManager({ store, validator });

// Set tenant-specific overrides
await manager.set('tenant-a', { theme: 'dark', maxTools: 20 });

// Get merged config (tenant overrides + base defaults)
const config = await manager.get('tenant-a');
// { theme: 'dark', maxTools: 20 }

// Invalid configs are rejected
await manager.set('tenant-b', { maxTools: -1 }); // throws ValidationError

Config Migrations

import { ConfigMigrationRunner } from '@reaatech/multi-tenant-mcp-config-isolation';

const runner = new ConfigMigrationRunner();
runner.register({
  version: 1,
  migrate: async (store) => {
    // Add "model" field to all existing tenant configs
    for (const tenantId of await store.listTenants()) {
      const config = await store.get(tenantId);
      if (config && !config.model) {
        await store.set(tenantId, { ...config, model: 'gpt-4-turbo' });
      }
    }
  },
});

await runner.run(store);

Exports

| Export | Kind | Description | |--------|------|-------------| | TenantConfig | Type | Record<string, unknown> | | ConfigValidator | Interface | validate(config) → TenantConfig | | TenantConfigStore | Interface | get, set, delete per tenant | | InMemoryConfigStore | Class | In-memory store with base defaults | | ZodConfigValidator | Class | Validate tenant configs against a Zod schema | | TenantConfigManager | Class | High-level facade: get/set with validation and base merge | | ConfigMigrationRunner | Class | Run ordered versioned migrations | | ConfigMigration | Interface | { version, migrate: (store) => Promise<void> } |

Related Packages

License

MIT