Skip to content
Conduit

mcp server

smrt

https://s-m-r-t.dev

happyvertical/smrtcommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

Before you start

  • Node.js 20 or newer
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "happyvertical-smrt": {
      "command": "npx",
      "args": [
        "-y",
        "@happyvertical/smrt-app-mcp"
      ]
    }
  }
}

same format Cursor, GitHub Copilot CLI, Junie, JetBrains AI Assistant, Augment (Auggie CLI), Factory Droid, Kiro, Devin CLI +12

Values in angle brackets are placeholders. Restart Claude Desktop after editing its config.Claude Desktop docs

README

synced Oct 25, 2026

s-m-r-t framework

Define business objects once. Use them through persistence, REST, CLI, MCP, agents, web clients, and native apps.

s-m-r-t is a TypeScript framework for building operational software and vertical AI agents around the same typed domain model. Decorated classes become manifest-described objects with portable persistence, generated interfaces, tenant-aware relationships, AI operations, and reusable domain packages.

It is designed for systems where the difficult part is keeping data, permissions, tools, background work, user interfaces, and automation aligned as the domain grows—not merely implementing one endpoint or agent prompt. The repository contains 61 top-level platform packages published primarily under @happyvertical/smrt-*, plus a private playground test-host workspace.

Define once, expose deliberately

flowchart LR
  A["TypeScript classes with @smrt()"] --> B["Manifest and schema metadata"]
  B --> C["SQLite, PostgreSQL, or DuckDB"]
  B --> D["REST and typed clients"]
  B --> E["CLI, MCP, and WebMCP tools"]
  B --> F["Web and mobile collections"]
  C --> G["Agents, jobs, and domain services"]
  D --> G
  E --> G
  F --> G

Generation is allowlist-driven. A model does not become publicly writable just because it exists: each @smrt() declaration controls its REST, CLI, MCP, AI, cache, tenancy, and lifecycle surface.

Requirements

  • Node.js 26 or newer
  • pnpm 11.13.1 or newer (11.13.0 is a broken release pnpm itself refuses)
  • A supported database adapter (SQLite is convenient for local development; PostgreSQL and DuckDB are supported where documented)

Quick start

pnpm init
pnpm pkg set type=module
pnpm add @happyvertical/smrt-config @happyvertical/smrt-core
pnpm add --save-dev @happyvertical/smrt-cli @types/node vite typescript
mkdir -p src

Save this as src/product.ts:

import { ObjectRegistry, SmrtCollection, SmrtObject, smrt } from '@happyvertical/smrt-core';

ObjectRegistry.registerPackageManifest(
  new URL('../.smrt/manifest.json', import.meta.url),
);

@smrt({ api: true, cli: true, mcp: true })
export class Product extends SmrtObject {
  name: string = '';
  price: number = 0.0; // decimal schema field
  quantity: number = 0; // integer schema field
}

export class ProductCollection extends SmrtCollection<Product> {
  static readonly _itemClass = Product;
}

const database = {
  type: 'sqlite' as const,
  url: process.env.DATABASE_URL ?? 'products.db',
};
const products = await ProductCollection.create({ db: database, persistence: database });
const product = await products.create({
  name: 'Field Recorder',
  price: 299.99,
  quantity: 4,
});
await product.save();

Configure the supported build-time scanner in vite.config.ts:

import { smrtPlugin } from '@happyvertical/smrt-core/vite-plugin';
import { defineConfig } from 'vite';

export default defineConfig({
  oxc: { decorator: { legacy: true, emitDecoratorMetadata: true } },
  plugins: [smrtPlugin({ include: ['src/**/*.ts'] })],
});

Configure the CLI database in smrt.config.ts (the db:* commands read packages.cli.database; they do not read DATABASE_* directly):

import { defineConfig } from '@happyvertical/smrt-config';

export default defineConfig({
  packages: {
    cli: {
      database: {
        type: 'sqlite',
        url: process.env.DATABASE_URL ?? 'products.db',
      },
    },
  },
});

Generate the manifest, apply its schema to the fresh SQLite database, and only then run the example. The example explicitly registers that generated application manifest before creating the collection:

DATABASE_URL=products.db pnpm vite build --ssr src/product.ts
DATABASE_URL=products.db pnpm smrt db:migrate
DATABASE_URL=products.db node dist/product.js

Running the built dist/product.js entry preserves the manifest-registration call in the executable output, where its ../.smrt/manifest.json URL resolves to the manifest generated by the scanner. @smrt() makes the class discoverable to that build-time scanner. Enabling api, cli, and mcp declares generated surfaces. smrt db:migrate is the supported manifest-driven setup and migration path; runtime initialization verifies application schema rather than creating it implicitly.

For framework invariants and production setup, read the repository guide and the core package documentation.

