{"_id":"@alchm/mcp-server","_rev":"3-9cfc3dc60bb09ab7236e0092cce5ceed","name":"@alchm/mcp-server","dist-tags":{"latest":"1.1.2"},"versions":{"1.1.0":{"name":"@alchm/mcp-server","version":"1.1.0","keywords":["mcp","model-context-protocol","alchemy","astrology","food","recipes","planetary","esms"],"author":{"name":"gregcastro23"},"license":"MIT","_id":"@alchm/mcp-server@1.1.0","maintainers":[{"name":"g.castro23","email":"g.castro23@icloud.com"}],"homepage":"https://alchm.kitchen/docs/mcp","bugs":{"url":"https://github.com/gregcastro23/WhatToEatNext/issues"},"bin":{"alchm-mcp-server":"dist/index.js"},"dist":{"shasum":"99eab384437462666038962c36e468fd74454470","tarball":"https://registry.npmjs.org/@alchm/mcp-server/-/mcp-server-1.1.0.tgz","fileCount":3,"integrity":"sha512-1zY9wLZpShcwTWHOmTjbfpyLEloqwnND4FjqnFYfDHmCrpgPnG45k5JiFrMiZOXtqmBHP96j1Lq8YtRTNEt/vw==","signatures":[{"sig":"MEQCIFEXadtJiqtj8AnoAqkqHj7qcwRybWv3bZEFM+CvVDSXAiBSxExkwhUZBgpDnp1xDDLRUF3VXa5eXhJoiF6C+P1lCA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11025994},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"dcf551fb4e3d389380b605b3579fc9570d45ef98","scripts":{"build":"bun build src/index.ts --outfile dist/index.js --bundle --target node --external pg","start":"bun run src/index.ts","prepublishOnly":"bun run build"},"_npmUser":{"name":"g.castro23","email":"g.castro23@icloud.com"},"repository":{"url":"git+https://github.com/gregcastro23/WhatToEatNext.git","type":"git","directory":"mcp-server"},"_npmVersion":"11.12.1","description":"Alchm.kitchen MCP server — live planetary transits, ingredient ESMS analysis, cosmic recipe search, synastry overlays, and transit×natal overlays.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-server_1.1.0_1780089593408_0.4953462183614197","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@alchm/mcp-server","version":"1.1.1","keywords":["mcp","model-context-protocol","alchemy","astrology","food","recipes","planetary","esms"],"author":{"name":"gregcastro23"},"license":"MIT","_id":"@alchm/mcp-server@1.1.1","maintainers":[{"name":"g.castro23","email":"g.castro23@icloud.com"}],"homepage":"https://alchm.kitchen/docs/mcp","bugs":{"url":"https://github.com/gregcastro23/WhatToEatNext/issues"},"bin":{"alchm-mcp-server":"dist/index.js"},"dist":{"shasum":"c347d6dde9394e5a54f5eeaff858f4ca45f8ed61","tarball":"https://registry.npmjs.org/@alchm/mcp-server/-/mcp-server-1.1.1.tgz","fileCount":3,"integrity":"sha512-aG3UkKsuqUy6HRgZUS1JRn8OIoo+Wttz+C3lhg0oHaK75ggxSq5X4xres4j+CD+EsGRvnMRRIvj1dqd3nC3sjQ==","signatures":[{"sig":"MEQCIF6i3Gqrmq2PFoNs6qv7aeZo9I9MN6she0NC/TngWvdxAiAUUCeuRXrQ71Bnr9k8e6BXE9VDlzgOZoVcKT0m0atHaw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11026047},"main":"dist/index.js","type":"module","engines":{"node":">=18.0.0"},"gitHead":"946bd5ef04053dd898fc7c8d802868caa0856c2d","mcpName":"io.github.gregcastro23/alchm-kitchen","scripts":{"build":"bun build src/index.ts --outfile dist/index.js --bundle --target node --external pg","start":"bun run src/index.ts","prepublishOnly":"bun run build"},"_npmUser":{"name":"g.castro23","email":"g.castro23@icloud.com"},"repository":{"url":"git+https://github.com/gregcastro23/WhatToEatNext.git","type":"git","directory":"mcp-server"},"_npmVersion":"11.12.1","description":"Alchm.kitchen MCP server — live planetary transits, ingredient ESMS analysis, cosmic recipe search, synastry overlays, and transit×natal overlays.","directories":{},"_nodeVersion":"26.0.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp-server_1.1.1_1780090814621_0.21739637551528124","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@alchm/mcp-server","version":"1.1.2","mcpName":"io.github.gregcastro23/alchm-kitchen","description":"Alchm.kitchen MCP server — live planetary transits, ingredient ESMS analysis, cosmic recipe search, synastry overlays, and transit×natal overlays.","type":"module","main":"dist/index.js","bin":{"alchm-mcp-server":"dist/index.js"},"scripts":{"build":"bun build src/index.ts --outfile dist/index.js --bundle --target node --external pg","start":"bun run src/index.ts","prepublishOnly":"bun run build"},"keywords":["mcp","model-context-protocol","alchemy","astrology","food","recipes","planetary","esms"],"author":{"name":"gregcastro23"},"license":"MIT","homepage":"https://alchm.kitchen/docs/mcp","repository":{"type":"git","url":"git+https://github.com/gregcastro23/WhatToEatNext.git","directory":"mcp-server"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.1","pg":"^8.20.0"},"gitHead":"e27f9b755fd21bdb0c258770e6529bd713f00af1","_id":"@alchm/mcp-server@1.1.2","bugs":{"url":"https://github.com/gregcastro23/WhatToEatNext/issues"},"_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-YrdJP31thU5S6Q6Wp0TwzeMyujt1HC1u9Z5unTS/InDv80OZAQ4CPjSdYdbTG4+L+b9QVNOEG6McTqmDS1XQ2g==","shasum":"75fa3b352c8b845e68cd2f776179a15cd3d8adb1","tarball":"https://registry.npmjs.org/@alchm/mcp-server/-/mcp-server-1.1.2.tgz","fileCount":3,"unpackedSize":11026423,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIF3xqlE3MfWnSAfXFft1qa/yv/xjBVFAqjO31o2NQocJAiA4pJjUVJotdTH8QCCmfnxfq7Bqq+RDH4FByuYlycIaVg=="}]},"_npmUser":{"name":"g.castro23","email":"g.castro23@icloud.com"},"directories":{},"maintainers":[{"name":"g.castro23","email":"g.castro23@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_1.1.2_1780102365399_0.38548442823704665"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T21:19:53.274Z","modified":"2026-05-30T00:52:45.720Z","1.1.0":"2026-05-29T21:19:53.651Z","1.1.1":"2026-05-29T21:40:14.870Z","1.1.2":"2026-05-30T00:52:45.583Z"},"bugs":{"url":"https://github.com/gregcastro23/WhatToEatNext/issues"},"author":{"name":"gregcastro23"},"license":"MIT","homepage":"https://alchm.kitchen/docs/mcp","keywords":["mcp","model-context-protocol","alchemy","astrology","food","recipes","planetary","esms"],"repository":{"type":"git","url":"git+https://github.com/gregcastro23/WhatToEatNext.git","directory":"mcp-server"},"description":"Alchm.kitchen MCP server — live planetary transits, ingredient ESMS analysis, cosmic recipe search, synastry overlays, and transit×natal overlays.","maintainers":[{"name":"g.castro23","email":"g.castro23@icloud.com"}],"readme":"# Alchm.kitchen MCP Server\n\n[![Listed on MCP Registry](https://img.shields.io/badge/MCP_Registry-io.github.gregcastro23%2Falchm--kitchen-blueviolet)](https://registry.modelcontextprotocol.io/servers/io.github.gregcastro23/alchm-kitchen)\n[![npm](https://img.shields.io/npm/v/@alchm/mcp-server)](https://www.npmjs.com/package/@alchm/mcp-server)\n\nAn [MCP server](https://modelcontextprotocol.io) exposing five alchemical tools — live sky transits, ingredient ESMS analysis, cosmic recipe discovery, synastry overlays, and transit×natal overlays — to any LLM client that speaks MCP (Claude Desktop, Cursor, Google Antigravity, Claude Agent SDK, etc.).\n\n## Install\n\n```bash\n# Bun (recommended)\nbunx @alchm/mcp-server\n\n# Node / npx\nnpx -y @alchm/mcp-server\n```\n\nOr install globally:\n\n```bash\nbun add -g @alchm/mcp-server\nalchm-mcp-server\n```\n\n## Tools\n\n| Tool | Cost | Description |\n| --- | --- | --- |\n| `get_live_sky_transits` | Free | Current planetary positions + elemental balance for any coordinate. |\n| `alchemize_ingredients` | Free | Spirit / Essence / Matter / Substance scores + thermodynamic indices for a list of ingredients. |\n| `generate_cosmic_recipe` | 7.5 of each ESMS (30 total) | Search the 579-recipe catalog by element, cuisine, dietary needs. |\n| `compute_synastry_overlay` | Free | Inter-aspect ledger between two natal charts — tension / harmony / intensification scores + a recommended stance. |\n| `get_transit_natal_overlay` | Free | Live sky × one agent's natal chart — which transiting planets activate which natal points, with continuous boost magnitude. |\n\n`generate_cosmic_recipe` debits tokens only when called with a valid `_meta.apiKey`. Anonymous callers receive a `QUOTA` error rather than a free recipe. The other four tools are free.\n\n## Mint an API key\n\nEnd users mint, list, and revoke their own keys at [`/profile/api-keys`](https://alchm.kitchen/profile/api-keys). The plaintext is shown exactly once — paste it into the MCP client config immediately. The public onboarding doc lives at [`/docs/mcp`](https://alchm.kitchen/docs/mcp).\n\nKeys are stored as `sha256(plaintext)` in the `api_keys` table; the only place the plaintext ever appears is the `POST /api/account/api-keys` response body.\n\n## Run from source\n\n```bash\nbun run mcp-server/src/index.ts\n```\n\nOptional env:\n\n```bash\nDATABASE_URL=postgres://...           # enables token gate + invocation telemetry\nMCP_USER_API_KEY=sk_alchm_...         # single-user setups (Claude Desktop)\nINTERNAL_API_SECRET=...               # synthetic-probe exempt path (set by Vercel cron)\nSYNTHETIC_PROBE_USER_ID=<uuid>        # attribute synthetic-probe invocations to this user\n```\n\nWhen `DATABASE_URL` is absent the server still runs — all calls become anonymous, the token gate skips, and invocations are not logged.\n\n## Per-call auth\n\nEvery tool accepts an optional `_meta` field on its arguments:\n\n```json\n{\n  \"name\": \"generate_cosmic_recipe\",\n  \"arguments\": {\n    \"prompt\": \"spicy\",\n    \"cuisine\": \"thai\",\n    \"_meta\": {\n      \"apiKey\": \"sk_alchm_live_xxx\",\n      \"caller\": \"claude-desktop\"\n    }\n  }\n}\n```\n\n- `_meta.apiKey` resolves to an `api_keys` row → bound user → ESMS debit happens against that user's balance.\n- `_meta.caller` is a free-form identifier (e.g. `\"claude-desktop\"`, `\"cursor\"`, `\"pa-mcp\"`) persisted on the invocation row.\n\nIf `MCP_USER_API_KEY` is set in the environment, it is used as the default `apiKey` for every call — convenient for single-user installs.\n\n## Connecting Claude Desktop\n\nAdd to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or the equivalent on your platform:\n\n```json\n{\n  \"mcpServers\": {\n    \"alchm-kitchen\": {\n      \"command\": \"bun\",\n      \"args\": [\n        \"run\",\n        \"/absolute/path/to/WhatToEatNext-master/mcp-server/src/index.ts\"\n      ],\n      \"env\": {\n        \"DATABASE_URL\": \"postgres://...\",\n        \"MCP_USER_API_KEY\": \"sk_alchm_live_xxx\"\n      }\n    }\n  }\n}\n```\n\nSee `claude-desktop.config.example.json` in this directory for a copy-paste template.\n\n## Connecting Cursor\n\nAdd to `~/.cursor/mcp.json` or the project's `.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"alchm-kitchen\": {\n      \"command\": \"bun\",\n      \"args\": [\"run\", \"/absolute/path/to/WhatToEatNext-master/mcp-server/src/index.ts\"],\n      \"env\": {\n        \"MCP_USER_API_KEY\": \"sk_alchm_live_xxx\"\n      }\n    }\n  }\n}\n```\n\n## Telemetry & Operations\n\nEvery successful or failed tool call writes a row to `mcp_invocations` (Postgres). Surfaces:\n\n- **Admin dashboard** — `/admin` System Status panel now includes an `MCP Tool Surface` flow showing call rate, error rate, p95 latency, and the synthetic probe verdict.\n- **Agent Telemetry** — `mcpInvocationRate` joins `transmutationRate`, `spiritualEntropy`, and `agentHarmony` as a live metric on the High Alchemist dashboard.\n- **Synthetic probe** — `/api/cron/synthetic-mcp` exercises the tool layer every 30 minutes; failures downgrade the dashboard verdict to `INCIDENT` even with zero organic MCP traffic.\n\n## Testing\n\n- `bun test src/lib/mcp/__tests__/tools.test.ts` — unit tests for the tool handlers + auth gate.\n- `MCP_E2E=1 bun test mcp-server/src/__tests__/stdio.test.ts` — spawns the actual server and verifies the JSON-RPC handshake + `tools/list` + a `tools/call` round-trip.\n\n## Architecture\n\nSee [`ARCHITECTURE.md`](./ARCHITECTURE.md) for the two-server topology (Alchm MCP + PA MCP) and the cross-server bridge that lets PA personas ground their responses in live alchm.kitchen state.\n","readmeFilename":"README.md"}