{"_id":"@astrologybazi/mcp-server","name":"@astrologybazi/mcp-server","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@astrologybazi/mcp-server","version":"0.1.0","description":"MCP server for AstrologyBazi — Chinese astrology, BaZi readings, and decision-fortune reports as agent-callable tools.","type":"module","bin":{"astrologybazi-mcp":"build/index.js"},"scripts":{"build":"tsc && chmod 755 build/index.js","dev":"tsc --watch","start":"node build/index.js","preflight":"npm audit --audit-level=moderate && npm audit signatures && npm pack --dry-run","prepublishOnly":"npm run build && npm run preflight"},"keywords":["mcp","model-context-protocol","astrology","bazi","chinese-astrology","fortune","claude","ai-agent"],"author":{"name":"Sparksverse","email":"support@astrologybazi.com","url":"Sisi & TH"},"license":"MIT","homepage":"https://github.com/sparksverse/astrologybazi-mcp#readme","repository":{"type":"git","url":"git+https://github.com/sparksverse/astrologybazi-mcp.git"},"bugs":{"url":"https://github.com/sparksverse/astrologybazi-mcp/issues"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.4","zod":"^3.23.8"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2"},"engines":{"node":">=18"},"_id":"@astrologybazi/mcp-server@0.1.0","gitHead":"e30dcd202d94ab725356980582853768aac93cea","_nodeVersion":"22.19.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-75Y/EiP6QN529R0d6Tako+zsjE4k2xeS3+3SNfYSXtFVB+7o591yE0X64+HuFdOLoXUAOYi/m5loWGIVifL2vQ==","shasum":"2f02cd408c9fd38ba5ae9834e74e650390f89330","tarball":"https://registry.npmjs.org/@astrologybazi/mcp-server/-/mcp-server-0.1.0.tgz","fileCount":4,"unpackedSize":23795,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDA+JKwELk0U7tWNesXHf/JWpOTdynEfWSsZRTZri+OqQIhAN5UTeFI10iWnY8o6rOVywBYQH+aXeVybO7HHAqvNntx"}]},"_npmUser":{"name":"sparksverse","email":"sparksverse2025@gmail.com"},"directories":{},"maintainers":[{"name":"sparksverse","email":"sparksverse2025@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp-server_0.1.0_1780049065701_0.11474795482779676"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-29T10:04:25.547Z","0.1.0":"2026-05-29T10:04:25.871Z","modified":"2026-05-29T10:04:26.078Z"},"maintainers":[{"name":"sparksverse","email":"sparksverse2025@gmail.com"}],"description":"MCP server for AstrologyBazi — Chinese astrology, BaZi readings, and decision-fortune reports as agent-callable tools.","homepage":"https://github.com/sparksverse/astrologybazi-mcp#readme","keywords":["mcp","model-context-protocol","astrology","bazi","chinese-astrology","fortune","claude","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/sparksverse/astrologybazi-mcp.git"},"author":{"name":"Sparksverse","email":"support@astrologybazi.com","url":"Sisi & TH"},"bugs":{"url":"https://github.com/sparksverse/astrologybazi-mcp/issues"},"license":"MIT","readme":"# AstrologyBazi MCP Server\n\n> The first agentic-commerce MCP server for Chinese astrology and decision-fortune reports.\n\nAn MCP server that lets AI assistants (Claude Desktop, Claude Code, any MCP-compatible client) calculate BaZi (Four Pillars of Destiny) charts, recommend products, and complete Stripe checkouts for paid fortune reports **on the user's behalf**.\n\nPowered by [AstrologyBazi.com](https://astrologybazi.com).\n\n---\n\n## What it does\n\nFive tools, full agentic-commerce flow:\n\n| Tool | Purpose |\n|---|---|\n| `list_products` | Discover 24 paid products (BaZi, Ziwei, I Ching, decision reports, feng shui…) with prices, input schemas, and use-case hints |\n| `recommend_product` | Map plain-English user intent → recommended product ID |\n| `calculate_bazi_free` | **Free** Four Pillars chart calculation — full structured data |\n| `create_paid_checkout` | Generate a Stripe-hosted payment link for any catalog product |\n| `get_report` | Poll after payment — returns inline data for BaZi-family products, delivery promise for human-expert products |\n\nPayment uses Stripe-hosted Checkout, so card data never touches this server.\n\n---\n\n## Install\n\n### Claude Desktop / Claude Code\n\nAdd to your MCP config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"astrologybazi\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@astrologybazi/mcp-server\"]\n    }\n  }\n}\n```\n\nRestart Claude. The server appears in the tools list.\n\n### Manual\n\n```bash\ngit clone https://github.com/feiyu23/fortune.git\ncd fortune/mcp-server\nnpm install\nnpm run build\nnode build/index.js\n```\n\n---\n\n## Environment variables\n\n| Variable | Default | Purpose |\n|---|---|---|\n| `ASTROLOGYBAZI_BASE_URL` | `https://astrologybazi.com` | API base. Set to a staging origin during development. |\n| `ASTROLOGYBAZI_BAZI_API_URL` | `https://sisithefox-astrologybazi-api.hf.space` | Direct HuggingFace BaZi-calculation API (used for `calculate_bazi_free`). |\n| `ASTROLOGYBAZI_HF_API_KEY` | empty | Optional. Only required if the HF endpoint enforces an API key for your client. |\n| `ASTROLOGYBAZI_AGENT_ID` | `mcp-client` | Sent as `X-Agent-Id` header. Helps us route bug reports back to your client. |\n\n---\n\n## Example session\n\n```\nUser: I'm not sure if I should leave my marriage. Born 1991-08-16, 05:54, female.\n\nClaude (using tools):\n  → recommend_product({ user_intent: \"thinking about leaving marriage\" })\n    ← love-clarity-base ($39) or love-clarity-deep ($99)\n\n  → create_paid_checkout({\n      product_id: \"love-clarity-base\",\n      birth_data: { birth_date: \"1991-08-16\", birth_time: \"05:54\", gender: \"female\" }\n    })\n    ← { payment_link: \"https://checkout.stripe.com/...\", session_id: \"cs_...\" }\n\n  → User clicks link, pays $39\n\n  → get_report({ session_id: \"cs_...\" })\n    ← { status: \"ready\", data: {...} }\n\n  Claude presents the relationship-health score, 12-month emotional cycle,\n  and best-decision-month timing from the report.\n```\n\n---\n\n## Catalog & docs\n\n- **Machine-readable catalog**: https://astrologybazi.com/.well-known/agent-products.json\n- **Agent integration docs**: https://astrologybazi.com/agent-docs\n- **Protocol version**: 1.0.0\n- **Support**: support@astrologybazi.com\n\n---\n\n## Product fulfillment types\n\nThe catalog declares one of three fulfillment modes per product:\n\n- **instant-ai** (17 products) — Generated in 20-30 seconds, retrievable immediately after payment.\n- **ai-with-delivery** (3 products) — AI-generated PDF emailed within 2-3 business days (business date selection).\n- **human-expert** (4 products) — Reviewed and delivered by a feng shui master in 3-5 business days.\n\nThe agent should communicate the expected timeline to the user before checkout.\n\n---\n\n## Privacy & data flow\n\nThis MCP server is a thin proxy. Here is exactly where data flows when a user calls it through their AI assistant:\n\n```\nUser → AI assistant → MCP server (this package, on the user's machine)\n                          ↓\n                      astrologybazi.com  (catalog discovery, checkout, report retrieval)\n                          ↓\n                      HuggingFace BaZi API   (chart math)\n                      Stripe Checkout         (hosted payment)\n```\n\n**What this server stores on the user's machine**: nothing. It is a stateless stdio process; no files written, no telemetry.\n\n**What we receive on our servers**:\n- Birth data (date, time, gender, optional name) — required to compute the chart.\n- Optional email if the user wants a Stripe receipt.\n- The Stripe checkout session and payment status.\n- An `X-Agent-Id` header (e.g. `claude-mcp`) so we can see which clients are driving usage in aggregate.\n\n**What we do NOT receive**:\n- Card details — payment runs on Stripe-hosted Checkout; card data never touches us or this server.\n- IP-level browsing data outside the specific HTTPS requests above.\n\n**Retention**: BaZi calculations are stateless on the API side (no birth-data persistence). Purchase records are kept in our Stripe + Supabase systems for tax/refund/support purposes (typical retention 7 years for financial records, as required by Australian tax law).\n\n**Right to delete / GDPR**: Email `support@astrologybazi.com` with the email used at checkout to request deletion of your purchase records. Birth data not tied to a purchase is never persisted server-side.\n\n**No training on your data**: We do not train any model on user inputs. Reports are generated per-request by deterministic / LLM-with-system-prompt pipelines on our own infrastructure.\n\n## Publishing checklist\n\nBefore `npm publish`, run:\n\n```bash\nnpm run preflight\n```\n\nThis chains the three checks every publish should pass:\n\n1. `npm audit --audit-level=moderate` — fail on known vulnerabilities.\n2. `npm audit signatures` — verify every dep has a valid registry signature (catches typosquats / replaced packages).\n3. `npm pack --dry-run` — preview the exact files that would be uploaded.\n\nThe `prepublishOnly` script runs `build` + `preflight` automatically, so even\n`npm publish` without thinking about it will refuse to upload a vulnerable\nor signature-broken tree.\n\nManually review the `npm pack --dry-run` output to confirm only intended\nfiles (`build/`, `README.md`, `package.json`) are included — never `.env`,\ninternal logs, or source code with secrets.\n\n## License\n\nMIT\n\n🦊 Built by Sisi & TH at sparksverse.com\n","readmeFilename":"README.md","_rev":"1-523de3140121feac4e92546c00a8569b"}