Skip to content

Configuration

  • Node v24.14.1 (.nvmrc)
  • pnpm@9.15.3 — pinned via packageManager; npm/yarn are not supported.
  • Docker, for local Postgres.

Loaded via envee -f .env -- in every dev and start script.

VariableRequiredDefaultDescription
DATABASE_URLPostgres connection string. Used by both Drizzle and the runtime.
PORT3000Port the Hono server listens on.

A working local value matching the bundled docker-compose.yml:

.env
DATABASE_URL=postgres://postgres:h4yuasd6@localhost:5432/local-nextjs
PORT=3000
Terminal window
docker-compose up -d

Starts a single postgres service on :5432 with database local-nextjs and credentials postgres / h4yuasd6. Then run the migrations:

Terminal window
pnpm db:migrate
pnpm db:seed # optional — loads the curated music knowledge graph
CommandWhat it does
pnpm devHot-reload dev server via tsx watch.
pnpm startOne-shot run via tsx (no build).
pnpm buildCompiles the server with tsc and builds these docs.
pnpm start:prodRuns the compiled output from dist/.
pnpm typesType-check only.
pnpm lintESLint, type-aware.
pnpm test / pnpm test:watchVitest.
pnpm format / pnpm format:checkPrettier.
pnpm checksformat:check + lint + types + test (matches CI).
pnpm docs:genRegenerate the per-tool MDX reference from Zod schemas.
pnpm docs:devRun the Starlight dev server for these docs.
pnpm docs:buildBuild the docs into public/docs/.
Terminal window
docker build -t mcp-forty-two .
docker run --rm -p 3000:3000 -e DATABASE_URL=... mcp-forty-two

The multi-stage build on node:24.14.1-alpine produces a single image that serves the landing page at /, the docs at /docs/, the MCP transport at /mcp and a health probe at /health. Runs as non-root user nodejs.

Every page under Tools is generated from the same registerTool calls the running MCP server uses — see scripts/generate-tool-docs.ts. The generator:

  1. Imports registerAllTools from src/mcp/tools/index.ts.
  2. Passes a fake McpServer shim that captures each registration: name, title, description, inputSchema, outputSchema, annotations.
  3. Converts each Zod schema to JSON Schema via zod-to-json-schema.
  4. Emits one MDX file per tool into docs-src/src/content/docs/tools/.

The generator runs as part of pnpm build. The tool MDX files are gitignored so the source of truth is always the code.