kundali-chart-mcp 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +67 -0
  2. package/azure-function/function_app.py +93 -0
  3. package/azure-function/host.json +15 -0
  4. package/azure-function/kundali_bridge.py +952 -0
  5. package/azure-function/python/kundali_lib/__init__.py +1 -0
  6. package/azure-function/python/kundali_lib/__pycache__/__init__.cpython-313.pyc +0 -0
  7. package/azure-function/python/kundali_lib/__pycache__/ephemeris.cpython-313.pyc +0 -0
  8. package/azure-function/python/kundali_lib/__pycache__/geocoder.cpython-313.pyc +0 -0
  9. package/azure-function/python/kundali_lib/__pycache__/vedicastro_bridge.cpython-313.pyc +0 -0
  10. package/azure-function/python/kundali_lib/ephemeris.py +30 -0
  11. package/azure-function/python/kundali_lib/geocoder.py +82 -0
  12. package/azure-function/python/kundali_lib/vedic/__init__.py +1 -0
  13. package/azure-function/python/kundali_lib/vedic/__pycache__/__init__.cpython-313.pyc +0 -0
  14. package/azure-function/python/kundali_lib/vedic/__pycache__/arishta.cpython-313.pyc +0 -0
  15. package/azure-function/python/kundali_lib/vedic/__pycache__/ashtakavarga.cpython-313.pyc +0 -0
  16. package/azure-function/python/kundali_lib/vedic/__pycache__/avasthas.cpython-313.pyc +0 -0
  17. package/azure-function/python/kundali_lib/vedic/__pycache__/ayanamsa.cpython-313.pyc +0 -0
  18. package/azure-function/python/kundali_lib/vedic/__pycache__/bhava_chalit.cpython-313.pyc +0 -0
  19. package/azure-function/python/kundali_lib/vedic/__pycache__/char_dasha.cpython-313.pyc +0 -0
  20. package/azure-function/python/kundali_lib/vedic/__pycache__/chart.cpython-313.pyc +0 -0
  21. package/azure-function/python/kundali_lib/vedic/__pycache__/chart_types.cpython-313.pyc +0 -0
  22. package/azure-function/python/kundali_lib/vedic/__pycache__/compatibility.cpython-313.pyc +0 -0
  23. package/azure-function/python/kundali_lib/vedic/__pycache__/constants.cpython-313.pyc +0 -0
  24. package/azure-function/python/kundali_lib/vedic/__pycache__/dasha_extended.cpython-313.pyc +0 -0
  25. package/azure-function/python/kundali_lib/vedic/__pycache__/dasha_systems.cpython-313.pyc +0 -0
  26. package/azure-function/python/kundali_lib/vedic/__pycache__/doshas.cpython-313.pyc +0 -0
  27. package/azure-function/python/kundali_lib/vedic/__pycache__/gandanta.cpython-313.pyc +0 -0
  28. package/azure-function/python/kundali_lib/vedic/__pycache__/gochara.cpython-313.pyc +0 -0
  29. package/azure-function/python/kundali_lib/vedic/__pycache__/hora.cpython-313.pyc +0 -0
  30. package/azure-function/python/kundali_lib/vedic/__pycache__/houses.cpython-313.pyc +0 -0
  31. package/azure-function/python/kundali_lib/vedic/__pycache__/jaimini.cpython-313.pyc +0 -0
  32. package/azure-function/python/kundali_lib/vedic/__pycache__/kalachakra.cpython-313.pyc +0 -0
  33. package/azure-function/python/kundali_lib/vedic/__pycache__/kartari.cpython-313.pyc +0 -0
  34. package/azure-function/python/kundali_lib/vedic/__pycache__/kurmachakra.cpython-313.pyc +0 -0
  35. package/azure-function/python/kundali_lib/vedic/__pycache__/lunar_return.cpython-313.pyc +0 -0
  36. package/azure-function/python/kundali_lib/vedic/__pycache__/muhurta.cpython-313.pyc +0 -0
  37. package/azure-function/python/kundali_lib/vedic/__pycache__/nabhasha.cpython-313.pyc +0 -0
  38. package/azure-function/python/kundali_lib/vedic/__pycache__/nakshatra_details.cpython-313.pyc +0 -0
  39. package/azure-function/python/kundali_lib/vedic/__pycache__/panchanga.cpython-313.pyc +0 -0
  40. package/azure-function/python/kundali_lib/vedic/__pycache__/planets.cpython-313.pyc +0 -0
  41. package/azure-function/python/kundali_lib/vedic/__pycache__/shadbala.cpython-313.pyc +0 -0
  42. package/azure-function/python/kundali_lib/vedic/__pycache__/special_conditions.cpython-313.pyc +0 -0
  43. package/azure-function/python/kundali_lib/vedic/__pycache__/sudarshana.cpython-313.pyc +0 -0
  44. package/azure-function/python/kundali_lib/vedic/__pycache__/tajaka.cpython-313.pyc +0 -0
  45. package/azure-function/python/kundali_lib/vedic/__pycache__/upagrahas.cpython-313.pyc +0 -0
  46. package/azure-function/python/kundali_lib/vedic/__pycache__/varshaphal.cpython-313.pyc +0 -0
  47. package/azure-function/python/kundali_lib/vedic/__pycache__/yogas.cpython-313.pyc +0 -0
  48. package/azure-function/python/kundali_lib/vedic/__pycache__/zodiac.cpython-313.pyc +0 -0
  49. package/azure-function/python/kundali_lib/vedic/arishta.py +465 -0
  50. package/azure-function/python/kundali_lib/vedic/ashtakavarga.py +213 -0
  51. package/azure-function/python/kundali_lib/vedic/avasthas.py +292 -0
  52. package/azure-function/python/kundali_lib/vedic/ayanamsa.py +106 -0
  53. package/azure-function/python/kundali_lib/vedic/bhava_chalit.py +137 -0
  54. package/azure-function/python/kundali_lib/vedic/char_dasha.py +308 -0
  55. package/azure-function/python/kundali_lib/vedic/chart.py +126 -0
  56. package/azure-function/python/kundali_lib/vedic/chart_types.py +338 -0
  57. package/azure-function/python/kundali_lib/vedic/compatibility.py +705 -0
  58. package/azure-function/python/kundali_lib/vedic/constants.py +108 -0
  59. package/azure-function/python/kundali_lib/vedic/dasha_extended.py +262 -0
  60. package/azure-function/python/kundali_lib/vedic/dasha_systems.py +439 -0
  61. package/azure-function/python/kundali_lib/vedic/doshas.py +453 -0
  62. package/azure-function/python/kundali_lib/vedic/gandanta.py +213 -0
  63. package/azure-function/python/kundali_lib/vedic/gochara.py +277 -0
  64. package/azure-function/python/kundali_lib/vedic/hora.py +263 -0
  65. package/azure-function/python/kundali_lib/vedic/houses.py +30 -0
  66. package/azure-function/python/kundali_lib/vedic/jaimini.py +361 -0
  67. package/azure-function/python/kundali_lib/vedic/kalachakra.py +226 -0
  68. package/azure-function/python/kundali_lib/vedic/kartari.py +243 -0
  69. package/azure-function/python/kundali_lib/vedic/kurmachakra.py +383 -0
  70. package/azure-function/python/kundali_lib/vedic/lunar_return.py +402 -0
  71. package/azure-function/python/kundali_lib/vedic/muhurta.py +414 -0
  72. package/azure-function/python/kundali_lib/vedic/nabhasha.py +349 -0
  73. package/azure-function/python/kundali_lib/vedic/nakshatra_details.py +945 -0
  74. package/azure-function/python/kundali_lib/vedic/panchanga.py +297 -0
  75. package/azure-function/python/kundali_lib/vedic/planets.py +55 -0
  76. package/azure-function/python/kundali_lib/vedic/shadbala.py +500 -0
  77. package/azure-function/python/kundali_lib/vedic/special_conditions.py +319 -0
  78. package/azure-function/python/kundali_lib/vedic/sudarshana.py +232 -0
  79. package/azure-function/python/kundali_lib/vedic/tajaka.py +482 -0
  80. package/azure-function/python/kundali_lib/vedic/upagrahas.py +229 -0
  81. package/azure-function/python/kundali_lib/vedic/varshaphal.py +185 -0
  82. package/azure-function/python/kundali_lib/vedic/yogas.py +935 -0
  83. package/azure-function/python/kundali_lib/vedic/zodiac.py +42 -0
  84. package/azure-function/python/kundali_lib/vedicastro_bridge.py +198 -0
  85. package/azure-function/requirements.txt +9 -0
  86. package/index.js +747 -0
  87. package/kundali-chart-mcp.js +159 -0
  88. package/kundali_bridge.py +952 -0
  89. package/package.json +41 -0
  90. package/python/kundali_lib/__init__.py +1 -0
  91. package/python/kundali_lib/__pycache__/__init__.cpython-313.pyc +0 -0
  92. package/python/kundali_lib/__pycache__/ephemeris.cpython-313.pyc +0 -0
  93. package/python/kundali_lib/__pycache__/geocoder.cpython-313.pyc +0 -0
  94. package/python/kundali_lib/__pycache__/vedicastro_bridge.cpython-313.pyc +0 -0
  95. package/python/kundali_lib/ephemeris.py +30 -0
  96. package/python/kundali_lib/geocoder.py +82 -0
  97. package/python/kundali_lib/vedic/__init__.py +1 -0
  98. package/python/kundali_lib/vedic/__pycache__/__init__.cpython-313.pyc +0 -0
  99. package/python/kundali_lib/vedic/__pycache__/arishta.cpython-313.pyc +0 -0
  100. package/python/kundali_lib/vedic/__pycache__/ashtakavarga.cpython-313.pyc +0 -0
  101. package/python/kundali_lib/vedic/__pycache__/avasthas.cpython-313.pyc +0 -0
  102. package/python/kundali_lib/vedic/__pycache__/ayanamsa.cpython-313.pyc +0 -0
  103. package/python/kundali_lib/vedic/__pycache__/bhava_chalit.cpython-313.pyc +0 -0
  104. package/python/kundali_lib/vedic/__pycache__/char_dasha.cpython-313.pyc +0 -0
  105. package/python/kundali_lib/vedic/__pycache__/chart.cpython-313.pyc +0 -0
  106. package/python/kundali_lib/vedic/__pycache__/chart_types.cpython-313.pyc +0 -0
  107. package/python/kundali_lib/vedic/__pycache__/compatibility.cpython-313.pyc +0 -0
  108. package/python/kundali_lib/vedic/__pycache__/constants.cpython-313.pyc +0 -0
  109. package/python/kundali_lib/vedic/__pycache__/dasha_extended.cpython-313.pyc +0 -0
  110. package/python/kundali_lib/vedic/__pycache__/dasha_systems.cpython-313.pyc +0 -0
  111. package/python/kundali_lib/vedic/__pycache__/doshas.cpython-313.pyc +0 -0
  112. package/python/kundali_lib/vedic/__pycache__/gandanta.cpython-313.pyc +0 -0
  113. package/python/kundali_lib/vedic/__pycache__/gochara.cpython-313.pyc +0 -0
  114. package/python/kundali_lib/vedic/__pycache__/hora.cpython-313.pyc +0 -0
  115. package/python/kundali_lib/vedic/__pycache__/houses.cpython-313.pyc +0 -0
  116. package/python/kundali_lib/vedic/__pycache__/jaimini.cpython-313.pyc +0 -0
  117. package/python/kundali_lib/vedic/__pycache__/kalachakra.cpython-313.pyc +0 -0
  118. package/python/kundali_lib/vedic/__pycache__/kartari.cpython-313.pyc +0 -0
  119. package/python/kundali_lib/vedic/__pycache__/kurmachakra.cpython-313.pyc +0 -0
  120. package/python/kundali_lib/vedic/__pycache__/lunar_return.cpython-313.pyc +0 -0
  121. package/python/kundali_lib/vedic/__pycache__/muhurta.cpython-313.pyc +0 -0
  122. package/python/kundali_lib/vedic/__pycache__/nabhasha.cpython-313.pyc +0 -0
  123. package/python/kundali_lib/vedic/__pycache__/nakshatra_details.cpython-313.pyc +0 -0
  124. package/python/kundali_lib/vedic/__pycache__/panchanga.cpython-313.pyc +0 -0
  125. package/python/kundali_lib/vedic/__pycache__/planets.cpython-313.pyc +0 -0
  126. package/python/kundali_lib/vedic/__pycache__/shadbala.cpython-313.pyc +0 -0
  127. package/python/kundali_lib/vedic/__pycache__/special_conditions.cpython-313.pyc +0 -0
  128. package/python/kundali_lib/vedic/__pycache__/sudarshana.cpython-313.pyc +0 -0
  129. package/python/kundali_lib/vedic/__pycache__/tajaka.cpython-313.pyc +0 -0
  130. package/python/kundali_lib/vedic/__pycache__/upagrahas.cpython-313.pyc +0 -0
  131. package/python/kundali_lib/vedic/__pycache__/varshaphal.cpython-313.pyc +0 -0
  132. package/python/kundali_lib/vedic/__pycache__/yogas.cpython-313.pyc +0 -0
  133. package/python/kundali_lib/vedic/__pycache__/zodiac.cpython-313.pyc +0 -0
  134. package/python/kundali_lib/vedic/arishta.py +465 -0
  135. package/python/kundali_lib/vedic/ashtakavarga.py +213 -0
  136. package/python/kundali_lib/vedic/avasthas.py +292 -0
  137. package/python/kundali_lib/vedic/ayanamsa.py +106 -0
  138. package/python/kundali_lib/vedic/bhava_chalit.py +137 -0
  139. package/python/kundali_lib/vedic/char_dasha.py +308 -0
  140. package/python/kundali_lib/vedic/chart.py +126 -0
  141. package/python/kundali_lib/vedic/chart_types.py +338 -0
  142. package/python/kundali_lib/vedic/compatibility.py +705 -0
  143. package/python/kundali_lib/vedic/constants.py +108 -0
  144. package/python/kundali_lib/vedic/dasha_extended.py +262 -0
  145. package/python/kundali_lib/vedic/dasha_systems.py +439 -0
  146. package/python/kundali_lib/vedic/doshas.py +453 -0
  147. package/python/kundali_lib/vedic/gandanta.py +213 -0
  148. package/python/kundali_lib/vedic/gochara.py +277 -0
  149. package/python/kundali_lib/vedic/hora.py +263 -0
  150. package/python/kundali_lib/vedic/houses.py +30 -0
  151. package/python/kundali_lib/vedic/jaimini.py +361 -0
  152. package/python/kundali_lib/vedic/kalachakra.py +226 -0
  153. package/python/kundali_lib/vedic/kartari.py +243 -0
  154. package/python/kundali_lib/vedic/kurmachakra.py +383 -0
  155. package/python/kundali_lib/vedic/lunar_return.py +402 -0
  156. package/python/kundali_lib/vedic/muhurta.py +414 -0
  157. package/python/kundali_lib/vedic/nabhasha.py +349 -0
  158. package/python/kundali_lib/vedic/nakshatra_details.py +945 -0
  159. package/python/kundali_lib/vedic/panchanga.py +297 -0
  160. package/python/kundali_lib/vedic/planets.py +55 -0
  161. package/python/kundali_lib/vedic/shadbala.py +500 -0
  162. package/python/kundali_lib/vedic/special_conditions.py +319 -0
  163. package/python/kundali_lib/vedic/sudarshana.py +232 -0
  164. package/python/kundali_lib/vedic/tajaka.py +482 -0
  165. package/python/kundali_lib/vedic/upagrahas.py +229 -0
  166. package/python/kundali_lib/vedic/varshaphal.py +185 -0
  167. package/python/kundali_lib/vedic/yogas.py +935 -0
  168. package/python/kundali_lib/vedic/zodiac.py +42 -0
  169. package/python/kundali_lib/vedicastro_bridge.py +198 -0
  170. package/remote-server.js +590 -0
  171. package/requirements.txt +8 -0
  172. package/setup.sh +218 -0
