Back to MCP directory
publicPublicdnsLocal runtime

World Time

一个基于Spring AI MCP的时间查询服务器项目

article

README

🚀 时间 MCP 服务器

此 MCP 服务器提供了一个大语言模型(LLM)接口,可借助公共的 World Time API 获取当前时间。它基于 Spring AI MCP 项目构建。

示例

🚀 快速开始

📦 安装指南

手动构建

您可以使用以下命令手动构建服务器:

./mvnw clean package

下载预构建版本

您也可以从 发布页面 下载预构建的服务器。

⚙️ 配置

您需要为 MCP 客户端提供一个配置文件。若要在 OSX 上运行 Claude Desktop 客户端,需编辑位于 ~/Library/Application\ Support/Claude/claude_desktop_config.json 的配置文件。

以下是适用于 claude_desktop_config.json 的配置示例:

{
  "mcpServers": {
    "time-mcp": {
      "command": "java",
      "args": [
        "-Dlogging.file.name=time-mcp.webmvc.log",
        "-jar",
        "/path/to/time-mcp/target/time-mcp-0.0.1-SNAPSHOT.jar",
        "--server.port=8022"
      ]
    }
  }
}
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client