Skip to main content
Glama

Time & Location MCP Server

by SergeSerb2
  • Apple
  • Linux

Time & Location MCP Server

An MCP (Model Context Protocol) server that automatically detects and provides your current time and location information.

Features

  • Auto-detection: Automatically detects your system timezone and location
  • get_current_time: Returns current date/time in your local timezone
  • get_location: Returns your location based on IP geolocation

Setup & Running

Using Docker Compose

# Build and run (will auto-detect timezone and location) docker-compose up --build # Run in background docker-compose up -d # Override location if needed CITY="Seattle" PROVINCE="WA" COUNTRY="USA" docker-compose up

Manual Docker Build

# Build image docker build -t time-mcp-server . # Run with timezone mounting docker run -it \ -v /etc/localtime:/etc/localtime:ro \ -v /etc/timezone:/etc/timezone:ro \ time-mcp-server

MCP Client Configuration

For Cursor

  1. Open Cursor Settings (Cmd+, on Mac or Ctrl+, on Windows/Linux)
  2. Search for "Model Context Protocol" or navigate to Features > Beta
  3. Enable MCP if not already enabled
  4. Add this configuration:
{ "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" ] } } }

For Zed

  1. Open Zed settings (Cmd+, on Mac)
  2. Add to your settings.json:
{ "assistant": { "version": "2", "provider": { "name": "anthropic" }, "mcp": { "servers": { "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" ] } } } } }

Note: Make sure the Docker container is built first with docker-compose build

Tools Available

  1. get_current_time
    • Automatically detects your system timezone
    • Returns current time with timezone info
    • Includes ISO format, Unix timestamp, and UTC offset
  2. get_location
    • Uses IP-based geolocation (requires internet)
    • Falls back to environment variables if set
    • Returns city, province/state, country, and coordinates

Environment Variables (Optional)

Override auto-detection by setting these variables:

  • TZ: Timezone (e.g., "America/New_York")
  • CITY: Your city
  • PROVINCE: Your province/state
  • COUNTRY: Your country
  • LATITUDE: Latitude coordinate
  • LONGITUDE: Longitude coordinate
-
security - not tested
F
license - not found
-
quality - not tested

An MCP server that automatically detects and provides current time and location information based on system timezone and IP geolocation.

  1. Features
    1. Setup & Running
      1. Using Docker Compose
      2. Manual Docker Build
    2. MCP Client Configuration
      1. For Cursor
      2. For Zed
    3. Tools Available
      1. Environment Variables (Optional)

        Related MCP Servers

        • -
          security
          A
          license
          -
          quality
          An MCP server that allows checking local time on the client machine or current UTC time from an NTP server
          Last updated -
          18
          Python
          MIT License
          • Apple
        • -
          security
          F
          license
          -
          quality
          An MCP server providing timezone conversions and time-related operations via RESTful API endpoints, featuring comprehensive error handling and timezone database integration.
          Last updated -
          Python
        • A
          security
          A
          license
          A
          quality
          A TypeScript server implementing the Model Context Protocol (MCP) that provides datetime and timezone information to AI agents and chat interfaces, allowing them to access current time in various timezones.
          Last updated -
          4
          5
          2
          TypeScript
          Mozilla Public License 2.0
        • -
          security
          A
          license
          -
          quality
          A lightweight mcp server that tells you exactly what time is it based on your IP.
          Last updated -
          8
          Python
          MIT License

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/SergeSerb2/time_mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server