@@ -0,0 +1,590 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Remote MCP server for Kundali chart generation.
5
+ * Proxies tool calls to an Azure Function backend.
6
+ *
7
+ * Usage:
8
+ * npx kundali-chart-mcp <function-url> [function-key]
9
+ *
10
+ * Example:
11
+ * npx kundali-chart-mcp https://kundali-mcp-func.azurewebsites.net
12
+ *
13
+ * Or set environment variables:
14
+ * KUNDALI_FUNCTION_URL=https://kundali-mcp-func.azurewebsites.net
15
+ * KUNDALI_FUNCTION_KEY=<optional-key>
16
+ */
17
+
18
+ import { dirname } from "node:path";
19
+ import { fileURLToPath } from "node:url";
20
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
21
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
22
+ import { z } from "zod";
23
+
24
+ const __filename = fileURLToPath(import.meta.url);
25
+ const __dirname = dirname(__filename);
26
+
27
+ const FUNCTION_URL = process.argv[2] || process.env.KUNDALI_FUNCTION_URL;
28
+ const FUNCTION_KEY = process.argv[3] || process.env.KUNDALI_FUNCTION_KEY;
29
+
30
+ if (!FUNCTION_URL) {
31
+ console.error(
32
+ "Usage: npx kundali-chart-mcp <function-url> [function-key]\n" +
33
+ " or: KUNDALI_FUNCTION_URL=<url> npx kundali-chart-mcp\n\n" +
34
+ "Get a free function URL at: https://github.com/your-repo/kundali-chart-mcp",
35
+ );
36
+ process.exit(1);
37
+ }
38
+
39
+ async function callRemote(toolName, payload) {
40
+ let url = `${FUNCTION_URL}/api/kundali/${toolName}`;
41
+ if (FUNCTION_KEY) {
42
+ url += `?code=${FUNCTION_KEY}`;
43
+ }
44
+
45
+ const res = await fetch(url, {
46
+ method: "POST",
47
+ headers: { "Content-Type": "application/json" },
48
+ body: JSON.stringify(payload),
49
+ });
50
+
51
+ if (!res.ok) {
52
+ const body = await res.text();
53
+ throw new Error(`HTTP ${res.status}: ${body}`);
54
+ }
55
+
56
+ return res.json();
57
+ }
58
+
59
+ const server = new McpServer({
60
+ name: "kundali-chart",
61
+ version: "0.2.0",
62
+ });
63
+
64
+ function jsonContent(data) {
65
+ return {
66
+ content: [
67
+ {
68
+ type: "text",
69
+ text: JSON.stringify(data, null, 2),
70
+ },
71
+ ],
72
+ };
73
+ }
74
+
75
+ // ─── Tool definitions ──────────────────────────────────────────────────────
76
+
77
+ const standardBirthInput = {
78
+ name: z.string().optional().describe("Person's name."),
79
+ city: z
80
+ .string()
81
+ .optional()
82
+ .describe("Birth city. Used for geocoding if coordinates not provided."),
83
+ date_of_birth: z.string().describe("Birth date YYYY-MM-DD."),
84
+ time_of_birth: z
85
+ .string()
86
+ .describe("Birth time HH:MM or HH:MM:SS, local to birthplace."),
87
+ latitude: z
88
+ .number()
89
+ .optional()
90
+ .describe("Birth latitude. Must come with longitude."),
91
+ longitude: z
92
+ .number()
93
+ .optional()
94
+ .describe("Birth longitude. Must come with latitude."),
95
+ timezone: z.string().optional().describe("IANA timezone, e.g. Asia/Kolkata."),
96
+ ayanamsa_mode: z.string().optional().describe("Ayanamsa, default 'lahiri'."),
97
+ house_system: z
98
+ .string()
99
+ .optional()
100
+ .describe("House system code, default 'P'."),
101
+ };
102
+
103
+ server.tool(
104
+ "generate_kundali",
105
+ "Generate a Vedic Kundali birth chart from birth details.",
106
+ {
107
+ name: z.string().describe("Person's name."),
108
+ city: z.string().describe("Birth city/place."),
109
+ date_of_birth: z.string().describe("Birth date in YYYY-MM-DD format."),
110
+ time_of_birth: z
111
+ .string()
112
+ .describe("Birth time in HH:MM or HH:MM:SS format."),
113
+ latitude: z.number().optional().describe("Optional birthplace latitude."),
114
+ longitude: z.number().optional().describe("Optional birthplace longitude."),
115
+ timezone: z.string().optional().describe("Optional IANA timezone."),
116
+ chart_type: z
117
+ .string()
118
+ .optional()
119
+ .describe("Optional chart type. Default: lagna."),
120
+ ayanamsa_mode: z
121
+ .string()
122
+ .optional()
123
+ .describe("Optional sidereal mode. Default: lahiri."),
124
+ house_system: z
125
+ .string()
126
+ .optional()
127
+ .describe("Optional house system code. Default: P."),
128
+ },
129
+ async (args) => jsonContent(await callRemote("generate_kundali", args)),
130
+ );
131
+
132
+ server.tool(
133
+ "list_available_chart_types",
134
+ "List supported Kundali chart types and aliases.",
135
+ {},
136
+ async (args) =>
137
+ jsonContent(await callRemote("list_available_chart_types", args)),
138
+ );
139
+
140
+ server.tool(
141
+ "list_ayanamsa_modes",
142
+ "List all sidereal (ayanamsa) modes.",
143
+ {},
144
+ async (args) => jsonContent(await callRemote("list_ayanamsa_modes", args)),
145
+ );
146
+
147
+ server.tool("list_house_systems", "List all house systems.", {}, async (args) =>
148
+ jsonContent(await callRemote("list_house_systems", args)),
149
+ );
150
+
151
+ server.tool(
152
+ "search_birth_places",
153
+ "Search birth-place suggestions.",
154
+ {
155
+ query: z.string().describe("Place/city search text."),
156
+ limit: z.number().int().min(1).max(10).optional(),
157
+ },
158
+ async (args) => jsonContent(await callRemote("search_birth_places", args)),
159
+ );
160
+
161
+ server.tool(
162
+ "get_timezone_for_coordinates",
163
+ "Get IANA timezone for lat/lon.",
164
+ { latitude: z.number(), longitude: z.number() },
165
+ async (args) =>
166
+ jsonContent(await callRemote("get_timezone_for_coordinates", args)),
167
+ );
168
+
169
+ server.tool(
170
+ "get_transit_positions",
171
+ "Get sidereal planetary transit positions.",
172
+ {
173
+ datetime_utc: z
174
+ .string()
175
+ .optional()
176
+ .describe("ISO UTC datetime. Defaults to now."),
177
+ },
178
+ async (args) => jsonContent(await callRemote("get_transit_positions", args)),
179
+ );
180
+
181
+ server.tool(
182
+ "get_extended_chart",
183
+ "Get enhanced Kundali chart with SubLord/KP data.",
184
+ {
185
+ year: z.number(),
186
+ month: z.number(),
187
+ day: z.number(),
188
+ hour: z.number(),
189
+ minute: z.number(),
190
+ second: z.number().optional(),
191
+ utc_offset: z.string(),
192
+ latitude: z.number(),
193
+ longitude: z.number(),
194
+ ayanamsa: z.string().optional(),
195
+ house_system: z.string().optional(),
196
+ },
197
+ async (args) => jsonContent(await callRemote("get_extended_chart", args)),
198
+ );
199
+
200
+ server.tool(
201
+ "get_vimshottari_dasha",
202
+ "Get Vimshottari Dasha periods.",
203
+ {
204
+ year: z.number(),
205
+ month: z.number(),
206
+ day: z.number(),
207
+ hour: z.number(),
208
+ minute: z.number(),
209
+ second: z.number().optional(),
210
+ utc_offset: z.string(),
211
+ latitude: z.number(),
212
+ longitude: z.number(),
213
+ ayanamsa: z.string().optional(),
214
+ house_system: z.string().optional(),
215
+ },
216
+ async (args) => jsonContent(await callRemote("get_vimshottari_dasha", args)),
217
+ );
218
+
219
+ server.tool(
220
+ "get_planetary_aspects",
221
+ "Get all planetary aspects.",
222
+ {
223
+ year: z.number(),
224
+ month: z.number(),
225
+ day: z.number(),
226
+ hour: z.number(),
227
+ minute: z.number(),
228
+ second: z.number().optional(),
229
+ utc_offset: z.string(),
230
+ latitude: z.number(),
231
+ longitude: z.number(),
232
+ ayanamsa: z.string().optional(),
233
+ house_system: z.string().optional(),
234
+ },
235
+ async (args) => jsonContent(await callRemote("get_planetary_aspects", args)),
236
+ );
237
+
238
+ server.tool(
239
+ "get_significators",
240
+ "Get planet-wise and house-wise significators (KP system).",
241
+ {
242
+ year: z.number(),
243
+ month: z.number(),
244
+ day: z.number(),
245
+ hour: z.number(),
246
+ minute: z.number(),
247
+ second: z.number().optional(),
248
+ utc_offset: z.string(),
249
+ latitude: z.number(),
250
+ longitude: z.number(),
251
+ ayanamsa: z.string().optional(),
252
+ house_system: z.string().optional(),
253
+ },
254
+ async (args) => jsonContent(await callRemote("get_significators", args)),
255
+ );
256
+
257
+ server.tool(
258
+ "list_extended_options",
259
+ "List supported ayanamsas and house systems for extended tools.",
260
+ {},
261
+ async (args) => jsonContent(await callRemote("list_extended_options", args)),
262
+ );
263
+
264
+ server.tool(
265
+ "get_panchanga",
266
+ "Get Panchanga (5 Vedic time limbs) for any datetime and location.",
267
+ {
268
+ datetime: z.string().optional(),
269
+ timezone: z.string().optional(),
270
+ ayanamsa_mode: z.string().optional(),
271
+ },
272
+ async (args) => jsonContent(await callRemote("get_panchanga", args)),
273
+ );
274
+
275
+ server.tool(
276
+ "get_doshas",
277
+ "Check all major doshas: Mangal Dosha, Kaal Sarp Dosha, Sade Sati, Graha Yuddha, Combustion.",
278
+ { ...standardBirthInput, current_saturn_rashi: z.string().optional() },
279
+ async (args) => jsonContent(await callRemote("get_doshas", args)),
280
+ );
281
+
282
+ server.tool(
283
+ "get_yogas",
284
+ "Identify all major Vedic Yogas.",
285
+ standardBirthInput,
286
+ async (args) => jsonContent(await callRemote("get_yogas", args)),
287
+ );
288
+
289
+ server.tool(
290
+ "get_compatibility",
291
+ "Ashtakoot Milan: 36-point Vedic marriage compatibility scoring.",
292
+ {
293
+ chart1: z.object(standardBirthInput),
294
+ chart2: z.object(standardBirthInput),
295
+ },
296
+ async (args) => jsonContent(await callRemote("get_compatibility", args)),
297
+ );
298
+
299
+ server.tool(
300
+ "get_special_conditions",
301
+ "Check Vargottama, Pushkara Navamsha, Dig Bala, Jaimini Karakas.",
302
+ standardBirthInput,
303
+ async (args) => jsonContent(await callRemote("get_special_conditions", args)),
304
+ );
305
+
306
+ server.tool(
307
+ "get_pratyantar_dasha",
308
+ "Get 3-level Vimshottari Dasha: MD → AD → PD.",
309
+ standardBirthInput,
310
+ async (args) => jsonContent(await callRemote("get_pratyantar_dasha", args)),
311
+ );
312
+
313
+ server.tool(
314
+ "get_yogini_dasha",
315
+ "Get Yogini Dasha (8-yogini, 36-year cycle).",
316
+ standardBirthInput,
317
+ async (args) => jsonContent(await callRemote("get_yogini_dasha", args)),
318
+ );
319
+
320
+ server.tool(
321
+ "get_varshaphal",
322
+ "Get Varshaphal (Solar Return chart).",
323
+ {
324
+ ...standardBirthInput,
325
+ year_of_life: z.number(),
326
+ query_latitude: z.number().optional(),
327
+ query_longitude: z.number().optional(),
328
+ query_timezone: z.string().optional(),
329
+ },
330
+ async (args) => jsonContent(await callRemote("get_varshaphal", args)),
331
+ );
332
+
333
+ server.tool(
334
+ "get_ashtakavarga",
335
+ "Get Ashtakavarga benefic point scores.",
336
+ standardBirthInput,
337
+ async (args) => jsonContent(await callRemote("get_ashtakavarga", args)),
338
+ );
339
+
340
+ server.tool(
341
+ "get_shadbala",
342
+ "Get Shadbala — six-fold planetary strength.",
343
+ standardBirthInput,
344
+ async (args) => jsonContent(await callRemote("get_shadbala", args)),
345
+ );
346
+
347
+ server.tool(
348
+ "get_jaimini",
349
+ "Get full Jaimini astrology: Chara Karakas, aspects, Karakamsha.",
350
+ standardBirthInput,
351
+ async (args) => jsonContent(await callRemote("get_jaimini", args)),
352
+ );
353
+
354
+ server.tool(
355
+ "get_muhurta",
356
+ "Score a datetime for Muhurta (auspicious timing).",
357
+ {
358
+ datetime: z.string().optional(),
359
+ timezone: z.string().optional(),
360
+ event_type: z.string().optional(),
361
+ },
362
+ async (args) => jsonContent(await callRemote("get_muhurta", args)),
363
+ );
364
+
365
+ server.tool(
366
+ "get_best_muhurta",
367
+ "Find top 5 auspicious Muhurta windows in a date range.",
368
+ {
369
+ start_datetime: z.string(),
370
+ end_datetime: z.string(),
371
+ timezone: z.string().optional(),
372
+ latitude: z.number().optional(),
373
+ longitude: z.number().optional(),
374
+ event_type: z.string().optional(),
375
+ },
376
+ async (args) => jsonContent(await callRemote("get_best_muhurta", args)),
377
+ );
378
+
379
+ server.tool(
380
+ "get_avasthas",
381
+ "Get planetary Avasthas (9 states + Baladi Avasthas).",
382
+ standardBirthInput,
383
+ async (args) => jsonContent(await callRemote("get_avasthas", args)),
384
+ );
385
+
386
+ server.tool(
387
+ "get_upagrahas",
388
+ "Get Upagrahas (shadow sub-planets): Gulika, Mandi, Dhuma, etc.",
389
+ standardBirthInput,
390
+ async (args) => jsonContent(await callRemote("get_upagrahas", args)),
391
+ );
392
+
393
+ server.tool(
394
+ "get_gandanta",
395
+ "Check Gandanta zones (water-fire junctions).",
396
+ standardBirthInput,
397
+ async (args) => jsonContent(await callRemote("get_gandanta", args)),
398
+ );
399
+
400
+ server.tool(
401
+ "get_kartari",
402
+ "Check Kartari Yoga (hemmed between benefics/malefics).",
403
+ standardBirthInput,
404
+ async (args) => jsonContent(await callRemote("get_kartari", args)),
405
+ );
406
+
407
+ server.tool(
408
+ "get_nakshatra_analysis",
409
+ "Get deep Nakshatra information for each planet.",
410
+ { ...standardBirthInput, nakshatra_name: z.string().optional() },
411
+ async (args) => jsonContent(await callRemote("get_nakshatra_analysis", args)),
412
+ );
413
+
414
+ server.tool(
415
+ "get_gochara",
416
+ "Get Gochara (Vedic transit analysis).",
417
+ { ...standardBirthInput, transit_datetime: z.string().optional() },
418
+ async (args) => jsonContent(await callRemote("get_gochara", args)),
419
+ );
420
+
421
+ server.tool(
422
+ "get_bhava_chalit",
423
+ "Get Bhava Chalit chart (actual house positions).",
424
+ standardBirthInput,
425
+ async (args) => jsonContent(await callRemote("get_bhava_chalit", args)),
426
+ );
427
+
428
+ server.tool(
429
+ "get_hora",
430
+ "Get Planetary Hour (Hora) for datetime and location.",
431
+ {
432
+ datetime: z.string().optional(),
433
+ timezone: z.string().optional(),
434
+ latitude: z.number().optional(),
435
+ longitude: z.number().optional(),
436
+ },
437
+ async (args) => jsonContent(await callRemote("get_hora", args)),
438
+ );
439
+
440
+ server.tool(
441
+ "get_sudarshana_chakra",
442
+ "Get Sudarshana Chakra triple-layer chart analysis.",
443
+ standardBirthInput,
444
+ async (args) => jsonContent(await callRemote("get_sudarshana_chakra", args)),
445
+ );
446
+
447
+ server.tool(
448
+ "get_ashtottari_dasha",
449
+ "Get Ashtottari Dasha (108-year, 8-planet cycle).",
450
+ standardBirthInput,
451
+ async (args) => jsonContent(await callRemote("get_ashtottari_dasha", args)),
452
+ );
453
+
454
+ server.tool(
455
+ "get_sookshma_dasha",
456
+ "Get Sookshma Dasha (4th level of Vimshottari).",
457
+ standardBirthInput,
458
+ async (args) => jsonContent(await callRemote("get_sookshma_dasha", args)),
459
+ );
460
+
461
+ server.tool(
462
+ "get_prana_dasha",
463
+ "Get Prana Dasha (5th level of Vimshottari).",
464
+ standardBirthInput,
465
+ async (args) => jsonContent(await callRemote("get_prana_dasha", args)),
466
+ );
467
+
468
+ server.tool(
469
+ "get_char_dasha",
470
+ "Get Char Dasha (Jaimini).",
471
+ standardBirthInput,
472
+ async (args) => jsonContent(await callRemote("get_char_dasha", args)),
473
+ );
474
+
475
+ server.tool(
476
+ "get_narayana_dasha",
477
+ "Get Narayana Dasha (Jaimini).",
478
+ standardBirthInput,
479
+ async (args) => jsonContent(await callRemote("get_narayana_dasha", args)),
480
+ );
481
+
482
+ server.tool(
483
+ "get_tajaka",
484
+ "Get Tajaka analysis for Varshaphal.",
485
+ {
486
+ ...standardBirthInput,
487
+ year_of_life: z.number(),
488
+ query_latitude: z.number().optional(),
489
+ query_longitude: z.number().optional(),
490
+ query_timezone: z.string().optional(),
491
+ },
492
+ async (args) => jsonContent(await callRemote("get_tajaka", args)),
493
+ );
494
+
495
+ server.tool(
496
+ "get_nabhasha_yogas",
497
+ "Get Nabhasha Yogas (Ashrayas, Dala, Akriti).",
498
+ standardBirthInput,
499
+ async (args) => jsonContent(await callRemote("get_nabhasha_yogas", args)),
500
+ );
501
+
502
+ server.tool(
503
+ "get_arishta",
504
+ "Get Arishta Yogas (longevity assessment).",
505
+ standardBirthInput,
506
+ async (args) => jsonContent(await callRemote("get_arishta", args)),
507
+ );
508
+
509
+ server.tool(
510
+ "get_lunar_return",
511
+ "Get Lunar Return (Chandraphal).",
512
+ {
513
+ ...standardBirthInput,
514
+ target_year: z.number(),
515
+ target_month: z.number(),
516
+ query_latitude: z.number().optional(),
517
+ query_longitude: z.number().optional(),
518
+ query_timezone: z.string().optional(),
519
+ },
520
+ async (args) => jsonContent(await callRemote("get_lunar_return", args)),
521
+ );
522
+
523
+ server.tool(
524
+ "get_prasna",
525
+ "Get Prasna (Horary/Question) chart.",
526
+ {
527
+ datetime: z.string().optional(),
528
+ timezone: z.string().optional(),
529
+ latitude: z.number().optional(),
530
+ longitude: z.number().optional(),
531
+ question: z.string().optional(),
532
+ },
533
+ async (args) => jsonContent(await callRemote("get_prasna", args)),
534
+ );
535
+
536
+ server.tool(
537
+ "get_kalachakra_dasha",
538
+ "Get Kalachakra Dasha (9-group, 112-year sign-based dasha).",
539
+ standardBirthInput,
540
+ async (args) => jsonContent(await callRemote("get_kalachakra_dasha", args)),
541
+ );
542
+
543
+ server.tool(
544
+ "get_kurmachakra",
545
+ "Get Kurmachakra directional analysis.",
546
+ {
547
+ ...standardBirthInput,
548
+ current_moon_nakshatra: z.string().optional(),
549
+ event_type: z
550
+ .enum(["travel", "construction", "marriage", "general"])
551
+ .optional(),
552
+ },
553
+ async (args) => jsonContent(await callRemote("get_kurmachakra", args)),
554
+ );
555
+
556
+ server.tool(
557
+ "get_travel_direction_score",
558
+ "Score a specific travel direction for auspiciousness.",
559
+ {
560
+ ...standardBirthInput,
561
+ intended_direction: z.string(),
562
+ current_moon_nakshatra: z.string().optional(),
563
+ weekday: z
564
+ .enum([
565
+ "Sunday",
566
+ "Monday",
567
+ "Tuesday",
568
+ "Wednesday",
569
+ "Thursday",
570
+ "Friday",
571
+ "Saturday",
572
+ ])
573
+ .optional(),
574
+ },
575
+ async (args) =>
576
+ jsonContent(await callRemote("get_travel_direction_score", args)),
577
+ );
578
+
579
+ server.tool(
580
+ "get_full_kurmachakra_chart",
581
+ "Return the full Kurmachakra reference chart (all 9 directions).",
582
+ {},
583
+ async (args) =>
584
+ jsonContent(await callRemote("get_full_kurmachakra_chart", args)),
585
+ );
586
+
587
+ // ─── Start server ──────────────────────────────────────────────────────────
588
+
589
+ const transport = new StdioServerTransport();
590
+ await server.connect(transport);
@@ -0,0 +1,8 @@
1
+ # Python dependencies for the bundled Kundali calculation bridge.
2
+ # This intentionally excludes llama-cpp-python and other local-LLM/chat dependencies.
3
+ pyswisseph==2.10.3.1
4
+ timezonefinder
5
+ geopy==2.4.1
6
+ pytz
7
+ certifi>=2024.2.0
8
+ vedicastro