Configuration
Requirements
Section titled “Requirements”- Node
v24.14.1(.nvmrc) pnpm@9.15.3— pinned viapackageManager; npm/yarn are not supported.- Docker, for local Postgres.
Environment variables
Section titled “Environment variables”Loaded via envee -f .env -- in every dev and start script.
| Variable | Required | Default | Description |
|---|---|---|---|
DATABASE_URL | ✓ | — | Postgres connection string. Used by both Drizzle and the runtime. |
PORT | 3000 | Port the Hono server listens on. |
A working local value matching the bundled docker-compose.yml:
DATABASE_URL=postgres://postgres:h4yuasd6@localhost:5432/local-nextjsPORT=3000Local Postgres
Section titled “Local Postgres”docker-compose up -dStarts a single postgres service on :5432 with database local-nextjs and credentials postgres / h4yuasd6. Then run the migrations:
pnpm db:migratepnpm db:seed # optional — loads the curated music knowledge graphScripts
Section titled “Scripts”| Command | What it does |
|---|---|
pnpm dev | Hot-reload dev server via tsx watch. |
pnpm start | One-shot run via tsx (no build). |
pnpm build | Compiles the server with tsc and builds these docs. |
pnpm start:prod | Runs the compiled output from dist/. |
pnpm types | Type-check only. |
pnpm lint | ESLint, type-aware. |
pnpm test / pnpm test:watch | Vitest. |
pnpm format / pnpm format:check | Prettier. |
pnpm checks | format:check + lint + types + test (matches CI). |
pnpm docs:gen | Regenerate the per-tool MDX reference from Zod schemas. |
pnpm docs:dev | Run the Starlight dev server for these docs. |
pnpm docs:build | Build the docs into public/docs/. |
Docker
Section titled “Docker”docker build -t mcp-forty-two .docker run --rm -p 3000:3000 -e DATABASE_URL=... mcp-forty-twoThe 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.
How the docs reference stays in sync
Section titled “How the docs reference stays in sync”Every page under Tools is generated from the same registerTool calls the running MCP server uses — see scripts/generate-tool-docs.ts. The generator:
- Imports
registerAllToolsfromsrc/mcp/tools/index.ts. - Passes a fake
McpServershim that captures each registration:name,title,description,inputSchema,outputSchema,annotations. - Converts each Zod schema to JSON Schema via
zod-to-json-schema. - 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.