Platform capabilities

  • Domain-first ORM: typed objects, collections, relationships, tenancy, STI, migrations, and portable database adapters.
  • Generated interfaces: REST, CLI, MCP, manifests, web collection definitions, and mobile contracts from one model graph.
  • AI runtime: object-level is()/do(), prompts, agents, personas, learning memory, jobs, and observability signals.
  • Reusable vertical packages: identity, content, commerce, sales, support, projects, media, analytics, and more.
  • Cross-platform clients: Svelte 5 UI, browser data runtime, Kotlin Multiplatform foundations, Android Compose, and SwiftUI.

Choose your path

GoalStart here
Learn the object and collection modelsmrt-core
Start a SvelteKit applicationsmrt-template-sveltekit
Run a local, self-hosted, or cloud applicationsmrt-app-runtime
Build agents and personassmrt-agents, smrt-personas
Add tenant-aware identity and authorizationsmrt-tenancy, smrt-users
Build live or offline browser datasmrt-web, smrt-svelte
Expose an application CLI or MCP serversmrt-app-cli, smrt-app-mcp
Use an existing business domainBrowse the linked package catalog below
Extend or review the frameworkAGENTS.md, smrt-dev-mcp

Package catalog

Status legend:

  • Stable — established public package contract.
  • Preview — public and usable, with an actively evolving contract.
  • Experimental — incomplete or exploratory; evaluate before production use.
  • Internal — repository tooling or platform package, not a general npm API.
  • Deprecated — compatibility only; follow its migration guide.

Foundation and tooling

PackageStatusPurpose
smrt-coreStableORM, decorators, registries, code generation, AI operations, and runtime services.
smrt-typesStableShared framework types and enums.
smrt-configStableConfiguration loading, validation, redaction, and static export.
smrt-scannerStableOXC-based TypeScript metadata scanner.
smrt-tenancyStableTenant context, interceptors, and isolation adapters.
smrt-vitestStableManifest-aware Vitest integration and database isolation.
smrt-cliStableDeveloper CLI, schema commands, generation, and knowledge tooling.
smrt-app-cliPreviewReusable branded application CLI and stdio MCP bridge.
smrt-app-runtimePreviewValidated local, self-hosted, and cloud composition with safe bootstrap, provider diagnostics, and profile-selected workers.
smrt-workbenchPreviewCWD-scoped package and project workbench for docs, APIs, routes, previews, and knowledge.
smrt-workbench-hostInternalPrivate SvelteKit browser host bundled with the workbench package.
smrt-dev-mcpStableDevelopment MCP server and repository knowledge tools.
smrt-app-mcpPreviewApp-runtime MCP server and transport adapters.
smrt-mcp-appsPreviewPortable browser bridge for embedded MCP Apps with bounded host messaging and lifecycle controls.
smrt-mcp-openaiPreviewOptional OpenAI navigation, settings, display, and onboarding adapter.
smrt-mcp-conformance-fixtureInternalGenerated Tier-1 MCP 2026-07-28 conformance gate.
smrt-bundle-gateInternalConsumer bundle reachability and size regression gate.

Agents, identity, and operations

PackageStatusPurpose
smrt-agentsStableAgent lifecycle, discovery, dispatch, and scheduling.
smrt-jobsStableDurable background jobs, task runners, and schedules.
smrt-usersStableUsers, tenants, sessions, RBAC, permissions, and RLS.
smrt-profilesStableIdentity profiles, authentication bindings, and relationships.
smrt-personasPreviewContext-scoped agent personas and governed learning loop.
smrt-approvalsExperimentalRevision-bound, single-use approvals with quorum, expiry, and an append-only decision ledger.
smrt-playbooksPreviewLayered playbook registry, overrides, and plan resolution.
smrt-promptsStableTyped prompt registry and tenant-aware overrides.
smrt-projectsPreviewProvider-neutral projects, repositories, issues, and delivery work.
smrt-supportPreviewSupport Case intake, lifecycle, routing, targets, and service time.
smrt-timesheetsPreviewShared time entries, approval and correction, and immutable charge/compensation snapshots.
smrt-human-resourcesPreviewEmployment records with dated terms, and qualifications with expiry.

Content and media

PackageStatusPurpose
smrt-contentStableVersioned content, documents, mirrors, thumbnails, and citations.
smrt-assetsStableProvider-neutral asset identity, versions, metadata, and lineage.
smrt-assets-localPreviewLocal image metadata and deterministic variant processing.
smrt-assets-ergotPreviewErgot processing, search, workflow, and synchronization adapter.
smrt-imagesStableImage categorization, editing, search, and asset extensions.
smrt-ingestionExperimentalDurable intake, evidence revisions, stage recovery, and action journal foundations.
smrt-videoStableVideo production models, scenes, performers, and workflows.
smrt-voiceStableVoice profiles, synthesis, cloning, and word timing.
smrt-messagesStableProvider-neutral multi-channel messages and credentials.
smrt-chatStableRooms, DMs, threads, sessions, and agent conversations.
smrt-commentsPreviewRecord comments and mention notification hooks.
smrt-reactionsExperimentalGuarded reactions and polls for SQLite and PostgreSQL.
smrt-webhooksPreviewSigned outbound webhooks, durable retries, and delivery administration.
smrt-socialStableSocial account OAuth, publishing, and scheduling.

