Token导航 LogoToken导航TokenDH.com
Fast Time Server Go logo
运维云端未说明官方级别未说明来源级核验

Fast Time Server Go

MCP Server

一个轻量级的Go服务,通过stdio、HTTP/JSON-RPC或Server-Sent Events (SSE)提供当前UTC时间。

工具数

0

提示词数

0

GitHub Stars

2

资源数

0
时间服务轻量级GoToken认证

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

crivetimihai

提供方

crivetimihai

最后核验

2026/5/17 20:21

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

🦫 快速时间服务器

作者:Mihai Criveti 一种最小的Go服务,用于流式传输或返回当前UTC时间 标准输入输出, HTTP/JSON-RPC,或 服务器发送事件(SSE).

](<>) ![License: Apache‑2.0](<>)

______________________________________________________________________

特性

  • 三种运输方式: stdio, http (JSON‑RPC 2.0), and sse
  • 单静态二进制(~2MiB)
  • 通过以下方式生成时间版本和日期 main.appVersion, main.buildDate
  • 跨平台构建通过 make cross
  • 轻量级容器的Dockerfile
  • Linting(golangci-lint, staticcheck)以及预提交支持
  • 具有HTML覆盖率和Go基准的单元测试
  • 负载测试支持 使用 hey

快速开始

git clone https://github.com/yourorg/fast-time-server.git
cd fast-time-server

# Build & run over stdio
make run

# HTTP JSON‑RPC on port 8080
make run-http

# SSE endpoint on port 8080
make run-sse

安装

需要Go 1.23+。

go install github.com/yourorg/fast-time-server@latest

也可作为版本提供。

CLI标志

标志默认值描述
-transportstdio选项: stdio, http, sse, dual
-addr/-listen0.0.0.0HTTP/SSE的绑定地址
-port8080HTTP/SSE/双端口
-auth-token*(空)*SSE身份验证的承载令牌

api参考

HTTP(JSON-RPC 2.0)

发布 /http

请求:

{"jsonrpc":"2.0","method":"Time.Now","id":1}

答复:

{"jsonrpc":"2.0","result":"2025-06-21T12:34:56Z","id":1}

SSE

获取 /sse (可选标题: Authorization: Bearer )

每秒输出UTC时间戳:

data: 2025-06-21T12:34:56Z

负载测试

安装流行的HTTP负载测试仪 :

brew install hey            # macOS
wget https://hey-release... # Linux prebuilt binary

运行快速负载测试:

# 500 requests total, 50 concurrent, HTTP transport
hey -n 500 -c 50 http://localhost:8080/http

生成详细的CSV输出以供分析:

hey -n 1000 -c 100 -o csv http://localhost:8080/http > results.csv

码头工人

make docker-build
make docker-run           # HTTP mode

交叉编译

make cross

二进制出现在 dist/fast-time-server--.

发展

任务命令
格式和整洁make fmt tidy
毛皮和兽医make lint staticcheck vet
运行预提交钩子make pre-commit

测试和基准测试

make test       # Unit tests (race detection)
make coverage   # HTML coverage report
make bench      # Go benchmarks

许可证

Apache 2.0

目录标签

目录标签

时间服务轻量级GoToken认证本地部署Go服务JSON-RPCSSE

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明token部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP