Open-Source AI Infrastructure ❋ Rust MCP & Internal App Store

An internal App Store for your company’s AI.

AI makes building internal tools easy. Keeping them secure, compliant, and maintainable is the hard part. mstack gives every service a tiny Rust MCP foundation, and mstack-hub scales and maintains them across your organization, from private drafts to reviewed, team-wide releases.

mstack~5 MB RAM · ~10 ms startup

The Rust MCP tech stack

Built on Anthropic’s official Rust MCP SDK (rmcp) with OAuth 2.1 security built in. Lean, fast, and secure by default, so you can build reliable AI infrastructure components without heavy cloud stacks.

mstack-hubDraft → Review → Publish

The internal AI App Store

Scales your mstack components into one secure, maintainable internal App Store. Anyone can build private components and, after review and approval, share them safely with teams and AI agents.

  • EU-compliant
  • Own servers
  • Minimal hardware
  • Automated backups
  • Low cost
  • Scalable
  • Open source

Inside mstack-hub ❋ Product Walkthrough

What employees and IT admins actually see.

01 · App Catalog

One catalog for internal MCPs, web apps, and SaaS.

Employees see only the tools approved for their role. Live health status, department bundles, and connection setup live in one clean interface.

  • Filter by MCP, Web-App, Claude-App, or External MCP
  • Live health checks and clear role badges per service
  • Team bundles like engineering and marketing for fast onboarding
apps.headcodecms.com
mstack Hub App Catalog showing internal MCP services, Next.js web apps, external SaaS MCPs like HubSpot CRM and Shopify Store, live health status, role badges, and team bundles

02 · Guided App Creation

Build privately. Publish after review.

Anyone on the team can turn an idea like a SaaS & Contract Tracker into a private draft with guardrailed starter instructions, then submit it for review before sharing it company-wide.

  • Combine Rust MCP Service, Next.js Web-App, or Claude App
  • Reserve a private draft visible only to owner and Hub admins
  • Generate a ready-to-run starter prompt aligned to your stack
apps.headcodecms.com / new-app
Create New Internal App dialog in mstack Hub filled in with SaaS and Contract Tracker, multi-select components for Rust MCP Service and Next.js Web-App, private draft checkbox, and Generate Starter Prompt button

01 ❋ The Architecture Shift

Software moves behind MCP.

For twenty years, internal software meant isolated web dashboards, ad-hoc REST APIs, and shared API keys pasted into .env files. In an AI-native organization, humans, AI chats, and autonomous workflows all cross one OAuth 2.1 boundary to reach the exact same Model Context Protocol services.

AI Architecture diagram showing Users and Triggers (Slack, Email, Cron) connecting via Internal Apps (Web, Claude), AI Chat (Claude, ChatGPT), External Apps (SaaS Web), and AI Workflows (eve, Mastra) across a Better Auth OAuth boundary to Internal MCP and External MCP services
Step 01 · AI Architecture: one Auth boundary across every human and agent clientExcalidraw ❋ mstack

One Auth Boundary

Better Auth issues short-lived OAuth 2.1 JWTs with PKCE and CIMD. Whether a user clicks a Next.js button, chats with Claude or ChatGPT, or triggers an AI workflow, permissions are enforced per user instead of shared static tokens.

Internal MCPs

Your proprietary data and workflows (CMS, PIM, inventory, finance, internal ops) live as clean, single-tenant MCP services you own and self-host. Both your internal web apps and AI agents call the exact same tools.

External SaaS MCPs

Vendors like Shopify, HubSpot, and Jira already ship native MCP servers. AI Chats and workflows connect straight to them while your hub keeps discovery, docs, and team onboarding in one place.

02 ❋ The Framework

mstack: fixed tech guardrails, zero sprawl.

When AI builds internal apps without constraints, companies inherit five languages, seven databases, and ten broken auth implementations. mstack is a copy-and-own blueprint that standardizes the entire stack so teams only write domain logic.

