UNPKG

@upamune/chrono-mcp

Version:

MCP server for parsing natural language dates using chrono-node

94 lines (67 loc) 1.34 kB
# @upamune/chrono-mcp MCP server for parsing natural language dates using chrono-node. ## Installation No installation required! Use directly with npx: ```bash npx -y @upamune/chrono-mcp ``` ## Configuration ### MCP Client Setup Add to your MCP client configuration: ```json { "mcpServers": { "chrono": { "command": "npx", "args": ["-y", "@upamune/chrono-mcp"], "env": { "CHRONO_MCP_TIMEZONE": "Asia/Tokyo" } } } } ``` ### Environment Variables - `CHRONO_MCP_TIMEZONE`: Default timezone (defaults to UTC) ## Usage The server provides a single tool: ### parse_date Parses natural language date/time expressions in English. **Parameters:** - `text` (required): Text containing date/time expression - `timezone` (optional): Override default timezone - `referenceDate` (optional): Reference date for relative parsing (ISO 8601 format) **Response:** ```json { "text": "tomorrow at 3pm", "date": "2024-01-16T15:00:00.000Z" } ``` On error or no match: ```json { "text": "", "date": null } ``` **Examples:** - "tomorrow at 3pm" - "next Friday" - "March 15, 2024" - "in 2 hours" - "end of next month" - "3 days ago" ## Development ```bash # Install dependencies bun install # Run tests bun test # Build bun run build # Run locally bun run dist/index.js ``` ## License MIT