@sonill/nepali-dates 1.0.4 → 1.0.6
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 +80 -8
- package/dist/bin/mcp-server.js +948 -0
- package/dist/mcp-server.js +948 -0
- package/package.json +18 -5
package/README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# Nepali Dates
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@sonill/nepali-dates)
|
|
3
|
+
[](https://www.npmjs.com/package/@sonill/nepali-dates)
|
|
4
4
|
[](https://github.com/sonill/nepali-dates/actions/workflows/test.yml)
|
|
5
5
|
[](https://opensource.org/licenses/MIT)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
7
7
|
|
|
8
|
+

|
|
9
|
+
|
|
8
10
|
Community-driven, accurate Nepali calendar (Bikram Sambat) data and conversion utilities. A trustable source for Nepali date calculations with zero dependencies.
|
|
9
11
|
|
|
10
12
|
The ultimate Nepali date conversion library for developers. Convert between Bikram Sambat (BS) and Gregorian dates with 100% accurate, community-maintained calendar data. Perfect for Nepali calendar apps, date converters, and plugins. No dependencies, fully typed, and production-ready.
|
|
@@ -33,25 +35,95 @@ View website [here](https://sonill.github.io/nepali-dates/)
|
|
|
33
35
|
- **Multiple Formats**: Support for object, ISO, string, and array formats
|
|
34
36
|
- **Well-Tested**: >95% test coverage with extensive validation
|
|
35
37
|
- **Community-Driven**: Open data sources and transparent validation
|
|
38
|
+
- **AI Agent Ready**: MCP server available for Claude Code and other AI tools
|
|
36
39
|
|
|
37
40
|
## Installation
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
|
-
npm install nepali-dates
|
|
43
|
+
npm install @sonill/nepali-dates
|
|
41
44
|
```
|
|
42
45
|
|
|
43
46
|
```bash
|
|
44
|
-
yarn add nepali-dates
|
|
47
|
+
yarn add @sonill/nepali-dates
|
|
45
48
|
```
|
|
46
49
|
|
|
47
50
|
```bash
|
|
48
|
-
pnpm add nepali-dates
|
|
51
|
+
pnpm add @sonill/nepali-dates
|
|
49
52
|
```
|
|
50
53
|
|
|
54
|
+
## MCP Server for AI Agents
|
|
55
|
+
|
|
56
|
+
This package includes a built-in MCP (Model Context Protocol) server with 9 tools for AI agents to work with Nepali calendar dates.
|
|
57
|
+
|
|
58
|
+
### Setup for Claude Code
|
|
59
|
+
|
|
60
|
+
Add to `~/.claude/config.json`:
|
|
61
|
+
|
|
62
|
+
**Using npx (recommended - no installation required):**
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"mcpServers": {
|
|
67
|
+
"nepali-dates": {
|
|
68
|
+
"command": "npx",
|
|
69
|
+
"args": ["-y", "@sonill/nepali-dates", "nepali-dates-mcp"]
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Using global installation:**
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
npm install -g @sonill/nepali-dates
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"nepali-dates": {
|
|
85
|
+
"command": "nepali-dates-mcp"
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Setup for Claude Desktop
|
|
92
|
+
|
|
93
|
+
Add the same configuration to your Claude Desktop config file:
|
|
94
|
+
|
|
95
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
96
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
97
|
+
- **Linux:** `~/.config/Claude/claude_desktop_config.json`
|
|
98
|
+
|
|
99
|
+
After configuration, restart your AI agent and ask questions like:
|
|
100
|
+
|
|
101
|
+
- "What is today's date in Nepali calendar?"
|
|
102
|
+
- "Convert BS 2081/01/15 to English date"
|
|
103
|
+
- "Show me the calendar for Baisakh 2081"
|
|
104
|
+
|
|
105
|
+
### Available Tools
|
|
106
|
+
|
|
107
|
+
- `convert_bs_to_ad`, `convert_ad_to_bs` - Date conversion
|
|
108
|
+
- `get_month_calendar`, `get_year_calendar` - Calendar generation
|
|
109
|
+
- `validate_bs_date`, `validate_ad_date` - Date validation
|
|
110
|
+
- `navigate_month`, `get_nepali_month_name` - Navigation & localization
|
|
111
|
+
- `get_current_nepali_date` - Get today's BS date
|
|
112
|
+
|
|
113
|
+
### Testing
|
|
114
|
+
|
|
115
|
+
Test the MCP server with the visual inspector:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npx @modelcontextprotocol/inspector npx @sonill/nepali-dates nepali-dates-mcp
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
For detailed MCP documentation, see [docs/MCP.md](docs/MCP.md).
|
|
122
|
+
|
|
51
123
|
## Quick Start
|
|
52
124
|
|
|
53
125
|
```typescript
|
|
54
|
-
import { bsToAd, adToBs, getTotalDaysInMonth } from 'nepali-dates';
|
|
126
|
+
import { bsToAd, adToBs, getTotalDaysInMonth } from '@sonill/nepali-dates';
|
|
55
127
|
|
|
56
128
|
// Convert Nepali date to English date
|
|
57
129
|
const englishDate = bsToAd(2080, 10, 15);
|
|
@@ -383,9 +455,9 @@ Thanks to all contributors and the Nepali developer community for maintaining ac
|
|
|
383
455
|
|
|
384
456
|
## Links
|
|
385
457
|
|
|
386
|
-
- [GitHub Repository](https://github.com/
|
|
387
|
-
- [Issue Tracker](https://github.com/
|
|
388
|
-
- [NPM Package](https://www.npmjs.com/package/nepali-dates)
|
|
458
|
+
- [GitHub Repository](https://github.com/sonill/nepali-dates)
|
|
459
|
+
- [Issue Tracker](https://github.com/sonill/nepali-dates/issues)
|
|
460
|
+
- [NPM Package](https://www.npmjs.com/package/@sonill/nepali-dates)
|
|
389
461
|
|
|
390
462
|
---
|
|
391
463
|
|