MCP cover image
See in Github
2025-03-27

UN SERVER MCP简单Qui Fournit Un Service de L'Heure Actuelle

1

Github Watches

0

Github Forks

0

Github Stars

Serveur MCP Simple pour Service d'Heure

Ce dépôt contient un serveur MCP (Method Call Protocol) simple qui fournit un service pour obtenir l'heure actuelle. Le serveur implémente le protocole JSON-RPC 2.0 pour les appels de méthode.

Installation

# Cloner le dépôt
git clone https://github.com/Anragde/simple-time-mcp-server.git
cd simple-time-mcp-server

# Installer les dépendances
npm install

Démarrage du serveur

# Démarrer en mode développement (avec hot reload)
npm run dev

# Démarrer en mode production
npm start

Le serveur démarre par défaut sur le port 3000, mais vous pouvez le configurer en définissant la variable d'environnement PORT.

Méthodes disponibles

Le serveur expose les méthodes suivantes via l'endpoint /mcp :

1. getCurrentTime

Retourne l'heure actuelle dans le format spécifié.

Paramètres :

  • format (optionnel) : Format de l'heure (utilise le format de moment.js). Par défaut: 'YYYY-MM-DD HH:mm:ss'

Exemple de requête :

{
  "jsonrpc": "2.0",
  "method": "getCurrentTime",
  "params": {
    "format": "HH:mm:ss"
  },
  "id": 1
}

Exemple de réponse :

{
  "jsonrpc": "2.0",
  "result": {
    "time": "14:30:45",
    "timestamp": 1616929845123
  },
  "id": 1
}

2. getTimeInTimezone

Retourne l'heure actuelle dans le fuseau horaire spécifié.

Paramètres :

  • timezone (requis) : Le fuseau horaire (ex: 'Europe/Paris', 'America/New_York')
  • format (optionnel) : Format de l'heure. Par défaut: 'YYYY-MM-DD HH:mm:ss'

Exemple de requête :

{
  "jsonrpc": "2.0",
  "method": "getTimeInTimezone",
  "params": {
    "timezone": "Europe/Paris",
    "format": "ddd, DD MMM YYYY HH:mm:ss"
  },
  "id": 2
}

Exemple de réponse :

{
  "jsonrpc": "2.0",
  "result": {
    "time": "Mon, 28 Mar 2025 14:30:45",
    "timezone": "Europe/Paris",
    "timestamp": 1616929845123
  },
  "id": 2
}

Vérification de l'état du serveur

Un endpoint de vérification d'état est disponible à /health. Il peut être utilisé pour surveiller si le serveur fonctionne correctement.

Exemple de requête :

curl http://localhost:3000/health

Exemple de réponse :

{
  "status": "ok", 
  "timestamp": 1616929845123
}

Licence

MIT

相关推荐

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Bora Yalcin
  • Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • modelcontextprotocol
  • 模型上下文协议服务器

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • metorial
  • 数百个MCP服务器的容器化版本📡📡

  • open-webui
  • 用户友好的AI接口(支持Ollama,OpenAi API,...)

    Reviews

    2 (1)
    Avatar
    user_w1QJTsuH
    2025-04-16

    Mcp Server is an outstanding product by d747d that has significantly improved my server management experience. Its intuitive interface and reliable performance make it a must-have tool for any server administrator. The seamless integration and robust features ensure that my servers are always running smoothly and efficiently. Highly recommend! For more information, visit https://mcp.so/server/mcp-server/d747d.