Business and domain

PackageStatusPurpose
smrt-commerceStableCustomers, vendors, contracts, invoices, and fulfillment.
smrt-productsStableProduct catalog and triple-consumption package template.
smrt-salesPreviewAgreements, CRM, referrals, commissions, and sales surfaces.
smrt-affiliatesDeprecatedCompatibility shim over the smrt-sales commissions core.
smrt-subscriptionsPreviewPlans, entitlements, usage, pricing, and spending policies.
smrt-ledgersStableDouble-entry accounting and journal lifecycle.
smrt-educationPreviewTenant-aware course catalog, learner curricula, and enrollment progress with authorized private learning materials.
smrt-expensesPreviewReviewed expenses against a cost object, deduplicated receipts, and commitment drawdown.
smrt-adsStableAd selection, variation testing, and immutable delivery events.
smrt-analyticsStableAnalytics properties, streams, events, and reports.
smrt-reportsPreviewMaterialized aggregate definitions and refresh orchestration.
smrt-marketingPreviewCampaign coordination, budgets, evidence, and Svelte surfaces.
smrt-inventoryPreviewSKUs, stock locations, levels, movements, and mutation service.
smrt-manufacturingPreviewAssemblies, multi-level bills of materials, cost rollups, production runs, and production orders.
smrt-eventsStableNested events, series, participants, and placements.
smrt-placesStablePlace hierarchies, geocoding, and proximity queries.
smrt-factsStableKnowledge facts, provenance, confidence, and evolution.
smrt-sitesStableSite lifecycle and agent bindings.
smrt-propertiesStableDigital properties and hierarchical content/ad zones.
smrt-tagsStableContext-scoped hierarchical tags and aliases.
smrt-secretsStableTenant envelope encryption, rotation, and audit.
smrt-featuresPreviewCode-first feature flags and tenant overrides.
smrt-languagesPreviewLanguage strings, overrides, and translation jobs.
smrt-fieldsPreviewLayered field policy store, resolution engine, and form surfaces.
smrt-preferencesPreviewOrganization defaults and personal user-interface preferences: overview layouts and the shell layout.

Web, mobile, and templates

PackageStatusPurpose
smrt-uiStableDomain-neutral Svelte primitives, themes, i18n, and module UI registry.
smrt-svelteStableShared Svelte 5 framework components and application shells.
smrt-webPreviewReactive browser collections, offline outbox, persistence, and live invalidation.
smrt-playgroundPreviewPackage playground discovery, runtime, and host components.
smrt-playground-hostInternalPrivate SvelteKit end-to-end test host for the playground runtime.
smrt-plannerPreviewMountable app planner: pick recipes from every package's manifest, lay out the app, and export a cookbook; ships the static planner app and its MCP widget.
smrt-mobile-contractPreviewManifest-to-Kotlin/Swift contract generation.
smrt-mobilePreviewKotlin Multiplatform offline, sync, auth, and platform seams.
smrt-androidInternalAndroid Compose foundation and native adapters.
smrt-iosInternalSwiftUI foundation and native adapters.
smrt-template-sveltekitStableMinimal SvelteKit application template.
smrt-template-site-static-jsonStableStatic JSON community-site template.
smrt-gnodeExperimentalFederation library; currently incomplete.

SDK dependencies

s-m-r-t composes infrastructure from the HappyVertical SDK, including database, AI, filesystem, logging, messaging, and provider-neutral service adapters. Use the framework packages for domain objects and generated application surfaces; use the SDK directly when implementing infrastructure adapters or lower-level services.

Development

pnpm install
pnpm build
pnpm test
pnpm typecheck
pnpm lint
pnpm workbench
pnpm check:readmes
pnpm knowledge:check --strict --format markdown

Start with a package-scoped command (pnpm --filter <package> ...) before running relevant repository-wide validation. Do not create changesets manually; release automation generates them after merge.

Local SDK development helpers:

./setup-local-dev.sh
./restore-published-deps.sh

The first command links a sibling HappyVertical SDK checkout; the second restores registry dependencies.

Documentation

The documentation build discovers package READMEs from workspace package.json files. pnpm check:readmes prevents missing package docs, stale catalog entries, broken local README links, obsolete branding, and unsupported quick-start drift.

Related projects

License

MIT — see LICENSE.

↑↓ navigate openesc close