Date MCP Server
A lightweight Model Context Protocol (MCP) server that provides current date and day information to AI assistants, built with Python and uv for maximum portability.
Features
get_day_name: Returns the current day of the week (e.g., "Monday")
get_iso_date: Returns the current date in ISO 8601 format (YYYY-MM-DD)
Perfect for AI assistants like GitHub Copilot that need reliable, always-accurate date information when working on notes, documentation, or time-sensitive tasks.
Quick Start
Prerequisites
Python 3.10 or higher
uv package manager
Installation
Running the Server
Always use uv to run the server so the Python runtime is pinned by the project's environment.
Run the installed project script (preferred):
If you prefer running the module directly during development, you can still run:
The server communicates via stdio and is ready to receive MCP requests.
VS Code Integration
To use this with GitHub Copilot in VS Code, see VS_CODE_CONFIG.md for detailed setup instructions.
Project Structure
How It Works
The server uses the standard MCP Python SDK to expose two simple tools:
get_day_name(): Uses
datetime.now().strftime("%A")to return the current dayget_iso_date(): Uses
datetime.now().strftime("%Y-%m-%d")to return the current date
These tools are discovered by MCP clients and can be called by the LLM when needed.
Why This Matters
AI assistants often struggle with:
Knowing the current date
Performing date-based calculations
Adding accurate timestamps to content
By providing an MCP server with reliable date tools, your AI assistant (whether Copilot, Claude, or other MCP-compatible clients) always has access to accurate date information without relying on training data or assumptions.
Development
Adding More Tools
To add additional date tools, simply add more functions decorated with @mcp.tool():
Testing Locally
The server outputs JSON-RPC messages to stdout. For debugging, you can use the MCP debugging tools.
Interactive Testing with MCP Inspector
You can test the MCP server interactively using the official MCP Inspector tool.
Install the MCP Inspector (if not already installed):
Run the inspector and point it to your server:
This will:
Start your MCP server using the pinned
uvenvironmentLaunch a web interface (typically at http://localhost:5173)
Allow you to interactively test the tools
In the Inspector web UI, you can:
See the two available tools:
get_day_nameandget_iso_dateClick on each tool to execute it
View the responses in real-time
Inspect the JSON-RPC messages being exchanged
Alternatively, you can run the server directly and connect the inspector separately:
Portability
Built with uv for maximum portability:
Single dependency:
mcpWorks on macOS, Linux, and Windows
No system-wide installation required
Easy deployment via standard configurations
License
MIT
Resources
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Provides AI assistants with accurate current date and day of week information through simple tools for retrieving ISO-formatted dates and day names.