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

freebazi-mcp

v1.0.1

Published

Bazi (八字, Four Pillars of Destiny) MCP server: compute a full Chinese astrology chart with True Solar Time. Powered by the freebazi.com engine.

Readme

freebazi-mcp

A Model Context Protocol server that computes a full Chinese Bazi (八字, Four Pillars of Destiny) chart from a birth date, time, and place.

It wraps the same calculation engine that powers freebazi.com: an offline engine that corrects for True Solar Time and historical daylight saving, and is cross-validated against established Bazi libraries. No API key, no network calls, everything runs locally.

What it returns

Give it a birth moment and a city, and compute_bazi_chart returns:

  • The Four Pillars (Year, Month, Day, Hour), each as a Heavenly Stem and Earthly Branch
  • Your Day Master (日干) and the Ten Gods (十神) of every character
  • Hidden Stems (藏干), Na Yin (纳音), and the Twelve Growth Stages (十二长生)
  • Five Elements distribution, both visible and including hidden stems
  • Shen Sha (神煞) and branch relations (合冲刑害)
  • Luck Pillars (大运) with the current period flagged, and the current year's pillar
  • A link to the full interactive chart on freebazi.com

Install

Requires Node.js 18+.

Run directly with npx:

npx freebazi-mcp

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "freebazi": {
      "command": "npx",
      "args": ["-y", "freebazi-mcp"]
    }
  }
}

Other MCP clients (Cline, Continue, Cursor, etc.) take the same command / args.

Tools

compute_bazi_chart

Compute a full chart.

| Argument | Type | Notes | |---|---|---| | year, month, day | number | Birth date | | hour, minute | number | Local clock time as recorded (omit if timeUnknown) | | gender | "male" | "female" | Needed for luck-pillar direction | | city | string | e.g. "Taipei", "New York". Resolved to longitude + time zone for True Solar Time | | longitude, utcOffset | number | Alternative to city | | timeUnknown | boolean | Hour pillar becomes tentative | | trueSolarTime | boolean | Default true | | dayRule | "zi23" | "midnight" | Day boundary, default 23:00 | | yearRule | "lichun" | "cny" | Year boundary, default Li Chun |

search_cities

Search about 490 major world cities by English or Chinese name. Returns each match's country, longitude, and IANA time zone, so you can pass an exact city to compute_bazi_chart.

Example

Compute the Bazi chart for someone born 15 June 1990, 9:30 AM, in New York.

The server resolves New York, applies True Solar Time (9:30 AM becomes 8:34 AM, 56 minutes earlier, which shifts the Hour pillar), and returns the four pillars 庚午 壬午 辛亥 壬辰 with a Xin (辛) yin Metal Day Master, all Ten Gods, elements, luck pillars, and more.

Accuracy and honesty

Solar-term boundaries are computed from the sun's apparent longitude with standard astronomical formulas, and time zones (including historical daylight saving) are resolved from the IANA database. The engine's four pillars match established libraries character for character across thousands of test charts.

Bazi is a traditional framework for reflection on temperament, tendencies, and timing. This tool describes a chart; it does not predict events.

Links

Credits

City data from GeoNames (CC BY 4.0). Simplified to Traditional conversion via OpenCC.

License

MIT