Skip to main content
Glama

Vedaksha — 来自吠陀的洞见

为智能体AI时代打造的洁净室 Rust 星历表与吠陀占星引擎。 亚角秒级行星精度,每个算法都可追溯到主要来源,任何星盘都可作为属性图查询。

crates.io docs.rs PyPI npm CI MSRV License

网站 · 文档 · 游乐场 · API 参考 · 博客

clean-room · 0.103″ vs JPL Horizons · 1,069 tests + 24,350 oracle rows · MCP-native · BUSL-1.1 → Apache 2.0

安装 · 快速开始 · 精度 · 内含内容 · MCP + 属性图 · 来源 · 许可证


安装

平台

安装

备注

Rust

cargo add vedaksha

完整流水线

Python

pip install vedaksha

通过 WebAssembly 引擎,py3-none-any,Python ≥ 3.9 — 无需 Rust 工具链

WASM

npm install vedaksha-wasm

浏览器与边缘,无数据文件

MCP

cargo install vedaksha-mcp

stdio + HTTP(bearer 认证)

Docker

docker run -e VEDAKSHA_MCP_TOKEN=… -p 3100:3100 ghcr.io/arthiqlabs/vedaksha-mcp

多架构(amd64 + arm64)

从亚角秒级星历表(VSOP87A、ELP/MPP02、JPL DE440s/DE441)计算 janam kundali(本命盘)、panchanga、dashas、nakshatras、vargas、shadbala、ashtakavarga、muhurta 和 transits/gochara。

flowchart LR
  K["JPL DE440s / DE441<br/>SPK kernel, ~31 MB"] --> E
  V["VSOP87A + ELP/MPP02<br/>compiled to constants,<br/>no data files"] --> E
  E["Ephemeris core<br/>precession · nutation<br/>light-time · ΔT"] --> W["Western<br/>houses · aspects<br/>dignities"]
  E --> J["Jyotish<br/>nakshatras · dashas · vargas<br/>panchanga · shadbala · muhurta"]
  W --> C["ComputedChart"]
  J --> C
  C --> G["Property graph<br/>Cypher · SurrealQL<br/>JSON-LD · RAG text"]
  C --> M["MCP server<br/>17 tools · stdio + HTTP"]
  C --> S["Rust · Python · WASM"]

Related MCP server: Precision astronomical ephemeris and planetary positions via the Swiss Ephemeris.

快速开始

from vedaksha import Vedaksha

vk = Vedaksha()
chart = vk.natal_chart(julian_day=2451545.0, latitude=28.6139, longitude=77.2090)
cargo install vedaksha-mcp && vedaksha-mcp     # stdio: Claude Desktop, Cursor, VS Code

Rust 路径是 crates/vedaksha/src/lib.rs 中的编译 doctest。

公共接口上的每个儒略日都是 UT1,既不是 TT 也不是 TDB。引擎在内部转换为 TT 以用于动力学项,并使用 UT1 进行地球自转,这修正了上升点、天顶和所有十二个宫位。传入 TDB 儒略日会加上 ΔT 的旋转量而不是减去——以今天的 ΔT ≈ 69 秒计算,每个宫位会偏差 0.289°(17.3′)。唯一的例外是原始 SPK 查询(state_vector),它直接索引内核并接受 TDB。

精度

每个数字都由一个命名测试打印。使用 bash scripts/download_de440s.sh 重现星历表,然后运行 cargo test -p vedaksha-ephem-core --release -- --include-ignored --nocapture;岁差数字来自 cargo test -p vedaksha-astro sidereal,与相同主要来源的独立 Python 推导的交叉验证来自 cargo test -p vedaksha-astro --test ayanamsha_fixture。

SpkReader 对比 JPL Horizons(DE441) — oracle_comparison.rs,24,350 行已提交数据(10 个天体 × 2,435 个日期,1900–2100 年)。Horizons 提供 DE441,因此这衡量了我们的 DE440s 流水线与独立内核的对比。

时期

比较次数

平均值

最大值

1900–2025(ΔT 已测量)

15,350

0.103″

1.187″(天王星)

1900–2100(全部)

24,350

0.878″

44.912″(月球,2099)

