Skip to main content
Glama
date-fns

date-fns MCP

Official
by date-fns

@date-fns/mcp

date-fns documentation MCP server.

🚧 Work in progress, follow for updates on Twitter or Bluesky

Running

VS Code

To connect the VS Code, add the following lines to your .vscode/mcp.json replacing npx with your package manager command (e.g., pnpm or yarn with the dlx argument):

{
  "servers": {
    "date-fns": {
      "type": "stdio",
      "command": "npx",
      "args": ["@date-fns/mcp"]
    }
  }
}

If you have @date-fns/mcp installed as a dependency, you can use npx date-fns-mcp (or pnpm date-fns-mcp/yarn date-fns-mcp) instead.

Once it's done, the MCP server will be available in the Extensions tab in the Primary Side Bar. Make sure it's started by right-clicking (or using the cog icon) and selecting Start Server in the context menu.

See the VS Code documentation on MCP servers for more details.

Claude Code

To connect the Claude Code, add the following lines to .mcp.json replacing npx with your package manager command (e.g., pnpm or yarn with the dlx argument):

{
  "mcpServers": {
    "date-fns": {
      "command": "npx",
      "args": ["@date-fns/mcp"]
    }
  }
}

If you have @date-fns/mcp installed as a dependency, you can use npx date-fns-mcp (or pnpm date-fns-mcp/yarn date-fns-mcp) instead.

Alternatively, you can use CLI to add it to the user scope:

claude mcp add date-fns --scope user npx @date-fns/mcp

Claude Desktop

To connect the Claude Desktop, add the following lines to the configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows), replacing npx with your package manager command (e.g., pnpx or yarn with dlx argument):

{
  "mcpServers": {
    "date-fns": {
      "command": "npx",
      "args": ["@date-fns/mcp"]
    }
  }
}

Make sure to restart the app, to apply the changes. You can verify it is connected by going into Settings > Connectors. It should list date-fns as a local dev connector.

See the Claude documentation on MCP servers for more details.

Dev Container

When running the project in a dev container, you can use docker to run the stdio server.

First, get the container name:

docker ps --format "table {{.Names}}\t{{.Image}}"

It would print a table looking like this:

NAMES        IMAGE
eager_wing   vsc-date-fns-edf43f8ea15ab083575b80286e19288104a196412032ae9caa7e1f2ad451d6be-uid

Grab the container name, then to verify if everything is set up, run the command, replacing eager_wing with your container name and /wrkspc/date-fns-mcp with the path to the MCP repo:

docker exec -it eager_wing bash -lc 'cd /wrkspc/date-fns-mcp && eval "$(mise activate bash --shims)" && node ./src/bin.ts'

You should see ⭐️ date-fns MCP Server running on stdio.

If you run the main date-fns repo dev container, the path could be /wrkspc/date-fns/submodules/mcp (depending on the repo directory name where you have it cloned):

docker exec -it eager_wing bash -lc 'cd /wrkspc/date-fns/submodules/mcp && eval "$(mise activate bash --shims)" && node ./src/bin.ts'

Connecting to Claude Desktop

To connect the Claude Desktop to the MCP running in a dev container, adjust your configuration, replacing the name (i.e., eager_wing) and the path to the repo (i.e., /wrkspc/date-fns-mcp):

{
  "globalShortcut": "Alt+Ctrl+Space",
  "mcpServers": {
    "date-fns": {
      "command": "docker",
      "args": [
        "exec",
        "-i",
        "eager_wing",
        "bash",
        "-lc",
        "cd /wrkspc/date-fns-mcp && eval \"$(mise activate bash --shims)\" && node ./src/bin.ts"
      ]
    }
  }
}

Related MCP server: mcp-datetimeday

License

MIT © Sasha Koss

Available Tools

1 tool
list_fnsC

List available functions

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It only states what the tool does ('List available functions') without disclosing behavioral traits like whether it's read-only, what format the output is in, or if there are any limitations (e.g., pagination). This leaves significant gaps in understanding how the tool behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description 'List available functions' is extremely concise and front-loaded, with no wasted words. It efficiently conveys the core purpose in a single phrase, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations, no output schema, and a simple purpose, the description is incomplete. It lacks details on what 'functions' are, the output format, or any behavioral context, making it insufficient for an AI agent to fully understand how to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, meaning no parameters are documented in the schema. The description doesn't add parameter details since there are none, which is appropriate. Baseline is 4 for 0 parameters as per the rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'List available functions' states a clear action ('List') and resource ('available functions'), but it's somewhat vague about what 'functions' refers to in this context. Without sibling tools, differentiation isn't needed, but the purpose could be more specific (e.g., 'List all functions in the current workspace').

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool, such as prerequisites, typical use cases, or alternatives. With no sibling tools, it doesn't need to distinguish from others, but it lacks any context for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • Changedlist_fns1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  2. 1 tool update
    • First observedlist_fns

TDQS

B3/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'list_fns' has a clear and distinct purpose of listing available functions, so an agent cannot misselect between non-existent alternatives.

Naming Consistency5/5

The single tool name 'list_fns' follows a consistent verb_noun pattern (list + fns). Since there is only one tool, there is no inconsistency to evaluate, and the naming is predictable and readable.

Tool Count2/5

The server 'date-fns MCP' suggests a domain related to date functions, but with only one tool ('list_fns'), the scope is extremely limited. This feels too thin for a typical date utility server, as it lacks tools for actual date operations (e.g., formatting, parsing, calculations), making it inappropriate for comprehensive use.

Completeness1/5

The tool set is severely incomplete for the inferred domain of date functions. While 'list_fns' provides a catalog, there are no tools to perform any date-related operations (e.g., add_days, format_date, parse_date), creating significant gaps that will cause agent failures in handling date tasks.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables date and time operations including formatting, arithmetic, comparisons, and duration calculations using date-fns library. Provides tools for getting current time, adding/subtracting durations, finding differences between dates, and comparing dates.
    5 npm
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A lightweight MCP server providing comprehensive date, time, and day-of-week information. It supports relative time calculations, timezone conversions, and detailed calendar metadata like week numbers and quarters.
    5
    1
    MIT
  • A
    license
    A
    quality
    F
    maintenance
    MCP server providing various date/time functions including current time, timezone conversion, and relative time calculations. Supports both local stdio and remote HTTP access via Cloudflare Workers.
    6
    476 npm
    2
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables users to perform date arithmetic, compute differences, add durations, and retrieve calendar facts via natural language or direct tool calls.
    4 npm
    MIT