mstack architecture diagram showing Better Auth on the left, a Rust MCP Service in the center with OAuth, RMCP (Rust MCP SDK), Service Logic, and embedded Turso (Relational), DataFusion (Analytics), and Tantivy (Search), and Next.js Web Apps on the right
Step 02 · mstack: single-tenant Rust MCP service, embedded engines and Next.js web appsExcalidraw ❋ mstack

RMCP (Rust MCP SDK) + Service Logic

Built on Anthropic’s official rmcp Rust crate with Streamable HTTP and built-in skills-fs. Each service compiles to a tiny static binary using ~5 MB RAM with ~10 ms startup time.

Three embedded, zero-ops data engines

Skip managing separate database clusters for every internal tool. Pick what your service needs directly in-process: Turso (MVCC relational SQL), Apache DataFusion (columnar analytics and Parquet), and Tantivy (full-text search).

Shared Better Auth (OAuth 2.1)

Deploy one lightweight auth service per organization. Every mstack backend verifies signed RFC 9068 JWTs locally via JWKS and identifies users purely by (iss, sub), keeping services 100% PII-free.

Next.js Web Apps without a duplicate REST layer

Humans still want fast, bespoke interfaces. Next.js apps run the exact same OAuth 2.1 + PKCE login and invoke /mcp directly from server actions, giving browsers and agents one backend contract.

03 ❋ The Internal AI App Store

mstack-hub: governance everyone understands.

Spinning up an MCP service takes an afternoon. Making internal AI tools discoverable, secure, and effortless for Marketing, Sales, and Engineering is the real bottleneck. mstack-hub solves it with a familiar metaphor: an App Store for your company.

mstack-hub diagram showing mstack-hub (Catalog, Roles, Access) synced with OAuth 2.1 Auth, governing Internal MCPs and Web Apps deployed via Uncloud across Server 1, Server 2, and Server n, alongside External SaaS tools like Shopify, HubSpot, and Jira
Step 03 · mstack-hub: Catalog, Roles and Access over Uncloud servers and External SaaSExcalidraw ❋ mstack
  1. 01

    Build in private

    Any engineer or AI coding agent spins up a new mstack component (an MCP backend, a Next.js Web App, or a Claude App) and registers it in mstack-hub as a private draft visible only to its owner.

  2. 02

    Review and publish to the catalog

    Once reviewed and approved, publish the app org-wide with usage guides, live /health telemetry, and clear role definitions. mstack-hub stays in the control plane and never proxies your traffic.

  3. 03

    Bundle internal MCPs and external SaaS

    Group internal services and external vendor MCPs (Shopify, HubSpot, Jira) into role bundles like Marketing or Engineering. Employees browse one App Store, connect Claude in seconds, or request time-limited access.

  4. 04

    Real-time Auth and Hub role bridge

    When Better Auth mints an OAuth 2.1 JWT for a service, it queries mstack-hub to inject the caller’s exact role (admin, editor, viewer). Revoke access in the App Store and every client loses access immediately.

  5. 05

    Deploy anywhere with Uncloud

    Internal MCP containers run across Server 1 to Server n connected via Uncloud’s WireGuard mesh with automatic TLS. Start on a single small European server and add nodes without Kubernetes overhead.

Why It Works

Built for security, speed, and low overhead.

~5 MB RAM, ~10 ms startup

Compiled Rust binaries run dozens of isolated services on minimal hardware with zero cold starts.

OAuth 2.1, Zero PII and instant offboarding

Verified (iss, sub) tokens only. No shared API keys or stored user data, and revoking a user cuts off access across every AI client immediately.

Private draft, review, publish

Teams build and test components privately, while IT reviews and approves before org-wide rollout.

EU-compliant and self-hosted

Runs on your own European servers with automated backups, full data sovereignty, and zero vendor lock-in.

One backend for humans and agents

Next.js web apps and Claude call the exact same /mcp tools under the same user permissions.

Low cost, easy to scale

Start on one affordable server and scale cleanly across nodes with Uncloud as your team grows.

Used by Headcode CMS and open-sourced under the MIT license.github.com/markustripp/mstack