2026 年之前的 15,350 次比较中有 15,349 次低于角秒。2025 年之后的残差是 ΔT 预测问题,而非星历表误差: 我们的 Espenak–Meeus 外推与 Horizons 的 ΔT 在 2099 年相差约 68 秒,误差随天体的角速度缩放——月球(0.64″/s)产生约 45″,冥王星几乎没有。在 2099-02-06,五个角速度在 0.03–0.64″/s 之间的天体都暗示相同的 66–71 秒偏移,这是时钟差异的特征,而非位置误差。

AnalyticalProvider 对比 JPL Horizons — analytical_oracle.rs,1900–2025 年:总体平均值 0.239″,最坏情况 1.896″(海王星),月球通过 ELP/MPP02 平均 0.169″。每个天体在 2,435 个日期上密集采样。

直到 2026-08-20,这些数字是平均值 2.06″ 和最坏情况 24.22″,本 README 将差距归因于 VSOP87A 是截断理论。那是错误的,措辞掩盖了我们自己的缺陷:分析提供者用 VSOP87A 的地心级数回答 EarthMoonBarycenter,导致观测者偏离 4,671 公里,而 earth_state 将质心相对月球除以 1 + EMRAT 而不是 EMRAT,又偏差 56.8 公里。两者都已修复。第二个问题也影响了 SPK 路径,从 0.106″ 变为 0.103″。

ELP/MPP02 月球 — lunar_horizons.rs:J2000 处 0.015″,1500–2500 年间为 0.020–0.053″。

未测量的内容

  • 宫位宫头未与任何外部参考进行验证。

  • 没有一种岁差系统与其他实现进行验证,这是有意为之。 所有十一种都是从主要来源向前推导的——章节、委员会、提案者的论文或星表——每种都将其锚点重现到 1e-9°,并在其主要来源记录的情况下重现其零年。不声称与任何其他人的数字一致:与它们比较将违背此重新推导旨在消除的逆向工程。参见 docs/audit/2026-08-17-ayanamsha-cleanroom/。

  • Dasha 和 nakshatra 测试是不变性测试,而非外部比较:它们验证 BPHS 常数之和为 120 年,并且边界平铺整个圆周。

内含内容

两个星历表提供者。 SpkReader 读取 JPL DE440s(约 31 MB)用于亚角秒级工作。AnalyticalProvider 将 VSOP87A + ELP/MPP02 编译为常量,无需数据文件——适用于 WASM、边缘和 Cloudflare Workers。

Jyotish,源自主要来源。 27 个 nakshatras,包含 padas 和主星 · 5 种 dasha 系统(Vimshottari、Yogini、Ashtottari 以及 Jaimini 的 Chara 和 Narayana)· 全部 16 个 vargas(D-1 → D-60)· 六部分 shadbala 及 Ishta/Kashta phala · 11 种 ayanamshas,每种都可追溯到章节、恒星或委员会 · panchanga 的五个分支,vara 从当地日出计算,Rahu/Gulika Kalam 作为真实时间窗口 · 根据 BPHS 第 26 章的分级 drishti · 平均、真和密切节点,均参考当日黄道,J2000 变体跟踪 DE441 的 OM 至 0.6″(KP 副主星就绪)。

西方:计算而非解释。 10 种宫位系统、主要相位及入相位/离相位运动、本质尊贵、合盘和组合盘。ChartConfig 默认热带黄道。没有西方解释层,也不与 Jyotish 表面保持一致。

Crates,同步发布到 crates.io:vedaksha(伞形,7 种语言)· -math · -ephem-core · -astro · -vedic · -graph · -mcp。

MCP + 属性图

17 个工具,可通过单个 tools/list 发现。目录从 Rust 定义生成,并由快照测试锁定,因此不会与代码静默漂移。

compute_natal_chart · compute_dasha · compute_vargas · compute_karakas · compute_combustion · compute_shadbala · compute_ashtakavarga · compute_transit · compute_gochara · search_transits · search_muhurta · compute_panchanga · compute_drishti · compute_bhavas · compute_synastry · compute_composite · emit_graph

