Time logo

Time

Organization
mcpcentral-io

A Model Context Protocol (MCP) server providing time-related tools with dual-mode support:

Publishermcpcentral-io
Repositorymcp-time
LanguageJavaScript
Forks
2
Stars
2
Available tools
6
Transport typestreamable-http
Categories
Links
  • Connect tools to AI workflows

    Time exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 6 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    2 stars and 2 forks from the linked repository.

MCP Time Server

A Model Context Protocol (MCP) server providing time-related tools with dual-mode support:

  • Stdio transport for local MCP clients (via npm)
  • Streamable HTTP transport for remote access (via Cloudflare Workers)

This server allows LLMs to access various date/time functions through multiple connection methods.

MCP Central Server Card: https://guide-gen.mcpcentral.io/servers/io-github-mcpcentral-io-mcp-time

Features

Provides the following MCP tools:

  • current_time: Get the current date and time in specified formats and timezones.
  • relative_time: Get a human-readable relative time string (e.g., "in 5 minutes", "2 hours ago").
  • days_in_month: Get the number of days in a specific month.
  • get_timestamp: Get the Unix timestamp (milliseconds) for a given time.
  • convert_time: Convert a time between different IANA timezones.
  • get_week_year: Get the week number and ISO week number for a given date.

Project Structure

mcp-time/
├── src/
│   └── index.ts      # Cloudflare Worker entry point & MCP logic
├── package.json      # Project dependencies and scripts
├── tsconfig.json     # TypeScript configuration
└── wrangler.toml     # Cloudflare Worker configuration

Installation

Option 1: Install from npm (Stdio Mode)

Install the package globally or use with npx:

bash
# Global installation
npm install -g @mcpcentral/mcp-time

# Or use directly with npx
npx @mcpcentral/mcp-time

Option 2: Use Remote Server (HTTP Mode)

Connect directly to the deployed Cloudflare Worker:

Example:

https://mcp.time.mcpcentral.io

Usage

Stdio Transport (Local)

Configure your MCP client (e.g., Claude Desktop) to use the stdio transport:

json
{
  "mcpServers": {
    "time-server": {
      "command": "npx",
      "args": ["@mcpcentral/mcp-time"]
    }
  }
}

Or with global installation:

json
{
  "mcpServers": {
    "time-server": {
      "command": "/path/to/node/bin/mcp-time"
    }
  }
}

Streamable HTTP Transport (Remote)

Configure your MCP client to use the remote HTTP endpoint:

json
{
  "mcpServers": {
    "time-server": {
      "url": "https://mcp.time.mcpcentral.io",
      "transport": "streamable-http"
    }
  }
}

Development

  1. Clone the Repository:

    bash
    git clone https://github.com/mcpcentral-io/mcp-time.git
    cd mcp-time
  2. Install Dependencies:

    bash
    npm install
  3. Build: Compile the TypeScript code:

    bash
    npm run build

    (This compiles src/index.ts to dist/index.js)

  4. Test Locally:

    Test Stdio Mode:

    bash
    echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | node dist/index.js

    Test HTTP Mode (via Wrangler):

    bash
    npx wrangler dev

    This will start the server on http://localhost:8787. You can then test with curl or point your MCP client to this local endpoint.

Deployment

Deploy to Cloudflare Workers (HTTP Mode)

  1. Configure Cloudflare:

    bash
    cp wrangler.toml.example wrangler.toml

    Edit wrangler.toml to configure your domain (optional).

  2. Login and Deploy:

    bash
    wrangler login
    npx wrangler deploy

Publish to npm (Stdio Mode)

  1. Build the package:

    bash
    npm run build
  2. Publish:

    bash
    npm publish --access public

Connectors for Streamable HTTP Servers

NEW: Major providers have adopted the Model Context Protocol and now support Streamable HTTP servers directly. Anthropic, OpenAI, and Microsoft have all adopted this modern transport protocol.

📋 Protocol Note: Streamable HTTP is the modern replacement for the deprecated HTTP+SSE transport.

Anthropic MCP Connector

Anthropic's MCP Connector allows you to use Streamable HTTP servers directly through the Messages API without needing a separate MCP client.

The MCP Connector is perfect for this server since it uses the Streamable HTTP architecture. Simply include the server in your API requests:

bash
curl https://api.anthropic.com/v1/messages \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $ANTHROPIC_API_KEY" \
  -H "anthropic-version: 2023-06-01" \
  -H "anthropic-beta: mcp-client-2025-04-04" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 1000,
    "messages": [{
      "role": "user", 
      "content": "What time is it in Tokyo?"
    }],
    "mcp_servers": [{
      "type": "url",
      "url": "https://your.worker.url.workers.dev",
      "name": "http-time-server"
    }]
  }'

