npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xuanxue-bazi-matching

v0.3.0

Published

MCP server exposing 7 Chinese divination APIs (BaZi matching/daily-fortune, QiMen timing, ZiWei chart, MeiHua oracle, LiuYao yijing, LiuRen daliuren) — deterministic rule engines, x402 payable on Base. Supports XUANXUE_TOOL_FILTER env for narrow tool expo

Downloads

465

Readme

xuanxue-bazi-matching

Deterministic BaZi (八字) API for AI agents. No LLM drift.

npm version License: MIT x402 compatible

Rule-based Chinese metaphysics engine — same inputs always return the same score. No token unpredictability, no hallucinated charts, no per-LLM-call cost. Pay only per API call via x402 USDC on Base.

Publisher: xuanxue.app · Contact: [email protected] · Docs: api.decodeyourming.com/docs/agents


Use Cases

  1. Matchmaking agent — feed two users' birth data, get a compatibility report with scores, five-elements balance, strengths, and actionable recommendations. Works in any Claude workflow or autonomous agent loop.
  2. Content planning — determine auspicious days for publishing, product launches, or live-stream scheduling based on the creator's BaZi day-flow.
  3. Decision timing — let an AI assistant advise on the best day to sign contracts, start projects, or make major purchases using the daily fortune luck score.

Install

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "xuanxue-bazi": {
      "command": "npx",
      "args": ["-y", "xuanxue-bazi-matching"],
      "env": {
        "XUANXUE_PAYMENT_TOKEN": "<your x402 payment token>"
      }
    }
  }
}

Any MCP client

npx -y xuanxue-bazi-matching

Set XUANXUE_PAYMENT_TOKEN to a valid x402 token, or omit to receive 402 payment challenges.


Tools

marriage_compatibility_check

BaZi (八字) compatibility between two birth charts.

Input:

{
  "person_a": {"year": 1990, "month": 5, "day": 15, "hour": 10, "gender": "male"},
  "person_b": {"year": 1993, "month": 8, "day": 22, "hour": 14, "gender": "female"}
}

Output:

{
  "score": 78,
  "elements_balance": {"wood": 0.28, "fire": 0.18, "earth": 0.22, "metal": 0.17, "water": 0.15},
  "narrative": "Strong day-pillar resonance...",
  "strengths": ["complementary elements", "shared earth anchor"],
  "challenges": ["competing fire energy"],
  "recommendations": ["schedule key decisions on water days"]
}

bazi_daily_fortune

BaZi day-flow luck analysis for a given date.

Input:

{
  "year": 1990, "month": 5, "day": 15, "hour": 10, "gender": "male",
  "query_date": "2026-04-22"
}

Output:

{
  "luck_score": 82,
  "dominant_element": "wood",
  "favorable_activities": ["negotiation", "creative work", "networking"],
  "unfavorable_activities": ["surgery", "major financial moves"],
  "timing_advice": "Morning hours amplify wood energy..."
}

Example — curl direct

# Marriage compatibility (returns 402 without token)
curl -X POST https://api.decodeyourming.com/agents/v1/bazi-matching \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <token>" \
  -d '{"person_a":{"year":1990,"month":5,"day":15,"hour":10,"gender":"male"},"person_b":{"year":1993,"month":8,"day":22,"hour":14,"gender":"female"}}'

# Daily fortune
curl -X POST https://api.decodeyourming.com/agents/v1/bazi-daily-fortune \
  -H "Content-Type: application/json" \
  -H "X-PAYMENT: <token>" \
  -d '{"year":1990,"month":5,"day":15,"hour":10,"gender":"male","query_date":"2026-04-22"}'

Pricing

| Tool | Price | |------|-------| | marriage_compatibility_check | $0.02 USDC / call | | bazi_daily_fortune | $0.005 USDC / call |

Payment via x402 protocol on Base. Address: 0xcb99bf3d45d5f8bdeb72d00792fe77dffed2c6de.
No subscription. No sign-up. Pay as you go.


FAQ

Why deterministic instead of LLM-based?
LLM responses vary per run and hallucinate chart data. BaZi is a rule-based system with precisely defined algorithms — the same birth data always produces the same pillars, ten-gods, and interactions. Deterministic = testable, auditable, and cheaper at scale.

Why x402 / USDC instead of a credit card API key?
x402 enables true pay-per-call from any agent without account creation. An autonomous agent can acquire a payment token, execute calls, and stop paying when done — no OAuth flow, no monthly minimums. No surprise overages.

How is BaZi different from Western astrology?
Western astrology maps to solar positions and broad archetypes. BaZi (Eight Characters / 八字) encodes the precise interaction between year, month, day, and hour pillars in a five-elements framework, producing day-specific energy states rather than monthly forecasts. The ruleset has ~1000 years of empirical refinement.


License

MIT · xuanxue.app · [email protected]