任何星盘都可以通过 emit_graph 或 vedaksha_graph::chart_to_graph 转换为属性图,输出 Cypher、SurrealQL、JSON-LD、JSON 或 RAG 嵌入文本。然后代理可以询问“哪些行星相位第七宫主星?”作为图查询,而不是重新实现星盘逻辑。计算本身返回类型化结构体;图是您请求的投影。

星盘实际产生的内容: 本体论 9 种节点类型中的 4 种(Chart、Planet、Sign、House)和 12 种边类型中的 7 种。Nakshatra、Pada、Pattern、DashaPeriod 和 FixedStar 在 vedaksha_graph::ontology 中定义,但不从 ComputedChart 构建,因为后者不包含它们所需的数据。通过各自的 API 计算这些。

VEDAKSHA_MCP_TOKEN=… vedaksha-mcp --http --port 3100

HTTP 模式要求每个 POST 都带有 Authorization: Bearer <token>,并且如果没有 VEDAKSHA_MCP_TOKEN 则拒绝启动,除非您传递 --insecure-no-auth 用于受信任网络。/health 和信息性 GET 保持开放。

洁净室来源

每个实现的算法都带有 // Source: 文档注释,命名其主要论文或论文——VSOP87A、ELP/MPP02、IAU 标准、BPHS、Jaimini。两个子系统已从主要来源在文档化的防火墙后重新推导,每个都附带自己的审计目录:月球理论(2026-05-09)和恒星黄道表面(2026-08-17)。每个都记录了主要来源、过程、搜索和拒绝的内容,以及一个重新推导值的生成器,以便可以重新运行声明而不是信任。另请参阅 DATA_PROVENANCE.md。这是 BUSL-1.1 被许可人可以审计的证据。

生产环境

产品

描述

kundalimcp.com

智能体 AI Jyotish MCP,包含完整计算套件。直接构建在 vedaksha-* crates 之上。

kundali.live

消费者端点——基于聊天的阅读和自助 PDF 报告。

许可证

Business Source License 1.1 — SPDX BUSL-1.1,这是 crates.io、PyPI 和 npm 显示的许可证。(BSL-1.0 是不相关的 Boost 许可证,因此使用 BUSL 前缀。)

  • 非商业用途 — 免费(个人、研究、教育、内部工具)。

  • 商业用途 — 500 美元,每个组织一次性收费。无限产品和席位,永久有效,涵盖您许可的版本及其后发布的每个版本——不会按版本再次收费。购买 →

  • 每个版本发布四年后转换为 Apache 2.0。该未来许可证文本保存在 CHANGE-LICENSE.txt 中——这是 BUSL 术语中的 Change License,不是您今天可以选择的许可证。

参见 LICENSE、SECURITY.md、CONTRIBUTING.md 和 MAINTENANCE.md。


版权所有 © 2026 ArthIQ Labs LLC · 根据 Business Source License 1.1(BUSL-1.1)许可。

Available Tools

17 tools
compute_ashtakavargaA
Read-only

Compute Bhinna Ashtakavarga (raw bindu tables) and Sarvashtakavarga for all 7 planets from sign positions. Source: BPHS Ch.66 vv.13-68. Trikona/Ekadhipatya Shodhana and Pinda Sadhana are not included.

Inputs: sun (required), mars (required), moon (required), lagna (required), +4 more. Returns: tables, sarvashtakavarga

compute_bhavasA
Read-only

Compute the whole-sign bhava (house) chart from an ascendant. In the Vedic whole-sign system the entire sign containing the ascendant is the 1st bhava, the next sign the 2nd, and so on — houses do not have cusps within signs. Returns the sign of each of the twelve bhavas with its kendra / trikona / dusthana / upachaya classification, and optionally places supplied grahas into their bhavas.

Inputs: ascendant (required), planets. Returns: houses, planets, lagna_sign

compute_combustionA
Read-only

Compute combustion state for each planet relative to the Sun: principle per BPHS Ch.7 vv.28-29, orbs per Surya Siddhanta IX.6-8 and X.1 (Moon 12, Mars 17, Mercury 14 or 12 retrograde, Jupiter 11, Venus 10 or 8 retrograde, Saturn 15 deg). Returns Combust, DeeplyCombust, or None for Moon, Mars, Mercury, Jupiter, Venus, Saturn with degrees of separation. This is a low-level tool over already-known positions, not a natal-chart tool: call compute_natal_chart first and pass its planets[].longitude (matched by planets[].name) and planets[].retrograde values straight through as this tool's inputs — do not recompute or re-derive them.

