The MCP Time Server is a tool that implements the Model Context Protocol (MCP) standard, allowing AI assistants to work with time and date operations. It enables time manipulation, timezone conversions, and natural language time parsing through a standardized interface.
Configure your MCP client with this JSON configuration to use the Docker image:
{
"mcpServers": {
"time": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"theo01/mcp-time:latest"
]
}
}
}
Configure your MCP client with this simple JSON configuration if you have the binary installed:
{
"mcpServers": {
"time": {
"command": "mcp-time"
}
}
}
# Replace OS-ARCH with your operating system and architecture (e.g., linux-amd64, darwin-arm64)
curl -Lo mcp-time https://github.com/TheoBrigitte/mcp-time/releases/latest/download/mcp-time.OS-ARCH
install -D -m 755 ./mcp-time ~/.local/bin/mcp-time
go install github.com/TheoBrigitte/mcp-time/cmd/mcp-time@latest
git clone https://github.com/TheoBrigitte/mcp-time.git
cd mcp-time
make install
Start the server using the default stdio transport:
mcp-time
Start with HTTP stream transport:
mcp-time --transport stream --address "http://localhost:8080/mcp"
The server supports several configuration options:
$ mcp-time --help
An MCP (Model Context Protocol) server which provides utilities to work with time and dates.
Usage:
mcp-time [flags]
Flags:
--address string Listen address for Stream HTTP Server (only for --transport stream) (default "http://localhost:8080/mcp")
-h, --help help for mcp-time
--log-file string Path to log file (logs is disabled if not specified)
-t, --transport string Transport layer: stdio, stream. (default "stdio")
--version Print version information and exit
Get a time based on natural language expressions.
Parameters:
text
(required): Natural language expression (e.g., "yesterday", "5 minutes ago")time
(optional): Reference time (defaults to current time)timezone
(optional): Target timezoneformat
(optional): Output time formatConvert time between different timezones.
Parameters:
time
(required): Input time stringinput_timezone
(optional): Source timezoneoutput_timezone
(optional): Target timezoneformat
(optional): Output formatGet the current time in a specified format and timezone.
Parameters:
format
(optional): Output format (predefined or custom)timezone
(optional): Target timezone (defaults to UTC)Add or subtract durations from a given time.
Parameters:
time
(required): Input time stringduration
(required): Duration to add or subtract (e.g., "2h30m", "-1h")timezone
(optional): Target timezoneformat
(optional): Output formatCompare two different times.
Parameters:
time_a
(required): First time to comparetime_b
(required): Second time to compareReturns:
-1
if time_a is before time_b0
if times are equal1
if time_a is after time_bTo add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "time" '{"command":"docker","args":["run","--rm","-i","theo01/mcp-time:latest"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"time": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"theo01/mcp-time:latest"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"time": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"theo01/mcp-time:latest"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect