Skip to main content
Glama
SergeSerb2

Time & Location MCP Server

by SergeSerb2

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

Related MCP server: whattimeisit-mcp

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

Available Tools

2 tools
get_current_timeA

Get the current date and time in your local timezone

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly indicates this is a read-only operation that returns time data, but doesn't mention potential limitations like refresh rates, system dependencies, or error conditions. It adequately describes the core behavior but lacks depth about operational constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, perfectly constructed sentence that contains all essential information with zero wasted words. It's front-loaded with the core purpose and efficiently includes the timezone specification without redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple zero-parameter tool with no annotations and no output schema, the description provides sufficient context about what the tool does and what it returns (date and time in local timezone). It could be slightly more complete by mentioning the return format or potential timezone detection behavior, but it's largely adequate for this complexity level.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters with 100% schema coverage, so the baseline is 4. The description appropriately doesn't waste space discussing non-existent parameters, maintaining focus on the tool's purpose without unnecessary parameter commentary.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Get') and resource ('current date and time'), and distinguishes it from the sibling tool 'get_location' by specifying time-related functionality rather than location. It provides complete purpose information in a concise manner.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by specifying 'in your local timezone,' which suggests when this tool should be used versus alternatives that might provide UTC or other timezone formats. However, it doesn't explicitly mention when NOT to use it or name specific alternatives, leaving some guidance gaps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_locationB

Get your current location based on IP geolocation or system settings

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the data sources (IP geolocation or system settings) but doesn't cover critical aspects like accuracy limitations, privacy implications, potential errors, or the response format. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It is appropriately sized and front-loaded, making it easy for an AI agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the return value looks like (e.g., coordinates, city name), accuracy considerations, or error handling. For a tool that provides location data, this omission reduces its usefulness for an AI agent in making informed decisions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and the schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately avoids unnecessary details. A baseline score of 4 is applied as per the rules for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Get') and resource ('your current location'), and it specifies the data sources ('based on IP geolocation or system settings'). However, it doesn't explicitly differentiate from its sibling tool 'get_current_time', which is a different resource type, so it doesn't fully meet the sibling differentiation criterion for a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives or any context for its application. It lacks explicit when/when-not instructions or mention of prerequisites, which is essential for effective tool selection by an AI agent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updates
    • First observedget_current_time
    • First observedget_location

TDQS

B3.4/5.0
Disambiguation5/5

The two tools have completely distinct purposes: one retrieves time information, while the other retrieves location information. There is no overlap or ambiguity between them, making it easy for an agent to select the correct tool based on the need.

Naming Consistency5/5

Both tools follow a consistent verb_noun naming pattern (get_current_time and get_location) using snake_case. This uniformity makes the tool set predictable and easy to understand at a glance.

Tool Count2/5

With only two tools, the server feels thin for a combined 'Time & Location' domain. While each tool is clear, the scope suggests more operations could be included, such as timezone conversions or location-based services, making the current count insufficient for comprehensive coverage.

Completeness2/5

The tool set is severely incomplete for the stated 'Time & Location' domain. It lacks essential operations like converting timezones, setting alarms, getting weather based on location, or calculating distances, leaving significant gaps that could cause agent failures in broader tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that allows checking local time on the client machine or current UTC time from an NTP server
    2
    34
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    A MCP server that provides timezone-aware date and time operations. This server addresses the common issue where AI assistants provide incorrect date information due to timezone confusion.
    4
    4
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A minimal MCP server that provides current time information with configurable timezone support set on the client side.
    -

Latest Blog Posts

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