astrochalit-mcp 0.0.0-stage → 1.0.0

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.
package/README.md CHANGED
@@ -1,3 +1,74 @@
1
- # Temporary Holding Version
1
+ # AstroChalit MCP Server
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This is a Model Context Protocol (MCP) server that provides AI assistants (like Claude Desktop and Cursor) native access to the **AstroChalit API**.
4
+
5
+ By installing this MCP server, your AI assistant can automatically pull real-time Vedic astrology data, including daily horoscopes for any zodiac sign.
6
+
7
+ ## Prerequisites
8
+
9
+ - Node.js (v18 or higher)
10
+ - An active AstroChalit API Key
11
+
12
+ ## Installation & Configuration
13
+
14
+ ### For Claude Desktop
15
+
16
+ 1. Open your Claude Desktop configuration file:
17
+ - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
18
+ - Windows: `%APPDATA%\Claude\claude_desktop_config.json`
19
+
20
+ 2. Add the `astrochalit` server to your `mcpServers` object. Replace `YOUR_API_KEY_HERE` with your actual AstroChalit API key:
21
+
22
+ ```json
23
+ {
24
+ "mcpServers": {
25
+ "astrochalit": {
26
+ "command": "npx",
27
+ "args": ["-y", "astrochalit-mcp-server"],
28
+ "env": {
29
+ "ASTROCHALIT_API_KEY": "YOUR_API_KEY_HERE"
30
+ }
31
+ }
32
+ }
33
+ }
34
+ ```
35
+
36
+ 3. Restart Claude Desktop.
37
+
38
+ ## Usage
39
+
40
+ Once configured, simply ask Claude to use the tool. For example:
41
+ - *"What is the daily horoscope for Aries?"*
42
+ - *"Can you get the horoscope for Leo and summarize the career advice?"*
43
+
44
+ Claude will automatically execute the `get_horoscope` tool, fetch the real-time data from the AstroChalit backend, and provide you with a personalized response.
45
+
46
+ ## Development
47
+
48
+ If you want to run this server locally from the source code:
49
+
50
+ 1. Clone the repository
51
+ 2. Run `npm install`
52
+ 3. Run `npm run build`
53
+ 4. Test the execution:
54
+ ```bash
55
+ ASTROCHALIT_API_KEY=test_key node build/index.js
56
+ ```
57
+
58
+ ## Available Tools
59
+
60
+ This MCP server dynamically registers our suite of astrology tools by directly mirroring the AstroChalit backend endpoints.
61
+
62
+ Key tool categories include:
63
+ - **Horoscope**: `get_horoscope`
64
+ - **Panchang & Muhurta**: `get_panchang`, `get_chaugadiya_muhurta`, `get_hora_muhurta`
65
+ - **Matchmaking (Ashtakoot & Dashakoot)**: `get_ashtakoot`, `get_dashakoot`, `get_match_birthchart`
66
+ - **Divisional Charts**: `get_divisional_chart_d1` through `get_divisional_chart_d60`
67
+ - **Varshphal (Annual)**: `get_varshphal_details`, `get_varshphal_year_chart`, `get_varshphal_month_chart`, etc.
68
+ - **Doshas**: `get_manglik_report`, `get_sadesati_dosha`, `get_kaalsarp_dosha`, `get_pitru_dosha`
69
+ - **Numerology**: `get_numerologyreport`, `get_numerologynumbers`, `get_lifepath_prediction`
70
+ - **KP Astrology**: `get_kp_planets`, `get_kp_house_cups`, `get_kp_significators`
71
+ - **Planetary Calculations**: `get_planetary_position`, `get_planet_aspects`, `get_moon_phases`
72
+ - **Remedies**: `get_rudraksha_suggestion`, `get_gemstone_suggestion`
73
+
74
+ Most tools require a standard set of parameters including `day`, `month`, `year`, `hour`, `minute`, `second`, `latitude`, and `longitude`. Matchmaking tools require these details for both male (`m_day`, etc.) and female (`f_day`, etc.).
@@ -0,0 +1,580 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.endpoints = void 0;
4
+ const schemas_1 = require("./schemas");
5
+ exports.endpoints = [
6
+ {
7
+ name: "get_divisional_chart_d1",
8
+ method: "POST",
9
+ path: "/divitionalcharts/d1",
10
+ schema: schemas_1.birthDetailsSchema,
11
+ description: "Execute d1chart AstroChalit API"
12
+ },
13
+ {
14
+ name: "get_divisional_chart_d2",
15
+ method: "POST",
16
+ path: "/divitionalcharts/d2",
17
+ schema: schemas_1.birthDetailsSchema,
18
+ description: "Execute d2chart AstroChalit API"
19
+ },
20
+ {
21
+ name: "get_divisional_chart_d3",
22
+ method: "POST",
23
+ path: "/divitionalcharts/d3",
24
+ schema: schemas_1.birthDetailsSchema,
25
+ description: "Execute d3chart AstroChalit API"
26
+ },
27
+ {
28
+ name: "get_divisional_chart_d4",
29
+ method: "POST",
30
+ path: "/divitionalcharts/d4",
31
+ schema: schemas_1.birthDetailsSchema,
32
+ description: "Execute d4chart AstroChalit API"
33
+ },
34
+ {
35
+ name: "get_divisional_chart_d5",
36
+ method: "POST",
37
+ path: "/divitionalcharts/d5",
38
+ schema: schemas_1.birthDetailsSchema,
39
+ description: "Execute d5chart AstroChalit API"
40
+ },
41
+ {
42
+ name: "get_divisional_chart_d6",
43
+ method: "POST",
44
+ path: "/divitionalcharts/d6",
45
+ schema: schemas_1.birthDetailsSchema,
46
+ description: "Execute d6chart AstroChalit API"
47
+ },
48
+ {
49
+ name: "get_divisional_chart_d7",
50
+ method: "POST",
51
+ path: "/divitionalcharts/d7",
52
+ schema: schemas_1.birthDetailsSchema,
53
+ description: "Execute d7chart AstroChalit API"
54
+ },
55
+ {
56
+ name: "get_divisional_chart_d8",
57
+ method: "POST",
58
+ path: "/divitionalcharts/d8",
59
+ schema: schemas_1.birthDetailsSchema,
60
+ description: "Execute d8chart AstroChalit API"
61
+ },
62
+ {
63
+ name: "get_divisional_chart_d9",
64
+ method: "POST",
65
+ path: "/divitionalcharts/d9",
66
+ schema: schemas_1.birthDetailsSchema,
67
+ description: "Execute d9chart AstroChalit API"
68
+ },
69
+ {
70
+ name: "get_divisional_chart_d10",
71
+ method: "POST",
72
+ path: "/divitionalcharts/d10",
73
+ schema: schemas_1.birthDetailsSchema,
74
+ description: "Execute d10chart AstroChalit API"
75
+ },
76
+ {
77
+ name: "get_divisional_chart_d11",
78
+ method: "POST",
79
+ path: "/divitionalcharts/d11",
80
+ schema: schemas_1.birthDetailsSchema,
81
+ description: "Execute d11chart AstroChalit API"
82
+ },
83
+ {
84
+ name: "get_divisional_chart_d12",
85
+ method: "POST",
86
+ path: "/divitionalcharts/d12",
87
+ schema: schemas_1.birthDetailsSchema,
88
+ description: "Execute d12chart AstroChalit API"
89
+ },
90
+ {
91
+ name: "get_divisional_chart_d16",
92
+ method: "POST",
93
+ path: "/divitionalcharts/d16",
94
+ schema: schemas_1.birthDetailsSchema,
95
+ description: "Execute d16chart AstroChalit API"
96
+ },
97
+ {
98
+ name: "get_divisional_chart_d20",
99
+ method: "POST",
100
+ path: "/divitionalcharts/d20",
101
+ schema: schemas_1.birthDetailsSchema,
102
+ description: "Execute d20chart AstroChalit API"
103
+ },
104
+ {
105
+ name: "get_divisional_chart_d24",
106
+ method: "POST",
107
+ path: "/divitionalcharts/d24",
108
+ schema: schemas_1.birthDetailsSchema,
109
+ description: "Execute d24chart AstroChalit API"
110
+ },
111
+ {
112
+ name: "get_divisional_chart_d27",
113
+ method: "POST",
114
+ path: "/divitionalcharts/d27",
115
+ schema: schemas_1.birthDetailsSchema,
116
+ description: "Execute d27chart AstroChalit API"
117
+ },
118
+ {
119
+ name: "get_divisional_chart_d30",
120
+ method: "POST",
121
+ path: "/divitionalcharts/d30",
122
+ schema: schemas_1.birthDetailsSchema,
123
+ description: "Execute d30chart AstroChalit API"
124
+ },
125
+ {
126
+ name: "get_divisional_chart_d40",
127
+ method: "POST",
128
+ path: "/divitionalcharts/d40",
129
+ schema: schemas_1.birthDetailsSchema,
130
+ description: "Execute d40chart AstroChalit API"
131
+ },
132
+ {
133
+ name: "get_divisional_chart_d45",
134
+ method: "POST",
135
+ path: "/divitionalcharts/d45",
136
+ schema: schemas_1.birthDetailsSchema,
137
+ description: "Execute d45chart AstroChalit API"
138
+ },
139
+ {
140
+ name: "get_divisional_chart_d60",
141
+ method: "POST",
142
+ path: "/divitionalcharts/d60",
143
+ schema: schemas_1.birthDetailsSchema,
144
+ description: "Execute d60chart AstroChalit API"
145
+ },
146
+ {
147
+ name: "get_divisional_chart_d601",
148
+ method: "POST",
149
+ path: "/divitionalcharts/d601",
150
+ schema: schemas_1.birthDetailsSchema,
151
+ description: "Execute d601chart AstroChalit API"
152
+ },
153
+ {
154
+ name: "get_biorhythm",
155
+ method: "POST",
156
+ path: "/biorhythm",
157
+ schema: schemas_1.biorhythmSchema,
158
+ description: "Execute biorhythm AstroChalit API"
159
+ },
160
+ {
161
+ name: "get_panchang",
162
+ method: "POST",
163
+ path: "/panchang",
164
+ schema: schemas_1.panchangSchema,
165
+ description: "Execute panchang AstroChalit API"
166
+ },
167
+ {
168
+ name: "get_kp_planets",
169
+ method: "POST",
170
+ path: "/kp_planets",
171
+ schema: schemas_1.birthDetailsSchema,
172
+ description: "Execute kp_planets AstroChalit API"
173
+ },
174
+ {
175
+ name: "get_kp_birth",
176
+ method: "POST",
177
+ path: "/kp_birth",
178
+ schema: schemas_1.birthDetailsSchema,
179
+ description: "Execute kp_birth AstroChalit API"
180
+ },
181
+ {
182
+ name: "get_kp_significators",
183
+ method: "POST",
184
+ path: "/kp_significators",
185
+ schema: schemas_1.birthDetailsSchema,
186
+ description: "Execute kp_significators AstroChalit API"
187
+ },
188
+ {
189
+ name: "get_kp_planet_significators",
190
+ method: "POST",
191
+ path: "/kp_planet_significators",
192
+ schema: schemas_1.birthDetailsSchema,
193
+ description: "Execute kp_planet_significators AstroChalit API"
194
+ },
195
+ {
196
+ name: "get_kp_house_significators",
197
+ method: "POST",
198
+ path: "/kp_house_significators",
199
+ schema: schemas_1.birthDetailsSchema,
200
+ description: "Execute kp_house_significators AstroChalit API"
201
+ },
202
+ {
203
+ name: "get_kp_house_cups",
204
+ method: "POST",
205
+ path: "/kp_house_cups",
206
+ schema: schemas_1.birthDetailsSchema,
207
+ description: "Execute kp_house_cups AstroChalit API"
208
+ },
209
+ {
210
+ name: "get_jamini",
211
+ method: "POST",
212
+ path: "/jamini",
213
+ schema: schemas_1.birthDetailsSchema,
214
+ description: "Execute jamini AstroChalit API"
215
+ },
216
+ {
217
+ name: "get_char_maha_dasha",
218
+ method: "POST",
219
+ path: "/char_maha_dasha",
220
+ schema: schemas_1.birthDetailsSchema,
221
+ description: "Execute char_maha_dasha AstroChalit API"
222
+ },
223
+ {
224
+ name: "get_char_antar_dasha",
225
+ method: "POST",
226
+ path: "/char_antar_dasha",
227
+ schema: schemas_1.charAntarDashaSchema,
228
+ description: "Execute char_antar_dasha AstroChalit API"
229
+ },
230
+ {
231
+ name: "get_char_pratyantar_dasha",
232
+ method: "POST",
233
+ path: "/char_pratyantar_dasha",
234
+ schema: schemas_1.charPratyantarDashaSchema,
235
+ description: "Execute char_pratyantar_dasha AstroChalit API"
236
+ },
237
+ {
238
+ name: "get_bhinnaashtakvarga",
239
+ method: "POST",
240
+ path: "/bhinna_ashtakvarga",
241
+ schema: schemas_1.bhinnaAshtakvargaSchema,
242
+ description: "Execute bhinnaAshtakVarga AstroChalit API"
243
+ },
244
+ {
245
+ name: "get_sarvashtakvarga",
246
+ method: "POST",
247
+ path: "/sarvashtakvarga",
248
+ schema: schemas_1.birthDetailsSchema,
249
+ description: "Execute sarvashtakvarga AstroChalit API"
250
+ },
251
+ {
252
+ name: "get_dashakoot",
253
+ method: "POST",
254
+ path: "/dashakoot",
255
+ schema: schemas_1.matchmakingSchema,
256
+ description: "Execute dashaKoot AstroChalit API"
257
+ },
258
+ {
259
+ name: "get_ashtakoot",
260
+ method: "POST",
261
+ path: "/ashtakoot",
262
+ schema: schemas_1.matchmakingSchema,
263
+ description: "Execute ashtaKoot AstroChalit API"
264
+ },
265
+ {
266
+ name: "get_manglik_report",
267
+ method: "POST",
268
+ path: "/manglik_report",
269
+ schema: schemas_1.matchmakingSchema,
270
+ description: "Execute manglik_report AstroChalit API"
271
+ },
272
+ {
273
+ name: "get_match_birthchart",
274
+ method: "POST",
275
+ path: "/match_birth_chart",
276
+ schema: schemas_1.matchmakingSchema,
277
+ description: "Execute match_birthChart AstroChalit API"
278
+ },
279
+ {
280
+ name: "get_numerologyreport",
281
+ method: "POST",
282
+ path: "/numerology_report",
283
+ schema: schemas_1.numerologySchema,
284
+ description: "Execute numerologyReport AstroChalit API"
285
+ },
286
+ {
287
+ name: "get_radical_prediction",
288
+ method: "POST",
289
+ path: "/radical_prediction",
290
+ schema: schemas_1.numerologySchema,
291
+ description: "Execute radical_prediction AstroChalit API"
292
+ },
293
+ {
294
+ name: "get_lifepath_prediction",
295
+ method: "POST",
296
+ path: "/lifepath_prediction",
297
+ schema: schemas_1.numerologySchema,
298
+ description: "Execute lifepath_prediction AstroChalit API"
299
+ },
300
+ {
301
+ name: "get_numerology_prediction",
302
+ method: "POST",
303
+ path: "/numerology_prediction",
304
+ schema: schemas_1.numerologySchema,
305
+ description: "Execute numerology_prediction AstroChalit API"
306
+ },
307
+ {
308
+ name: "get_numerologynumbers",
309
+ method: "POST",
310
+ path: "/numerology_numbers",
311
+ schema: schemas_1.numerologySchema,
312
+ description: "Execute numerologyNumbers AstroChalit API"
313
+ },
314
+ {
315
+ name: "get_yogini_sub",
316
+ method: "POST",
317
+ path: "/yogini_sub",
318
+ schema: schemas_1.birthDetailsSchema,
319
+ description: "Execute yogini_sub AstroChalit API"
320
+ },
321
+ {
322
+ name: "get_yogini_maha",
323
+ method: "POST",
324
+ path: "/yogini_maha",
325
+ schema: schemas_1.birthDetailsSchema,
326
+ description: "Execute yogini_maha AstroChalit API"
327
+ },
328
+ {
329
+ name: "get_lalkitab_debts",
330
+ method: "POST",
331
+ path: "/lalkitab_debts",
332
+ schema: schemas_1.birthDetailsSchema,
333
+ description: "Execute lalkitab_debts AstroChalit API"
334
+ },
335
+ {
336
+ name: "get_lalkitab_chart",
337
+ method: "POST",
338
+ path: "/lalkitab_chart",
339
+ schema: schemas_1.birthDetailsSchema,
340
+ description: "Execute lalkitab_chart AstroChalit API"
341
+ },
342
+ {
343
+ name: "get_lalkitab_predictions",
344
+ method: "POST",
345
+ path: "/lalkitab_predictions",
346
+ schema: schemas_1.birthDetailsSchema,
347
+ description: "Execute lalkitab_predictions AstroChalit API"
348
+ },
349
+ {
350
+ name: "get_vimshottari_maha",
351
+ method: "POST",
352
+ path: "/vimshottari_maha",
353
+ schema: schemas_1.birthDetailsSchema,
354
+ description: "Execute vimshottari_maha AstroChalit API"
355
+ },
356
+ {
357
+ name: "get_vimshottari_pratyantar",
358
+ method: "POST",
359
+ path: "/vimshottari_pratyantar",
360
+ schema: schemas_1.vimshottariPratyantarSchema,
361
+ description: "Execute vimshottari_pratyantar AstroChalit API"
362
+ },
363
+ {
364
+ name: "get_vimshottari_sookshma",
365
+ method: "POST",
366
+ path: "/vimshottari_sookshma",
367
+ schema: schemas_1.vimshottariSookshmaSchema,
368
+ description: "Execute vimshottari_sookshma AstroChalit API"
369
+ },
370
+ {
371
+ name: "get_vimshottari_prana",
372
+ method: "POST",
373
+ path: "/vimshottari_prana",
374
+ schema: schemas_1.vimshottariPranaSchema,
375
+ description: "Execute vimshottari_prana AstroChalit API"
376
+ },
377
+ {
378
+ name: "get_vimshottari_antar",
379
+ method: "POST",
380
+ path: "/vimshottari_antar",
381
+ schema: schemas_1.vimshottariAntarSchema,
382
+ description: "Execute vimshottari_antar AstroChalit API"
383
+ },
384
+ {
385
+ name: "get_sadesati_dosha",
386
+ method: "POST",
387
+ path: "/sadesati_dosha",
388
+ schema: schemas_1.birthDetailsSchema,
389
+ description: "Execute sadeSati_dosha AstroChalit API"
390
+ },
391
+ {
392
+ name: "get_kaalsarp_dosha",
393
+ method: "POST",
394
+ path: "/kaalsarp_dosha",
395
+ schema: schemas_1.birthDetailsSchema,
396
+ description: "Execute kaalSarp_dosha AstroChalit API"
397
+ },
398
+ {
399
+ name: "get_pitru_dosha",
400
+ method: "POST",
401
+ path: "/pitru_dosha",
402
+ schema: schemas_1.birthDetailsSchema,
403
+ description: "Execute pitru_dosha AstroChalit API"
404
+ },
405
+ {
406
+ name: "get_manglik_dosha_report",
407
+ method: "POST",
408
+ path: "/manglik_dosha_report",
409
+ schema: schemas_1.birthDetailsSchema,
410
+ description: "Execute manglik_dosha_report AstroChalit API"
411
+ },
412
+ {
413
+ name: "get_varshphal_details",
414
+ method: "POST",
415
+ path: "/varshphal_details",
416
+ schema: schemas_1.varshphalDetailsSchema,
417
+ description: "Execute varshphal_details AstroChalit API"
418
+ },
419
+ {
420
+ name: "get_varshphal_year_chart",
421
+ method: "POST",
422
+ path: "/varshphal_year_chart",
423
+ schema: schemas_1.birthDetailsSchema,
424
+ description: "Execute varshphal_year_chart AstroChalit API"
425
+ },
426
+ {
427
+ name: "get_varshphal_month_chart",
428
+ method: "POST",
429
+ path: "/varshphal_month_chart",
430
+ schema: schemas_1.varshphalMonthSchema,
431
+ description: "Execute varshphal_month_chart AstroChalit API"
432
+ },
433
+ {
434
+ name: "get_varshphal_mudda_antar",
435
+ method: "POST",
436
+ path: "/varshphal_mudda_antar",
437
+ schema: schemas_1.varshphalMuddaAntarSchema,
438
+ description: "Execute varshphal_mudda_antar AstroChalit API"
439
+ },
440
+ {
441
+ name: "get_varshphal_mudda",
442
+ method: "POST",
443
+ path: "/varshphal_mudda",
444
+ schema: schemas_1.birthDetailsSchema,
445
+ description: "Execute varshphal_mudda AstroChalit API"
446
+ },
447
+ {
448
+ name: "get_varshphal_saham",
449
+ method: "POST",
450
+ path: "/varshphal_saham",
451
+ schema: schemas_1.birthDetailsSchema,
452
+ description: "Execute varshphal_saham AstroChalit API"
453
+ },
454
+ {
455
+ name: "get_varshphal_harsha_bala",
456
+ method: "POST",
457
+ path: "/varshphal_harsha_bala",
458
+ schema: schemas_1.birthDetailsSchema,
459
+ description: "Execute varshphal_harsha_bala AstroChalit API"
460
+ },
461
+ {
462
+ name: "get_get_hora_muhurta",
463
+ method: "POST",
464
+ path: "/hora_muhurta",
465
+ schema: schemas_1.muhurtaSchema,
466
+ description: "Execute get_hora_muhurta AstroChalit API"
467
+ },
468
+ {
469
+ name: "get_get_chaugadiya_muhurta",
470
+ method: "POST",
471
+ path: "/chaugadiya_muhurta",
472
+ schema: schemas_1.muhurtaSchema,
473
+ description: "Execute get_chaugadiya_muhurta AstroChalit API"
474
+ },
475
+ {
476
+ name: "get_get_bala_details",
477
+ method: "POST",
478
+ path: "/get_bala_details/:bala",
479
+ schema: schemas_1.balaSchema,
480
+ description: "Execute get_bala_details AstroChalit API"
481
+ },
482
+ {
483
+ name: "get_compatibility_check",
484
+ method: "GET",
485
+ path: "/compatibility_check",
486
+ schema: schemas_1.compatibilitySchema,
487
+ description: "Execute compatibility_check AstroChalit API"
488
+ },
489
+ {
490
+ name: "get_calculate_ephemeris",
491
+ method: "POST",
492
+ path: "/calculate_ephemeris",
493
+ schema: schemas_1.calculateEphemerisSchema,
494
+ description: "Execute calculate_ephemeris AstroChalit API"
495
+ },
496
+ {
497
+ name: "get_calculate_planet_ingress",
498
+ method: "POST",
499
+ path: "/calculate_planet_ingress",
500
+ schema: schemas_1.birthDetailsSchema,
501
+ description: "Execute calculate_planet_ingress AstroChalit API"
502
+ },
503
+ {
504
+ name: "get_planet_ingress",
505
+ method: "POST",
506
+ path: "/planet_ingress",
507
+ schema: schemas_1.planetIngressSchema,
508
+ description: "Execute planet_ingress AstroChalit API to get transit/ingress of planets into zodiac signs"
509
+ },
510
+ {
511
+ name: "get_planet_aspects",
512
+ method: "POST",
513
+ path: "/planet_aspects",
514
+ schema: schemas_1.planetAspectsSchema,
515
+ description: "Execute planet_aspects AstroChalit API to get planetary aspects for a month/year"
516
+ },
517
+ {
518
+ name: "get_moon_phases",
519
+ method: "POST",
520
+ path: "/moon_phases",
521
+ schema: schemas_1.moonPhasesSchema,
522
+ description: "Execute moon_phases AstroChalit API to get moon phases for a selected date/month"
523
+ },
524
+ {
525
+ name: "get_hindu_festivals",
526
+ method: "POST",
527
+ path: "/hindu_festivals",
528
+ schema: schemas_1.hinduFestivalsSchema,
529
+ description: "Execute hindu_festivals AstroChalit API to get festivals for a given month and year"
530
+ },
531
+ {
532
+ name: "get_planetary_position",
533
+ method: "POST",
534
+ path: "/planetary_position",
535
+ schema: schemas_1.planetaryPositionSchema,
536
+ description: "Execute planetary_position AstroChalit API"
537
+ },
538
+ {
539
+ name: "get_horoscope",
540
+ method: "GET",
541
+ path: "/horoscope/:signName",
542
+ schema: schemas_1.horoscopeSchema,
543
+ description: "Execute horoscope AstroChalit API"
544
+ },
545
+ {
546
+ name: "get_rudraksha_suggestion",
547
+ method: "POST",
548
+ path: "/rudraksha_suggestion",
549
+ schema: schemas_1.birthDetailsSchema,
550
+ description: "Execute rudraksha_suggestion AstroChalit API"
551
+ },
552
+ {
553
+ name: "get_gemstone_suggestion",
554
+ method: "POST",
555
+ path: "/gemstone_suggestion",
556
+ schema: schemas_1.birthDetailsSchema,
557
+ description: "Execute gemstone_suggestion AstroChalit API"
558
+ },
559
+ {
560
+ name: "get_sun_chart",
561
+ method: "POST",
562
+ path: "/sun_chart",
563
+ schema: schemas_1.birthDetailsSchema,
564
+ description: "Execute sun_chart AstroChalit API"
565
+ },
566
+ {
567
+ name: "get_moon_chart",
568
+ method: "POST",
569
+ path: "/moon_chart",
570
+ schema: schemas_1.birthDetailsSchema,
571
+ description: "Execute moon_chart AstroChalit API"
572
+ },
573
+ {
574
+ name: "get_searchplaceswithname",
575
+ method: "GET",
576
+ path: "/search_place",
577
+ schema: schemas_1.searchPlaceSchema,
578
+ description: "Execute searchPlacesWithName AstroChalit API"
579
+ }
580
+ ];
package/build/index.js ADDED
@@ -0,0 +1,124 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
8
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
9
+ const axios_1 = __importDefault(require("axios"));
10
+ const endpoints_1 = require("./endpoints");
11
+ const API_KEY = process.env.ASTROCHALIT_API_KEY;
12
+ if (!API_KEY) {
13
+ console.error("ASTROCHALIT_API_KEY environment variable is required.");
14
+ process.exit(1);
15
+ }
16
+ const BASE_URL = "https://service.astrochalit.com/api";
17
+ const IS_DEBUG = process.env.DEBUG === 'true';
18
+ // Simple in-memory cache to prevent redundant API calls and save quota
19
+ const cache = new Map();
20
+ const CACHE_TTL_MS = 60 * 60 * 1000; // 1 hour
21
+ // Periodically clean up expired cache entries to prevent memory leaks
22
+ setInterval(() => {
23
+ const now = Date.now();
24
+ for (const [key, value] of cache.entries()) {
25
+ if (now - value.timestamp > CACHE_TTL_MS) {
26
+ cache.delete(key);
27
+ }
28
+ }
29
+ }, CACHE_TTL_MS).unref();
30
+ /**
31
+ * Recursively prunes the API response to remove database artifacts
32
+ * and empty values. This drastically reduces the token size
33
+ * sent to the LLM, optimizing the context window and costs.
34
+ */
35
+ function pruneData(obj) {
36
+ if (Array.isArray(obj)) {
37
+ const arr = obj.map(pruneData).filter(item => item != null && (typeof item !== 'object' || Object.keys(item).length > 0));
38
+ return arr.length > 0 ? arr : undefined;
39
+ }
40
+ else if (obj !== null && typeof obj === 'object') {
41
+ const newObj = {};
42
+ for (const [k, v] of Object.entries(obj)) {
43
+ // Strip out internal database fields useless to the LLM
44
+ if (['id', '_id', '__v', 'created_at', 'updated_at', 'createdAt', 'updatedAt', 'status'].includes(k)) {
45
+ continue;
46
+ }
47
+ const prunedValue = pruneData(v);
48
+ if (prunedValue !== undefined && prunedValue !== null && prunedValue !== '') {
49
+ if (typeof prunedValue === 'object' && Object.keys(prunedValue).length === 0)
50
+ continue;
51
+ newObj[k] = prunedValue;
52
+ }
53
+ }
54
+ return newObj;
55
+ }
56
+ return obj;
57
+ }
58
+ const server = new mcp_js_1.McpServer({
59
+ name: "AstroChalit API MCP Server",
60
+ version: "1.0.0",
61
+ });
62
+ endpoints_1.endpoints.forEach((endpoint) => {
63
+ server.tool(endpoint.name, endpoint.description, endpoint.schema, async (args) => {
64
+ try {
65
+ if (IS_DEBUG) {
66
+ console.error(`[DEBUG] AI called tool: ${endpoint.name} with args:`, JSON.stringify(args));
67
+ }
68
+ const cacheKey = `${endpoint.name}_${JSON.stringify(args)}`;
69
+ const cached = cache.get(cacheKey);
70
+ // Return cached data if it exists and hasn't expired
71
+ if (cached && (Date.now() - cached.timestamp < CACHE_TTL_MS)) {
72
+ if (IS_DEBUG)
73
+ console.error(`[DEBUG] Serving ${endpoint.name} from cache (0ms)`);
74
+ return {
75
+ content: [{ type: "text", text: JSON.stringify(cached.data, null, 2) }]
76
+ };
77
+ }
78
+ let url = `${BASE_URL}/astro${endpoint.path}`;
79
+ // Handle path parameters (e.g. /horoscope/:signName)
80
+ for (const [key, value] of Object.entries(args)) {
81
+ if (url.includes(`:${key}`)) {
82
+ url = url.replace(`:${key}`, String(value));
83
+ }
84
+ }
85
+ if (IS_DEBUG)
86
+ console.error(`[DEBUG] Fetching from API: ${endpoint.method} ${url}`);
87
+ const startTime = Date.now();
88
+ const response = await (0, axios_1.default)({
89
+ method: endpoint.method.toLowerCase(),
90
+ url,
91
+ data: endpoint.method === 'POST' ? args : undefined,
92
+ params: endpoint.method === 'GET' ? args : undefined,
93
+ headers: { 'Authorization': API_KEY }
94
+ });
95
+ if (IS_DEBUG)
96
+ console.error(`[DEBUG] API Success in ${Date.now() - startTime}ms`);
97
+ // Prune the payload to save context window tokens!
98
+ const prunedData = pruneData(response.data);
99
+ // Store the pruned response in cache
100
+ cache.set(cacheKey, {
101
+ data: prunedData,
102
+ timestamp: Date.now()
103
+ });
104
+ return {
105
+ content: [{ type: "text", text: JSON.stringify(prunedData, null, 2) }]
106
+ };
107
+ }
108
+ catch (error) {
109
+ const errorMsg = error.response?.data?.message || error.message || "Unknown error occurred";
110
+ if (IS_DEBUG)
111
+ console.error(`[DEBUG] API Error in ${endpoint.name}: ${errorMsg}`);
112
+ return {
113
+ content: [{ type: "text", text: `Failed to fetch ${endpoint.name}: ${errorMsg}` }],
114
+ isError: true,
115
+ };
116
+ }
117
+ });
118
+ });
119
+ async function run() {
120
+ const transport = new stdio_js_1.StdioServerTransport();
121
+ await server.connect(transport);
122
+ console.error(`AstroChalit MCP Server running on stdio with ${endpoints_1.endpoints.length} tools`);
123
+ }
124
+ run().catch(console.error);
@@ -0,0 +1,157 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.planetaryPositionSchema = exports.calculateEphemerisSchema = exports.vimshottariPranaSchema = exports.vimshottariSookshmaSchema = exports.vimshottariPratyantarSchema = exports.vimshottariAntarSchema = exports.charPratyantarDashaSchema = exports.charAntarDashaSchema = exports.bhinnaAshtakvargaSchema = exports.compatibilitySchema = exports.muhurtaSchema = exports.panchangSchema = exports.biorhythmSchema = exports.numerologySchema = exports.hinduFestivalsSchema = exports.moonPhasesSchema = exports.planetAspectsSchema = exports.planetIngressSchema = exports.searchPlaceSchema = exports.varshphalMuddaAntarSchema = exports.varshphalMonthSchema = exports.varshphalDetailsSchema = exports.balaSchema = exports.horoscopeSchema = exports.matchmakingSchema = exports.birthDetailsSchema = exports.emptySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.emptySchema = {};
6
+ exports.birthDetailsSchema = {
7
+ day: zod_1.z.number().int().min(1).max(31).describe("Day of birth"),
8
+ month: zod_1.z.number().int().min(1).max(12).describe("Month of birth (1-12)"),
9
+ year: zod_1.z.number().int().describe("Year of birth (e.g., 1990)"),
10
+ hour: zod_1.z.number().int().min(0).max(23).describe("Hour of birth (0-23)"),
11
+ minute: zod_1.z.number().int().min(0).max(59).describe("Minute of birth (0-59)"),
12
+ second: zod_1.z.number().int().min(0).max(59).describe("Second of birth (0-59)"),
13
+ latitude: zod_1.z.number().min(-90).max(90).describe("Latitude of birth place"),
14
+ longitude: zod_1.z.number().min(-180).max(180).describe("Longitude of birth place"),
15
+ };
16
+ exports.matchmakingSchema = {
17
+ m_day: zod_1.z.number().int().min(1).max(31).describe("Male Day of birth"),
18
+ m_month: zod_1.z.number().int().min(1).max(12).describe("Male Month of birth"),
19
+ m_year: zod_1.z.number().int().describe("Male Year of birth"),
20
+ m_hour: zod_1.z.number().int().min(0).max(23).describe("Male Hour of birth"),
21
+ m_min: zod_1.z.number().int().min(0).max(59).describe("Male Minute of birth"),
22
+ m_lat: zod_1.z.number().describe("Male Latitude"),
23
+ m_lon: zod_1.z.number().describe("Male Longitude"),
24
+ f_day: zod_1.z.number().int().min(1).max(31).describe("Female Day of birth"),
25
+ f_month: zod_1.z.number().int().min(1).max(12).describe("Female Month of birth"),
26
+ f_year: zod_1.z.number().int().describe("Female Year of birth"),
27
+ f_hour: zod_1.z.number().int().min(0).max(23).describe("Female Hour of birth"),
28
+ f_min: zod_1.z.number().int().min(0).max(59).describe("Female Minute of birth"),
29
+ f_lat: zod_1.z.number().describe("Female Latitude"),
30
+ f_lon: zod_1.z.number().describe("Female Longitude"),
31
+ };
32
+ exports.horoscopeSchema = {
33
+ signName: zod_1.z.enum([
34
+ "aries", "taurus", "gemini", "cancer",
35
+ "leo", "virgo", "libra", "scorpio",
36
+ "sagittarius", "capricorn", "aquarius", "pisces"
37
+ ]).describe("The zodiac sign in lowercase"),
38
+ };
39
+ exports.balaSchema = {
40
+ ...exports.birthDetailsSchema,
41
+ bala: zod_1.z.string().describe("The bala type in the path"),
42
+ };
43
+ exports.varshphalDetailsSchema = {
44
+ ...exports.birthDetailsSchema,
45
+ yearInput: zod_1.z.number().int().describe("Target year (e.g. 2025)"),
46
+ };
47
+ exports.varshphalMonthSchema = {
48
+ ...exports.birthDetailsSchema,
49
+ monthInput: zod_1.z.number().int().min(1).max(12).describe("Target month (1-12)"),
50
+ };
51
+ exports.varshphalMuddaAntarSchema = {
52
+ ...exports.birthDetailsSchema,
53
+ mahaDashaInput: zod_1.z.string().describe("Maha dasha input name"),
54
+ };
55
+ exports.searchPlaceSchema = {
56
+ place: zod_1.z.string().describe("Name of the city or place to search (at least 4 characters, e.g. 'Delhi', 'Mumbai')"),
57
+ };
58
+ exports.planetIngressSchema = {
59
+ month: zod_1.z.number().int().min(1).max(12).describe("Month (1-12)"),
60
+ year: zod_1.z.number().int().describe("Year (2024 to 2040 available)"),
61
+ planet: zod_1.z.enum([
62
+ "All", "Sun", "Moon", "Mercury", "Venus", "Mars",
63
+ "Jupiter", "Saturn", "Uranus", "Neptune", "Pluto"
64
+ ]).default("All").describe("Planet name or 'All' to get all planetary ingresses (Default: 'All')"),
65
+ zodiacSystem: zod_1.z.enum(["Vedic", "Western"]).default("Vedic").describe("Zodiac system: 'Vedic' (Sidereal) or 'Western' (Tropical). Default: 'Vedic'"),
66
+ };
67
+ exports.planetAspectsSchema = {
68
+ month: zod_1.z.number().int().min(1).max(12).describe("Month (1-12)"),
69
+ year: zod_1.z.number().int().describe("Year (e.g. 2024 to 2040)"),
70
+ };
71
+ exports.moonPhasesSchema = {
72
+ selectedDate: zod_1.z.string().describe("Selected date in YYYY-MM-DD format (e.g. 2024-05-15)"),
73
+ };
74
+ exports.hinduFestivalsSchema = {
75
+ year: zod_1.z.number().int().describe("Year (e.g. 2024 to 2040)"),
76
+ month: zod_1.z.number().int().min(1).max(12).describe("Month (1-12)"),
77
+ language: zod_1.z.enum(["en", "hi"]).default("en").describe("Language: 'en' for English or 'hi' for Hindi. Default: 'en'"),
78
+ };
79
+ exports.numerologySchema = {
80
+ fullName: zod_1.z.string().describe("Full name of the person"),
81
+ gender: zod_1.z.enum(["Male", "Female", "Other"]).default("Male").describe("Gender of the person"),
82
+ dateOfBirth: zod_1.z.string().describe("Date of birth in YYYY-MM-DD format (e.g. 1995-05-15)"),
83
+ };
84
+ exports.biorhythmSchema = {
85
+ dob: zod_1.z.string().describe("Date of birth in YYYY-MM-DD format (e.g. 1995-05-15)"),
86
+ };
87
+ exports.panchangSchema = {
88
+ date: zod_1.z.string().describe("Date in YYYY-MM-DD format (e.g. 2026-11-04)"),
89
+ time: zod_1.z.string().default("10:30:00").describe("Time in HH:MM:SS format (e.g. 10:30:00)"),
90
+ latitude: zod_1.z.number().min(-90).max(90).describe("Latitude of the location"),
91
+ longitude: zod_1.z.number().min(-180).max(180).describe("Longitude of the location"),
92
+ timezone: zod_1.z.string().default("Asia/Kolkata").describe("Timezone (Default: 'Asia/Kolkata')"),
93
+ };
94
+ exports.muhurtaSchema = {
95
+ date: zod_1.z.string().describe("Date in YYYY-MM-DD format (e.g. 2026-11-04)"),
96
+ latitude: zod_1.z.number().min(-90).max(90).describe("Latitude of the location"),
97
+ longitude: zod_1.z.number().min(-180).max(180).describe("Longitude of the location"),
98
+ };
99
+ exports.compatibilitySchema = {
100
+ maleSign: zod_1.z.enum([
101
+ "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo",
102
+ "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"
103
+ ]).describe("Zodiac sign of the male (e.g. Aries, Leo)"),
104
+ femaleSign: zod_1.z.enum([
105
+ "Aries", "Taurus", "Gemini", "Cancer", "Leo", "Virgo",
106
+ "Libra", "Scorpio", "Sagittarius", "Capricorn", "Aquarius", "Pisces"
107
+ ]).describe("Zodiac sign of the female (e.g. Aries, Leo)"),
108
+ };
109
+ exports.bhinnaAshtakvargaSchema = {
110
+ ...exports.birthDetailsSchema,
111
+ planetInput: zod_1.z.enum([
112
+ "Sun", "Moon", "Mars", "Mercury", "Jupiter", "Venus", "Saturn", "Ascendant"
113
+ ]).default("Sun").describe("Planet name to calculate Bhinna Ashtakvarga points for"),
114
+ };
115
+ exports.charAntarDashaSchema = {
116
+ ...exports.birthDetailsSchema,
117
+ mahadasha_sign: zod_1.z.string().describe("Sign name for Mahadasha (e.g., Aries, Taurus, Gemini, Cancer, Leo, Virgo, Libra, Scorpio, Sagittarius, Capricorn, Aquarius, Pisces)"),
118
+ };
119
+ exports.charPratyantarDashaSchema = {
120
+ ...exports.birthDetailsSchema,
121
+ mahadasha_sign: zod_1.z.string().describe("Sign name for Mahadasha"),
122
+ antardasha_sign: zod_1.z.string().describe("Sign name for Antardasha"),
123
+ };
124
+ exports.vimshottariAntarSchema = {
125
+ ...exports.birthDetailsSchema,
126
+ mahaDasha: zod_1.z.string().describe("Planet name for Maha Dasha (e.g., Sun, Moon, Mars, Rahu, Jupiter, Saturn, Mercury, Ketu, Venus)"),
127
+ };
128
+ exports.vimshottariPratyantarSchema = {
129
+ ...exports.birthDetailsSchema,
130
+ mahaDasha: zod_1.z.string().describe("Planet name for Maha Dasha"),
131
+ antarDasha: zod_1.z.string().describe("Planet name for Antar Dasha"),
132
+ };
133
+ exports.vimshottariSookshmaSchema = {
134
+ ...exports.birthDetailsSchema,
135
+ mahaDasha: zod_1.z.string().describe("Planet name for Maha Dasha"),
136
+ antarDasha: zod_1.z.string().describe("Planet name for Antar Dasha"),
137
+ pratyantarDasha: zod_1.z.string().describe("Planet name for Pratyantar Dasha"),
138
+ };
139
+ exports.vimshottariPranaSchema = {
140
+ ...exports.birthDetailsSchema,
141
+ mahaDasha: zod_1.z.string().describe("Planet name for Maha Dasha"),
142
+ antarDasha: zod_1.z.string().describe("Planet name for Antar Dasha"),
143
+ pratyantarDasha: zod_1.z.string().describe("Planet name for Pratyantar Dasha"),
144
+ sookshmaDasha: zod_1.z.string().describe("Planet name for Sookshma Dasha"),
145
+ };
146
+ exports.calculateEphemerisSchema = {
147
+ selectedMonthNumber: zod_1.z.number().int().min(1).max(12).describe("Month number (1-12)"),
148
+ selectedYear: zod_1.z.number().int().describe("Year (e.g. 2024 to 2040)"),
149
+ zodiac: zod_1.z.enum(["Tropical", "Sidereal"]).default("Tropical").describe("Zodiac system (Default: 'Tropical')"),
150
+ timeZone: zod_1.z.string().default("Asia/Kolkata").describe("Timezone (Default: 'Asia/Kolkata')"),
151
+ };
152
+ exports.planetaryPositionSchema = {
153
+ ...exports.birthDetailsSchema,
154
+ name: zod_1.z.string().default("User").describe("Person's name"),
155
+ gender: zod_1.z.enum(["Male", "Female", "Other"]).default("Male").describe("Gender of person"),
156
+ place: zod_1.z.string().default("Delhi, India").describe("Birth place"),
157
+ };
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "astrochalit-mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0",
4
+ "main": "build/index.js",
5
+ "bin": {
6
+ "astrochalit-mcp": "build/index.js"
7
+ },
8
+ "scripts": {
9
+ "build": "tsc",
10
+ "start": "node build/index.js",
11
+ "prepare": "npm run build"
12
+ },
13
+ "files": [
14
+ "build",
15
+ "README.md"
16
+ ],
17
+ "keywords": [
18
+ "mcp",
19
+ "astrology",
20
+ "vedic-astrology",
21
+ "astrochalit"
22
+ ],
23
+ "author": "",
24
+ "license": "ISC",
25
+ "description": "Model Context Protocol (MCP) server for AstroChalit / Vedic Astrology API",
26
+ "dependencies": {
27
+ "@modelcontextprotocol/sdk": "^1.6.0",
28
+ "axios": "^1.8.1",
29
+ "zod": "^3.24.2"
30
+ },
31
+ "devDependencies": {
32
+ "@types/node": "^26.1.1",
33
+ "typescript": "^7.0.2"
34
+ }
35
+ }