npm @alchm/mcp-serverstdioMITupdated 8d ago
The world's first astrological meal-planning system. Alchm.kitchen bridges ancient alchemical wisdom with modern AI to deliver personalized food recommendations based on natal charts, live planetary positions, elemental harmony, and thermodynamic resonance.
What can you do with alchm kitchen?
Alchm.kitchen β v3.3.0
The world's first astrological meal-planning system. Alchm.kitchen bridges ancient alchemical wisdom with modern AI to deliver personalized food recommendations based on natal charts, live planetary positions, elemental harmony, and thermodynamic resonance.
Production: alchm.kitchen
What's new in 3.3 β Data Authenticity & Live Economy
- Data-authenticity campaign: a multi-PR push to drive the ingredient and recipe catalogs to REAL values β no fabricated nutrition, no placeholder/default templates, no hollow recipes. On the ingredient side: a shared free-text matching resolver now adopted by
UnifiedIngredientService(#559), removal of the fabricated nutrition template (#560), coverage-set cleanup of non-ingredient junk (#561), placeholder coverage entries no longer leaking into recommendations (#562), missing cooking staples added β stocks, broths, fish sauce (#563), real-vs-default scoring in the ingredient audit (#565), and real nutrition for the 21 specialty oils (#566). On the recipe side: per-serving nutrition backfill (#555), an improved ESMS ingredient matcher (match rate 0.56 β 0.64, #556), description/season cleanup (#557), de-publish of 14 fully-fabricated hollow recipes (#558), and nutrition reconciliation + elemental-signature recompute after staples (#564). - Dashboard honesty: Practitioner Cohorts now read canonical sources rather than vestigial JSONB (#552), the Cost Burndown stops fabricating and shows an honest "no billing source" (#553), and a real Railway resource-usage panel replaces it (#554). Plus Live Network Feed poller caching + jitter to cut DB pressure (#550) and a resilient, detectable new-user signup grant (#551).
- Agent Daily Cosmic Yield cron (in flight on
feat/agent-daily-yield-cron): a Vercel cron at/api/cron/agents-daily-yield(schedule30 0 * * *,CRON_SECRET-gated) mints each active, chart-bearing agent's personalized daily Cosmic Yield viaDailyYieldService.claimDailyYieldwithsite="agents", keeping the Live Network economy surfaces alive for visitors. It reuses the human-claim engine verbatim (same economics + per-day idempotency) and is purely additive β no formula or human-claim path changes.
What's new in 3.2 β Planetary Agents & Live State
- Planetary Agents Integration: End-to-end telemetry and integration with
agents.alchm.kitchen. Unified agent profiles featuring live natal chart overlays, viewerβagent synastry, and consciousness sigils. Agents actively publish weekly menus and share activities (chat, recipe generation) directly into the publicfeed_eventsvia authenticated internal bridges. - Cosmic Recipe Generation Offload: Full decoupling of LLM-generated recipes to the PA Python backend via a first-class
/api/generate-recipeendpoint, ensuring strictly structured JSON responses via the sharedCosmicRecipeschema. - SpacetimeDB v4 Live Layer: Complete websocket-driven synchronization for meal plans, commensal lobbies, and grocery carts. Fallbacks gracefully if the connection drops.
- Elemental Signatures: Introduced adaptive co-dominant framing ("leans water & earth" or "balanced") across the entire display layer, replacing the inconsistent single-dominant element reduction.
- Automated Image Generation: Scripts powered by Cloudflare Workers AI SDXL pipeline to backfill and regenerate beautiful dish and ingredient images to R2 storage.
What's new in 3.1 β MCP release
- MCP server: a Bun-powered Model Context Protocol tool surface β connect Claude Desktop / Cursor / Cline, mint a per-user API key at
/profile/api-keys, and buy ESMS top-ups via Stripe. Tier-aware per-key rate limiting + full telemetry. - Operational admin console at
/admin: per-flow system status, live activity stream, onboarding funnel watch, today's highlights, and API-route health β all from existing signals, each panel degrading independently. Hourly health snapshots + Slack/email/DB alerting, plus 5 synthetic probes. - Tracked, auto-applied migrations: a
_migrationstable +scripts/migrate.tsrun on every Railway deploy, closing the schema-drift gap that caused prior signup/dashboard outages. - Production-readiness hardening: PgBouncer transaction-mode compatibility (ADR-007), internal-URL centralization (
src/lib/serviceUrls.ts), and DB/calc/security guards. - Calc observability: a
degradedflag surfaces silent astronomy fallbacks and degenerate calculations on/quantitiesinstead of letting them masquerade as live data.
See CHANGELOG.md for the full 3.1 detail.
What's new in 3.0 β The Modern Alchemist
- New navigation IA: 5-slot primary nav (Kitchen / Discover / Plan / Commensal / Lab) with mega-menus and βK Command Palette
- New auth flows: AuthHandshake 6-step checklist, WelcomeBack, two-tier UpgradeGate, device session management
- Dark alchm chrome: all app-surface pages now live inside the
(alchm)route group with the dark#07060Bshell - MenuPlannerContext split: 2182-line monolith β 5 focused modules in
src/contexts/menu-planner/ - Onboarding skip: "Skip for now" CTA with
?prompt=natalsoft-prompt banner - Vercel Analytics funnel events: CommandPalette, UpgradeGate, AuthHandshake tracked
- Production bug fix:
_aspectsarray no longer contaminates planet positions dict (three-layer defense)
See CHANGELOG.md for the full history.
Tech stack
| Layer | Technology |
|---|---|
| Frontend | Next.js 15 (App Router), React 19, Tailwind CSS, Framer Motion |
| Toolchain | Bun 1.3.13 (package manager + runtime) |
| Backend | Python FastAPI + pyswisseph (Swiss Ephemeris) on Railway |
| Database | PostgreSQL on Railway (internal: postgres.railway.internal) |
| Auth | NextAuth.js v5 (Auth.js) β Google OAuth, JWT, device sessions |
| Payments | Stripe Checkout + Connect (card, stablecoins, ESMS reserve settlement) |
| Resend | |
| Analytics | Vercel Analytics + OpenTelemetry |
| Frontend hosting | Vercel (alchm-kitchen-pro project) |
| Backend hosting | Railway |
Quick start
Requirement: Bun 1.3.13+. Never use
npmoryarnin this repo.
# 1. Clone
git clone https://github.com/gregcastro23/WhatToEatNext.git
cd WhatToEatNext
# 2. Install (fast β Bun lockfile committed)
bun install
# 3. Copy env template and fill in values
cp .env.example .env.local
# 4. Start dev server
bun run dev
# β http://localhost:3000
# 5. Run tests
bun run test
# 6. Build for production (must pass before every PR)
bun run build
# 7. Lint (must be zero warnings)
bun run lint
Project structure
src/
βββ app/ # Next.js App Router pages
β βββ (alchm)/ # Dark-shell app pages (auth-gated)
β β βββ layout.tsx # Dark #07060B chrome, hides public header
β β βββ page.tsx # Home feed (/)
β β βββ lab/ # /lab β Alchemical Laboratory
β β βββ ingredients/[id]/ # /ingredients/:id β ingredient detail
β β βββ profile/ # /profile/* β all profile sub-pages
β β βββ commensal/ # /commensal β group recommendations
β β βββ feed/ # /feed β activity feed
β β βββ birth-chart/ # /birth-chart
β β βββ current-chart/ # /current-chart
β β βββ recipe-generator/ # /recipe-generator
β β βββ planetary-chart/ # /planetary-chart
β β βββ restaurant-creator/ # /restaurant-creator
β β βββ cosmic-recipe/ # /cosmic-recipe
β β βββ generated-recipe/ # /generated-recipe + /generated-recipe/[id]
β β βββ food-tracking/ # /food-tracking
β βββ api/ # API route handlers
β βββ login/ # /login (chromeless)
β βββ upgrade/ # /upgrade (chromeless)
β βββ onboarding/ # /onboarding (chromeless)
β βββ auth/ # /auth/* β NextAuth callbacks + establishing
β βββ premium/ # /premium β marketing pricing page
β βββ layout.tsx # Root layout: RedesignedHeader + AppChrome
β
βββ components/
β βββ nav/
β β βββ AppChrome.tsx # AppChromeFooter + AppChromeTabBar gates
β β βββ CommandPalette.tsx # βK global palette
β β βββ RedesignedHeader.tsx # 5-slot primary nav with mega-menus
β β βββ MobileGlassTabBar.tsx
β β βββ RedesignedFooter.tsx
β βββ auth/
β βββ AuthFollowups.tsx # AuthHandshake, WelcomeBack, UpgradeGate, AccountSessions
β
βββ config/
β βββ navigation.ts # NAV_IA β single source of truth for all nav surfaces
β
βββ contexts/
β βββ MenuPlannerContext.tsx # Barrel re-export (28 lines)
β βββ menu-planner/ # Split modules
β βββ types.ts # All interfaces (244 lines)
β βββ useMealSlots.ts # Slot CRUD hook (498 lines)
β βββ useWeekNavigation.ts # Week cursor hook (65 lines)
β βββ MenuPlannerProvider.tsx # Composes above (1280 lines)
β
βββ lib/
β βββ auth/
β β βββ auth.ts # NextAuth v5 full config (Node.js runtime)
β β βββ auth.config.ts # Edge-safe auth config (middleware)
β βββ validation/
β β βββ railway.ts # Zod schemas for Railway API responses
β βββ rateLimit.ts # Sliding-window rate limiter
β
βββ services/
β βββ subscriptionService.ts # Tier management, feature gates
β βββ TokenEconomyService.ts # Spirit/Essence/Matter/Substance economy
β βββ HistoricalStatsService.ts
β βββ ...
β
βββ types/
β βββ subscription.ts # TIER_LIMITS, SubscriptionTier
β βββ next-auth.d.ts # JWT augmentation (sessionId, deviceSessionId)
β
βββ database/
βββ init/ # SQL migrations (01 β 54)
βββ 33-device-sessions.sql
Environment variables
Copy .env.example to .env.local and fill in values. All secrets are in Vercel (frontend) and Railway (backend).
# Database (Railway internal β used in production, not local dev)
DATABASE_URL=postgresql://postgres:<pw>@postgres.railway.internal:5432/railway
# Auth
AUTH_SECRET=<32-char-random>
AUTH_GOOGLE_ID=<google-oauth-client-id>
AUTH_GOOGLE_SECRET=<google-oauth-client-secret>
AUTH_ADMIN_EMAIL=<your-email>
AUTH_URL=https://alchm.kitchen # production
AUTH_TRUST_HOST=true
# APIs
API_BASE_URL=https://whattoeatnext-production.up.railway.app
NEXT_PUBLIC_BACKEND_URL=https://whattoeatnext-production.up.railway.app
INTERNAL_API_SECRET=<shared-secret-with-fastapi>
GALILEO_API_KEY=<galileo-key>
# Payments & Email
STRIPE_SECRET_KEY=sk_live_...
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_...
RESEND_API_KEY=re_...
SpacetimeDB live layer (v4.0, optional)
The spacetime-module/ Rust module owns the live culinary catalog plus
per-user real-time state (meal plans, grocery carts, feed events, commensal
sessions). The frontend connects through SpacetimeProvider
(src/contexts/SpacetimeContext.tsx) only when NEXT_PUBLIC_SPACETIME_URI
is set; five NEXT_PUBLIC_SPACETIME_LIVE_* flags gate each consumer surface
(see .env.example). Every surface falls back silently to its legacy
localStorage/REST path when the flag is off or the connection drops. Seed the
culinary catalog with bun scripts/spacetime/seedCulinary.ts; regenerate TS
bindings after module changes with
spacetime generate --lang typescript --module-path spacetime-module --out-dir src/lib/spacetime/generated.
Key architecture decisions
See docs/adr/ for full Architecture Decision Records.
| ADR | Decision |
|---|---|
| ADR-001 | 5-slot primary nav IA |
| ADR-002 | Two-tier pricing (Apprentice / Alchemist) |
| ADR-003 | Token economy as the primary AI throttle |
| ADR-004 | Device sessions via DB + JWT jti |
| ADR-005 | Denormalized read_model JSONB for sub-100ms recipe loads |
| ADR-008 | SpacetimeDB live-state layer (flag-gated, silent legacy fallback) |
Deployment
Frontend (Vercel)
Automatic on merge to master. Project: alchm-kitchen-pro, team: cookingwithcastro-llc.
# Manual deploy (if needed)
vercel --prod
Backend (Railway)
Auto-deploys from master if Railway is connected. Manual:
cd backend
railway login
railway up
Database migrations
Migrations live in database/init/. Apply in sequence (01 β 54). Railway runs them on first boot via the db_init.py script.
Scripts
bun run dev # Start dev server (localhost:3000)
bun run build # Production build (must pass before PR)
bun run lint # ESLint (must be zero warnings)
bun run typecheck # TypeScript typecheck
bun run test # Jest unit tests
bun run storybook # Component dev (dev only, excluded from prod build)
Contributing
See CONTRIBUTING.md. Branch off master; never target main (stale). Always use Bun.
License
MIT β see LICENSE.
alchm.kitchen π
Install
Add alchm kitchen to your client. Pick the one you use.
claude mcp add mcp-server -- npx -y @alchm/mcp-servercodex mcp add mcp-server -- npx -y @alchm/mcp-serveramp mcp add mcp-server -- npx -y @alchm/mcp-server{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@alchm/mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@alchm/mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"mcp-server","command":"npx","args":["-y","@alchm/mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@alchm/mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@alchm/mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"mcp-server": {
"command": "npx",
"args": [
"-y",
"@alchm/mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@alchm/mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"@alchm/mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @alchm/mcp-serverRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance19/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 0 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 1.1.1Latest | May 29, 2026 |