- Home
- MCP servers
- Time & Location
Time & Location
- other
0
GitHub Stars
other
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"sergeserb2-time_mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"/etc/localtime:/etc/localtime:ro",
"-v",
"/etc/timezone:/etc/timezone:ro",
"time_mcp-time-mcp-server"
],
"env": {
"TZ": "America/New_York",
"CITY": "Seattle",
"COUNTRY": "USA",
"LATITUDE": "47.6062",
"PROVINCE": "WA",
"LONGITUDE": "-122.3321"
}
}
}
}The Time & Location MCP Server automatically detects your current time and location, so you can query precise time data in your local timezone and IP-based location details without manual setup. It’s useful for apps and workflows that need up-to-date temporal or geographic context without hard-coding values.
How to use
You will run the MCP server in a container and connect an MCP client to request the available endpoints. The server exposes two tools: get_current_time and get_location. Use get_current_time to obtain the current date/time in your local timezone, including ISO format, Unix timestamp, and UTC offset. Use get_location to obtain city, province/state, country, and coordinates based on your IP address.
How to install
Prerequisites you need before starting: Docker is installed on your system and you have permission to run container commands.
Option 1: Run with Docker (recommended for quick setup) 1) Build and run the time-location MCP server using Docker. 2) Mount local timezone data to ensure accurate time detection.
# Run a ready-made image with timezone mounting (time-mcp-server image name from the manual build flow)
docker run -it \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
time-mcp-server
Additional notes
Environment variables let you override auto-detection if needed. You can set TZ to a specific timezone, and optionally CITY, PROVINCE, COUNTRY, LATITUDE, and LONGITUDE to predefine location data.
If you prefer to run via a Docker image labeled for MCP usage, you can also run the container with explicit time-location options as shown in the examples. The container will expose two functions you can call from your MCP client: get_current_time and get_location.
MCP endpoint configurations
Below are example configurations you can load into an MCP client to connect to the Time & Location MCP Server using Docker. Each entry uses a separate runtime method. Use the one that matches your preferred workflow.
Example configurations
{
"mcpServers": {
"time_location": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v", "/etc/localtime:/etc/localtime:ro",
"-v", "/etc/timezone:/etc/timezone:ro",
"time_mcp-time-mcp-server"
]
}
}
}
{
"mcpServers": {
"time_location_local": {
"command": "docker",
"args": [
"run",
"-it",
"-v", "/etc/localtime:/etc/localtime:ro",
"-v", "/etc/timezone:/etc/timezone:ro",
"time-mcp-server"
]
}
}
}
Available tools
get_current_time
Auto-detects system timezone and returns the current time in ISO format, Unix timestamp, and UTC offset.
get_location
Performs IP-based geolocation to return city, province/state, country, and coordinates with an internet connection.