Inputs: sun (required), mars (required), moon (required), venus (required), +8 more. Returns: states

compute_compositeA
Read-only

Compute the midpoint composite chart of two charts: for each graha, the shorter-arc midpoint of its longitude in the two charts, and the arithmetic mean of its two speeds. The two charts must carry the SAME graha names — each graha is paired with its namesake, not with whatever happens to sit at the same position in a list — and a name present in one chart but not the other is an error naming that graha. Longitudes only: this tool needs no birth time, place or ephemeris.

Inputs: chart_a (required), chart_b (required). Returns: planets

compute_dashaA
Read-only

Compute Vedic dasha (planetary period) sequences. Supports eight classical systems: Vimshottari, Ashtottari, Yogini (Moon-longitude based, require moon_longitude); Chara, Narayana (sign based, require BOTH lagna_sign AND graha_signs, since each sign's period length is counted to the sign its lord occupies in this chart); Sthira, NiryanaShoola (niryana_shoola is accepted too) and Maheshwara (Jaimini rashi dashas, require lagna_sign AND graha_longitudes, since the atmakaraka and the tie-breaks of the strength tests read degrees). graha_signs takes the eight sign_index values compute_natal_chart already returns, graha_longitudes the eight sidereal longitudes; Ketu is derived from Rahu and must not be supplied. Yogini takes rounds (1 to 10 whole 36-year rounds) or until (a horizon Julian Day); Chara takes antardashas (twelve per period, BPHS 51.5-51.9). Sthira, NiryanaShoola and Maheshwara use the defaults of the vedic crate's dasha functions (see their module docs) and always carry their antardashas. Sthira and Maheshwara start from the Brahma graha; a chart whose marks leave none returns no_brahma: true with a message, not an error. Returns a JSON dasha tree with start/end Julian Days.

Inputs: birth_jd (required), until, levels, rounds, +7 more. Returns: Envelope depends on `system`; see the four variants below. Every period carries…

compute_drishtiA
Read-only

Compute graha drishti — Vedic sign aspects — for all nine grahas. Unlike Western aspects, drishti is cast from sign to sign and is asymmetric: every graha aspects the 7th from itself, and Mars additionally aspects the 4th and 8th, Jupiter the 5th and 9th, Saturn the 3rd and 10th. Returns each aspect with its graded strength (Full, ThreeQuarter, Half, Quarter) and the house distance.

Inputs: sun (required), ketu (required), mars (required), moon (required), +5 more. Returns: aspects

compute_gocharaA
Read-only

Compute Gochara (transit interpretation) for the seven grahas against a natal reference sign per BPHS Ch.29. Returns favourable/unfavourable verdict, house from natal, and raw vedha (obstruction) candidates per planet. The natal reference sign is the caller's choice — typically the natal Moon's sign (Chandra Gochara) or the natal Lagna's sign. Rahu and Ketu are not included.

Inputs: sun (required), mars (required), moon (required), venus (required), +6 more. Returns: entries

compute_karakasA
Read-only

Compute Jaimini Chara Karaka assignments from sidereal planet longitudes. Ranks planets by degrees within their current sign: highest = Atmakaraka (soul significator), lowest = Darakaraka (spouse significator). Supports 7-karaka (Sun–Saturn) and 8-karaka (adds Rahu) schemes.

Inputs: sun (required), mars (required), moon (required), venus (required), +5 more. Returns: karakas

compute_natal_chartA
Read-only

Compute a natal astrological chart for a given time and location. Returns JSON with each body's longitude, latitude, speed, sign, house, dignity and retrograde flag, the house cusps with ascendant and MC, the aspects, and the ayanamsha applied. Pass a sidereal ayanamsha for a Vedic chart (kundali); the default is tropical. To get a property graph, pass this output to emit_graph.

Inputs: latitude (required), longitude (required), julian_day (required), ayanamsha, +1 more. Returns: houses, aspects, planets, julian_day, +2 more

compute_panchangaA
Read-only

Compute the panchanga — the five limbs of the Vedic almanac — for an instant: tithi (lunar day, with paksha and lord), vara (weekday reckoned from local sunrise, with its lord and the Rahu and Gulika Kalam windows as Julian Days), nakshatra (with pada), yoga (one of the 27 nithya yogas, with degrees remaining), and karana (half-tithi). Takes sidereal longitudes; all returned instants are Julian Days (UT). vara.from_sunrise reports HOW the weekday was reckoned: true means it was taken from an actual local sunrise (the Vedic definition); false means no sunrise exists to reckon from — the polar day or polar night, above about ±66.5° latitude — and the value is the observer's local CIVIL weekday as a documented fallback, which is a different quantity. Check it before presenting the vara at high latitude. vara.rahu_kalam being null is NOT the same signal: the Kalam windows can also be null while from_sunrise is true.

Inputs: jd (required), sun (required), moon (required), latitude (required), +3 more. Returns: vara, yoga, tithi, karana, +1 more

compute_shadbalaA
Read-only

Compute the complete six-fold Shadbala of the seven grahas (Sun to Saturn) for a birth moment and place, per BPHS Ch.27, with Ishta and Kashta Phala per Ch.28, in virupas. Pass the moment and the place; the tool casts the chart itself and reads sunrise, sunset and the next sunrise from the engine. Every part is in the output, each in its own field: Sthana (uccha, saptavargaja, ojhayugma, kendradi, drekkana), Dig (continuous, the arc from the weak cusp over 3, 27.7), Kala (nathonnata, paksha, tribhaga, abda, masa, vara, hora, ayana and yuddha, which is signed), Cheshta (the cheshta kendra for Mars to Saturn, the Sun's ayana and the Moon's paksha bala, 27.18 and 27.24-25), Naisargika and Drik (a quarter of the benefic sphuta drishti added, a quarter of the malefic taken away, the aspect of Mercury and Jupiter added whole, 27.19; it can be negative or pass 60). The Sun's ayana and the Moon's paksha bala are counted once in kala and once in cheshta, each undoubled. The rules are the verses' defaults; the benefic and malefic grahas are those of BPHS 3.11, with Rahu (the mean node) and Ketu counting only as malefic company for Mercury. Each graha also carries its motion state (vakra, anuvakra, ... atichara, 27.21-23) against the mean geocentric motion; it is reported beside the strengths and is not part of any total. The Sun must both rise and set at the place: in the polar day or night there is no Hindu day to divide into thirds and horas, and the call fails by name.

Inputs: latitude (required), ayanamsha (required), longitude (required), julian_day (required), +3 more. Returns: cusps, moment, planets, julian_day, +3 more

compute_synastryA
Read-only

Compute synastry — the aspects each graha in one chart makes to each graha in another chart. Every graha in chart A is tested against every graha in chart B (the two charts do not need the same graha names), and each hit is returned with its aspect type, orb in degrees and strength (1.0 at exact, falling linearly to 0.0 at the orb boundary). Orbs are the traditional Lilly values — conjunction, trine and opposition 8°, square 7°, sextile 6°, minors 2° — scaled by orb_factor. Longitudes only: this tool needs no birth time, place or ephemeris.

Inputs: chart_a (required), chart_b (required), aspect_set, orb_factor. Returns: aspects

compute_transitA
Read-only

Compute transiting planet positions relative to a natal chart at a specific moment. Returns planet longitudes for the transit time alongside natal positions, enabling aspect calculation between transit and natal placements.

Inputs: natal_jd (required), natal_lat (required), natal_lon (required), transit_jd (required). Returns: natal_jd, transit_jd, natal_positions, transit_positions, +1 more

compute_vargasA
Read-only

Compute Vedic divisional charts (vargas). Given a time and place, returns one chart per requested division: the varga lagna, and for each of the ten bodies compute_natal_chart returns — the seven grahas plus the mean, true and osculating lunar node — its rashi longitude, the sign it occupies within that varga, its dignity in that sign, and its whole-sign bhava counted from the varga lagna. Ketu is not listed separately: it is the node's opposite point, 180 degrees away. The nodes carry no dignity, so that field is absent for them. Supply planet_longitude instead to divide a single longitude without an ephemeris lookup, in which case no graha name, dignity or bhava is returned because none is defined. Vargas are classically read on a sidereal zodiac: pass an ayanamsha, or accept the Tropical default this surface uses everywhere. Source: BPHS Ch. 6-7.

Inputs: latitude (required), divisions (required), longitude (required), julian_day (required), +3 more. Returns: vargas, tradition, julian_day, true_ayanamsha_value

emit_graphA
Read-only

Turn a chart into a queryable property graph. Accepts the output of compute_natal_chart directly (pass latitude and longitude alongside it), or an existing ChartGraph. Emits Neo4j Cypher, SurrealDB SurrealQL, JSON-LD, plain JSON, or RAG embedding text.

Inputs: format (required), chart_json (required), latitude, longitude, +1 more.

search_muhurtaA
Read-only

Search for auspicious time windows (muhurta) within a given period for a geographic location. Returns ranked muhurta candidates with quality scores based on tithi, nakshatra, yoga, karana, and planetary positions. The search window is capped at 30 days (see MUHURTA_SEARCH_RANGE_TOO_LARGE), a scope limit; for a longer horizon, issue several searches.

Inputs: end_jd (required), latitude (required), start_jd (required), longitude (required), +3 more. Returns: end_jd, results, latitude, start_jd, +4 more

search_transitsA
Read-only

Search for transiting planet–natal planet aspects within a time window. Supply natal positions and a Julian Day range; receive a list of exact transit moments with aspect type, orb, and applying/separating status.

Inputs: end_jd (required), start_jd (required), natal_positions (required), bodies, +2 more. Returns: end_jd, events, max_orb, start_jd, +1 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.1/5.0

    Scored across 17 tools

    Disambiguation4/5

    Most tools target clearly different computations (dasha, shadbala, panchanga, ashtakavarga, karakas), and descriptions explicitly disambiguate close pairs like compute_transit vs search_transits (positions vs exact aspect moments) and compute_drishti vs compute_synastry (intra-chart sign aspects vs inter-chart aspects). The only residual overlap is conceptual: compute_transit vs compute_gochara both concern transits, and compute_natal_chart vs compute_bhavas both involve houses, so an agent may briefly hesitate before selecting.

    Naming Consistency5/5

    All 17 names are snake_case with a clear verb_noun shape: 13 compute_* tools, 2 search_* tools, and emit_graph. The pattern is predictable and immediately readable, with no camelCase or stylistic mixing.

    Tool Count4/5

    17 tools is on the upper edge but each corresponds to a genuinely distinct Vedic computation (vargas, dasha, shadbala, combustion, ashtakavarga, gochara, panchanga, drishti, bhavas, synastry, composite, transits, muhurta, graph export). The surface is broad and no tool feels decorative, though it is slightly heavy for easy scanning.

    Completeness4/5

    The surface covers the full lifecycle from natal chart construction through derived analyses (vargas, karakas, dashas, shadbala, ashtakavarga), prediction (transits, gochara, muhurta), and export (emit_graph). Minor gaps remain: no explicit yoga/combination detection, and ashtakavarga explicitly omits Trikona/Ekadhipatya Shodhana and Pinda Sadhana, but agents can work around these.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      World's first Vedic Astrology MCP Server — connect Claude, ChatGPT, Cursor, or any AI to real Vedic astrology. Provides horoscope predictions, compatibility matching, numerology, planetary positions, yogas and house analysis via MCP.
      11
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      A self-contained MCP server that gives AI agents the ability to calculate high-precision astronomical data. It provides tropical zodiac coordinates, planetary speeds, retrograde detection, and house cusps using the trusted Swiss Ephemeris engine. 100%
      4
      AGPL 3.0
    • A
      license
      A
      quality
      C
      maintenance
      Astrology MCP server that computes natal charts, transits, synastry, progressions, returns, eclipses, retrogrades, and moon phases from a real ephemeris, enabling AI agents to provide accurate astrological calculations without hallucination.
      12
      75 npm
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A Vedic astrology MCP server that computes birth charts, dashas, transits, and yogas locally using Swiss Ephemeris, enabling an LLM to interpret horoscopes and provide personalized advice.
      -