Anthropic MCP Connector Benefits:

  • No client setup required - Connect directly through the API
  • Native Streamable HTTP support - Designed for servers like this one

OpenAI Agents SDK

OpenAI also supports Streamable HTTP servers through their Agents SDK using the MCPServerStreamableHttp class:

python
from agents.mcp.server import MCPServerStreamableHttp

# Connect to this Streamable HTTP server
server = MCPServerStreamableHttp({
    "url": "https://your.worker.url.workers.dev",
    "headers": {"Authorization": "Bearer your-token"},  # if needed
})

# Use the server in your OpenAI agent
await server.connect()
tools = await server.list_tools()
result = await server.call_tool("current_time", {"timezone": "Asia/Tokyo"})

Microsoft Copilot Studio

Microsoft Copilot Studio now supports Streamable HTTP servers with MCP integration generally available. You can connect this server to Copilot Studio by:

  1. Building a custom connector that links your MCP server to Copilot Studio
  2. Adding the tool in Copilot Studio by selecting 'Add a Tool' and searching for your MCP server
  3. Using the server directly in your agents with generative orchestration enabled

More MCP Clients Coming Soon

Keep an eye out as more MCP clients adopt support for Streamable HTTP. Here are a few resources that maintain lists of MCP clients and their capabilities:

Testing and Validation

MCP Inspector Tools (HTTP Mode)

Test your server using these web-based inspection tools:

MCPCentral Tools (Recommended)

Official MCP Inspector

The official MCP Inspector is also available:

Testing Steps

  1. Start your server:

    bash
    # Local HTTP server
    npx wrangler dev
    
    # Or use deployed URL: https://mcp.time.mcpcentral.io
  2. Connect with an inspector:

    • Transport: Streamable HTTP
    • URL: http://localhost:8787 or https://mcp.time.mcpcentral.io
    • Click Connect

Command Line Testing (Stdio Mode)

Test the stdio transport directly:

bash
# Test initialization
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | npx @mcpcentral/mcp-time

# Test tool call
echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"current_time","arguments":{"timezone":"America/New_York"}}}' | npx @mcpcentral/mcp-time

Available Tools to Test

The inspector will show all six time-related tools:

  • current_time: Test with different timezones (e.g., "America/New_York", "Europe/London")
  • relative_time: Test with various time strings (e.g., "2024-12-25T00:00:00Z")
  • days_in_month: Test with different months and years
  • get_timestamp: Convert date-time strings to Unix timestamps
  • convert_time: Convert between different timezones
  • get_week_year: Get week numbers for specific dates

Example Test Cases

Try these test cases in the inspector:

json
// current_time
{"timezone": "Asia/Tokyo", "format": "iso"}

// relative_time  
{"time": "2024-12-25T00:00:00Z"}

// days_in_month
{"month": 2, "year": 2024}

// get_timestamp
{"time": "2024-06-15T12:00:00Z"}

// convert_time
{"time": "2024-06-15T12:00:00", "from": "UTC", "to": "America/Los_Angeles"}

// get_week_year
{"date": "2024-06-15"}

Validation Checklist

Use the inspector to verify:

  • ✅ Server connects successfully
  • ✅ All 6 tools are listed
  • ✅ Tool schemas are properly defined
  • ✅ Tools execute without errors
  • ✅ Results are formatted correctly
  • ✅ Error handling works for invalid inputs

The MCP Inspector provides the most comprehensive way to test your server before integrating it with AI clients.


Authentication & Security Considerations

⚠️ IMPORTANT: This example server has NO authentication or security measures implemented.

Installation

TypingMind
{
  "mcpServers": {
    "time-server": {
      "url": "https://mcp.time.mcpcentral.io",
      "env": null
    }
  }
}

Available Tools

  • current_time

    Get current time in UTC and specified timezone

  • relative_time

    Calculate relative time from now to a given time string

  • days_in_month

    Get the number of days in a month

  • get_timestamp

    Convert a date-time string to Unix timestamp in milliseconds

  • convert_time

    Convert time between different IANA timezones

  • get_week_year

    Get week number and ISO week number for a date

Use Time MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Time is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP connects through a hosted MCP server URL in TypingMind.

Add an MCP server URL

Use this when Time is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter https://mcp.time.mcpcentral.io in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste https://mcp.time.mcpcentral.io into the Server URL field.
  2. Enter a connection name for Time.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Time connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Time tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Time tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Time to help me with this task?
Time
Sure. I read it.
Here is what I found using Time.

Frequently asked questions

What is the Time MCP server used for?

Time is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Time MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Time with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Time MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Time connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Time MCP to TypingMind?

Time can be connected in TypingMind by adding its hosted MCP server URL. This is useful when you want a remote MCP connection that is available from your TypingMind workspace.

What tools does Time MCP provide in TypingMind?

Time exposes 6 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Time MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Time requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