Production Starter
БесплатноНе проверенA hexagonal TypeScript starter for production MCP servers with built-in authentication, billing, and tool scaffolding.
Описание
A hexagonal TypeScript starter for production MCP servers with built-in authentication, billing, and tool scaffolding.
README
Ship a paid MCP server in an afternoon.
A hexagonal TypeScript starter for production MCP servers: Hono + Drizzle + Postgres + Redis + Stripe + Notion. OAuth-secured sessions, AES-256-GCM token storage at rest, dual subscription + metered (MPP) billing on one port, per-tool rate limiting, idempotency cache, structured logging, and SSE streaming. Six documented deployment targets, v1.0.0.
Quick start
cp .env.example .env # then open .env in your editor
openssl rand -base64 32 # paste into ENCRYPTION_KEY in .env
docker compose up -d --wait # postgres + redis + migrate + app, healthcheck-gated
curl -sS http://localhost:3000/health | jq .
# expect: {"status":"ok","services":{"database":"ok","redis":"ok"}}
Boot fails fast if ENCRYPTION_KEY is unset (Zod min-length check). Stripe / Notion placeholders are accepted at boot and only fail when a billing-gated or OAuth-protected tool fires — see docs/CONFIGURATION.md for the full validation matrix. The six target runbooks (Docker Compose, Railway, Render, Fly.io, Cloudflare Workers + Neon, generic VPS) are in docs/DEPLOYMENT.md.
What's inside
src/transport/ is the Hono HTTP layer (routes, middleware, SSE writer); src/application/ is orchestration (tool dispatcher, OAuth flow, token refresh, billing orchestrator, the 8-stage tool dispatcher pipeline — 11 stages including Hono middleware; see docs/ARCHITECTURE.md for the diagram); src/domain/ is types, branded value objects, ports, and error classes; src/infrastructure/ is the adapters (Postgres + Redis driver factories, AES-256-GCM token cipher, Stripe gateways, Notion clients, pino logger); src/tools/ is where you add MCP tool definitions; src/schema/ is your Drizzle tables (users, oauth_tokens, subscriptions, usage, jobs).
First custom tool in 5 minutes
npm run new-tool myorg.hello
# edit src/tools/myorg-hello/myorg-hello.tool.ts — fill in input/output Zod schemas + handler
# register one line in src/composition-root.ts:
# toolRegistry.register(myorgHelloTool as AnyToolDefinition);
npm run dev
curl -sS -X POST http://localhost:3000/mcp \
-H 'Authorization: Bearer <session-token>' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"myorg.hello","arguments":{}}}'
The scaffold emits a typed ToolDefinition with AuthNone + BillingNone defaults — flip those to AuthRequired or BillingSubscription / BillingMpp and the dispatcher pipeline picks up the new requirements at call time, no framework edits. Full extension guide — sync tool, streaming tool, table, OAuth provider — in docs/CUSTOMIZATION.md.
Architecture in 100 words
Hexagonal. The domain layer defines ports (interfaces) and error classes and knows about nothing else. The application layer is orchestration logic (tool dispatcher, OAuth flow, billing) that depends only on domain. The infrastructure layer holds adapters that implement the ports (Postgres, Redis, Stripe, Notion, pino). The transport layer is the Hono app that wires HTTP to the dispatcher. The composition root in src/composition-root.ts is the only place adapters meet ports. A single BillingGateway port dispatches to both Stripe Subscriptions and Stripe MPP based on each tool's billing.kind. Full picture in docs/ARCHITECTURE.md.
Production deploy
Six runbooks ship in docs/DEPLOYMENT.md: Docker Compose self-host (default), Railway, Render, Fly.io, Cloudflare Workers + Neon (serverless edge), and generic VPS behind Caddy. Each runbook covers Postgres + Redis provisioning, Stripe webhook URL, OAuth callback URL, and a smoke-test curl. Env-var rules are documented once in docs/CONFIGURATION.md and referenced from every runbook.
What's NOT in v1
Honest list of what was intentionally deferred:
- No Stripe Meters / usage-based billing —
BillingGatewayships with Subscription and MPP (Metered-Pricing-Per-call) adapters only. - No nested-block Notion rendering —
blocksToMarkdownemits flat bullets; rich block trees are a v1.1 polish item. - No queue/worker for async-poll tools — the pattern is documented in
docs/PATTERNS_ASYNC_JOBS.md; the queue itself (BullMQ, SQS, etc.) is the buyer's choice. ENCRYPTION_KEYrotation is operationally manual — re-encrypt-everything script lives indocs/MAINTENANCE.md(ships with the rest of the doc suite). Two-key window support is in the v1.1 backlog.- No mass logout or timeout distinction —
SessionRepository.revokeAllForUser(security events) and a dedicatedTimeoutError(504 vs 500 in dashboards) are both v1.1; today, individual tokens revoke fine and timeouts surface asInternalError.
Full v1.1 roadmap with implementation sketches and ship triggers: V1_1_BACKLOG.md.
Support
For v1.0.0 ship day: Gumroad seller messages on the kit's listing + the email address in LICENSE. See docs/TROUBLESHOOTING.md and SECURITY.md for detail. Pre-launch, the maintainer should replace the [email protected] placeholder in LICENSE, SECURITY.md, and docs/TROUBLESHOOTING.md with the real channel — see LAUNCH_CHECKLIST.md.
License
Commercial — single-seat. LICENSE ships in Phase 14 of the build.
Установка Production Starter
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/rishipatel-1/production-mcp-starterFAQ
Production Starter MCP бесплатный?
Да, Production Starter MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Production Starter?
Нет, Production Starter работает без API-ключей и переменных окружения.
Production Starter — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Production Starter в Claude Desktop, Claude Code или Cursor?
Открой Production Starter на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Stripe
Payments, customers, subscriptions
автор: Stripemalamutemayhem/unclick-agent-native-endpoints
110+ tools for AI agents spanning social media, finance, gaming, music, AU-specific services, and utilities. Zero-config local tools plus platform connectors. n
автор: malamutemayhemwhiteknightonhorse/APIbase
Unified API hub for AI agents with 56+ tools across travel (Amadeus, Sabre), prediction markets (Polymarket), crypto, and weather. Pay-per-call via x402 micropa
автор: whiteknightonhorsetrackerfitness729-jpg/sitelauncher-mcp-server
Deploy live HTTPS websites in seconds. Instant subdomains ($1 USDC) or custom .xyz domains ($10 USDC) on Base chain. Templates for crypto tokens and AI agent pr
Compare Production Starter with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории finance
