Extract dates and timestamps from logs, data files and code, with their format and position.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Pull every date and timestamp out of the current file in one keystroke
Any text file β JSON, YAML, CSV, XML, TOML, Markdown, logs, HTML, JavaScript, TypeScript, Python, Go, and the rest
Useful? A star or rating is how other developers find it β β GitHub Β· β Open VSX Β· β Marketplace
Open a file, press Ctrl+Alt+D (Cmd+Alt+D on Mac), and every date in the document lands in a new editor β deduplicate, sort, analyze, convert, filter, or validate it from there. Works in VS Code and in VS Codeβbased editors like Cursor and VSCodium (installable from Open VSX).
new Date()/Date.parse()/moment()/dayjs()/DateTime.fromISO() arguments in JS/TS, including calls formatted across multiple lines| Where | What you get | Install |
|---|---|---|
| VS Code | The extraction, in your editor, on a keystroke | Marketplace |
| Cursor, VSCodium, Windsurf | The same extension | Open VSX |
| A terminal or a CI step | The same run over a whole tree, with exit codes | cargo install dates-le Β· crates.io |
| Any MCP agent, via Node | extract_dates over stdio | npx dates-le-mcp Β· npm |
| Zed | The MCP server as a context server | zed-industries/extensions#7079 (pending review) |
The same engine runs as an MCP server, so an agent can call it directly instead of you running a command.
| Editor | How |
|---|---|
| VS Code 1.101+ | Nothing to install β the extension registers extract_dates with agent mode |
| Zed | Dates-LE β pending review |
| Claude Code | claude mcp add dates-le -- npx -y dates-le-mcp |
| Cursor, Windsurf, anything else | point it at npx dates-le-mcp |
Returns every date with its notation, epoch value where resolvable, and 1-based line and column, capped at 500 by default with meta.truncated.
The server takes content and returns data β it reads no files and makes no network requests of its own. Published as dates-le-mcp on npm and as io.github.nolindnaidoo/dates-le in the MCP registry.
Most hosts read a JSON config. Add one entry:
-y skips the install prompt on first run. Pin a version if you would rather not track releases β dates-le-mcp@2.3.1.
Prefer not to go through npx on every launch? Install it once and point at the binary instead:
It speaks MCP over stdio and needs no environment variables, no API key and no configuration of its own. To check it before wiring it into anything:
That prints the tool list and exits β if you see extract_dates, the server works.
| Format | Language IDs | What gets extracted |
|---|---|---|
| JSON | json | Every recognized date pattern in the content |
| YAML | yaml, yml | Every recognized date pattern in the content |
| CSV | csv | Every recognized date pattern, cell by cell |
| XML | xml | Date patterns outside comments (inline and multiline comments are skipped) |
| Log / plain text | log, plaintext | Everything above plus YYYY-MM-DD HH:mm:ss log lines, syslog (Mon DD HH:mm:ss), and Apache access-log timestamps |
| JavaScript / TypeScript | javascript, javascriptreact, typescript, typescriptreact | Everything above plus string arguments to new Date(), Date.parse(), moment(), dayjs(), DateTime.fromISO() |
| HTML | html | Everything above plus datetime attributes, date-bearing <meta> tags, and JSON-LD datePublished/dateModified |
| TOML / Markdown | toml, markdown, md | Every recognized date pattern in the content |
| INI / properties | ini, cfg, conf, properties | Every recognized date pattern in the content |
| Anything else | every other language ID | Every recognized date pattern in the content |
Every document is read. A format only ever adds patterns to the shared ones, so a language ID this does not name β Python, Go, Rust, shell, SQL β is scanned with the shared patterns rather than refused. What it does not get is the format-specific extras: Jan 15 10:30:47 is a date in a log file and three words in a Python one.
Recognized date patterns: ISO 8601 in extended (2024-01-15T10:30:00Z, with optional milliseconds and offset), basic (20240115, 20240115T103045Z), week (2024-W03, 2024-W03-1) and ordinal (2024-015) form; RFC 2822 (Mon, 15 Jan 2024 10:30:00 GMT); Unix epochs in seconds, milliseconds, microseconds and nanoseconds (exactly 10, 13, 16 or 19 digits; everything wider than 10 must also land between 2001-09-09 and 2100, so a request id or a card number is not a date in the 2200s, and digits embedded in longer numbers or in the fraction of a float are never matched at all); UTC strings; US-style M/D/YYYY HH:mm:ss; and bare YYYY-MM-DD. Every occurrence is reported with its real line and column. Values that cannot be resolved to a timestamp are not extracted.
Timezone names are the fixed offsets GMT/UT/UTC/Z, the eight US abbreviations, and CEST, CET, BST, JST, AEST, IST. They are fixed, not zone-aware.
Known limitations: M/D/YYYY assumes US ordering; syslog lines carry no year, so the current year is assumed; IST names three different zones and is read as India's +05:30; a bare 8-digit run is only a date inside 1900β2099, and a 10-digit number in the plausible epoch range cannot be told from a phone number.
The same extraction runs from a terminal or a CI step: a Rust CLI in
crate/, sharing one corpus with the extension β
crate/fixtures/ β so the two can never read a
document differently.
The instant is the point. 2024-01-15, 1705276800 and
Mon, 15 Jan 2024 are one moment written three ways, and resolving each
to a number is what makes them sortable and comparable rather than three
strings to read. Resolution matches Date.parse in V8 exactly β legacy
parser included β against 178 cases taken from V8 itself.
A date with no timezone resolves against the machine's, because that is
the true answer and it genuinely differs by machine. TZ is honoured.
| Command | Description |
|---|---|
Dates-LE: Extract Dates (Ctrl+Alt+D / Cmd+Alt+D) | Extract all dates from the active document |
Dates-LE: Analyze Dates | Statistics, patterns, clusters, gaps, and anomalies |
Dates-LE: Convert Dates | Convert extracted dates to ISO, RFC 2822, Unix, UTC, local, simple, or a custom format |
Dates-LE: Filter Dates | Filter by range, format, duplicates, future/past |
Dates-LE: Validate Dates | Check extracted dates against selectable rules |
Dates-LE: Deduplicate Dates | Remove duplicate lines from the results |
Dates-LE: Sort Dates | Sort results chronologically or alphabetically |
Dates-LE: Open Settings | Open Dates-LE settings |
Dates-LE: Help | Built-in documentation |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/dates-le)<a href="https://allmcps.com/mcp/dates-le"><img src="https://allmcps.com/api/badge/dates-le?style=directory" alt="Dates Le on AllMCPs" /></a>