An open API service indexing awesome lists of open source software.

https://github.com/secretiveshell/mcp-timeserver-rust


https://github.com/secretiveshell/mcp-timeserver-rust

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

          

# MCP-timeserver-rust

A simple MCP server that exposes datetime information to agentic systems and chat REPLs.

This is a Rust port of [SecretiveShell/MCP-timeserver](https://github.com/SecretiveShell/MCP-timeserver).

## Components

### Resources

The server implements a `datetime://` URI scheme for accessing the current date/time in a given IANA timezone:

```text
datetime://Africa/Freetown/now
datetime://Europe/London/now
datetime://America/New_York/now
```

It also supports relative offsets:

```text
datetime://Europe/London/now/-1%20hour
datetime://America/New_York/now/+30m
datetime://Asia/Tokyo/now/-2h
```

Supported relative units are seconds, minutes, hours, days, and weeks.

### Tools

The server exposes a tool to get the current UTC time:

```text
current_time
```

## Quickstart

### Build

```sh
cargo build --release
```

### Run

```sh
cargo run --release
```

### MCP Configuration

Use the compiled binary as a stdio MCP server:

```json
{
"mcpServers": {
"mcp-timeserver": {
"command": "/path/to/mcp-timeserver/target/release/mcp-timeserver"
}
}
}
```

For local development, you can run it through Cargo:

```json
{
"mcpServers": {
"mcp-timeserver": {
"command": "cargo",
"args": ["run", "--release", "--manifest-path", "/path/to/mcp-timeserver/Cargo.toml"]
}
}
}
```