A simple MCP (Model Context Protocol) server that provides current date and time information for Claude Code integration.
- Get today's date
- Get current date and time
- Lightweight Node.js implementation
-
Node.js: Ensure Node.js is installed on your system
- Download from nodejs.org
- Verify installation:
node --version
-
Claude Code: Install Claude Code following the official documentation
date-mcp/
├── README.md
├── package.json
├── package-lock.json
├── date-server.js
└── node_modules/
- Clone or download this repository
- Install dependencies:
npm install
# Navigate to your project directory
cd /path/to/your-project
# Add the MCP server using relative path
claude mcp add date-server -- node date-mcp/date-server.js# Navigate to your project directory
cd P:\path\to\your-project
# Add the MCP server using relative path
claude mcp add date-server -- node date-mcp/date-server.jsCreate a .claude folder in your project directory and add mcp-config.json:
{
"mcpServers": {
"date-server": {
"command": "node",
"args": ["date-mcp/date-server.js"]
}
}
}After configuration, verify the MCP server is working:
claude mcp listYou should see date-server listed with the correct path.
Once configured, the date server provides these functions in Claude Code:
get_today_date()- Returns today's date in a readable formatget_current_datetime()- Returns current date and time
- Use forward slashes in paths:
date-mcp/date-server.js - Ensure execute permissions:
chmod +x date-server.js
- Use forward slashes or escaped backslashes:
date-mcp\\date-server.js - Git Bash or WSL recommended for consistent command-line experience
- Fork the repository
- Create a feature branch
- Make your changes
- Test on both Windows and Ubuntu
- Submit a pull request
This project is open source and available under the MIT License.