glassmonkey
MCP Serverglassmonkeypublic

mcp sample

基于 Model Context Protocol (MCP) 的时间服务实现,提供当前时间和时区查询功能。

Repository Info

0
Stars
0
Forks
0
Watchers
0
Issues
Go
Language
MIT License
License

About This Server

基于 Model Context Protocol (MCP) 的时间服务实现,提供当前时间和时区查询功能。

Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.

Documentation

時計サービス MCP サンプル

Model Context Protocol (MCP) を使用した時計サービスのサンプル実装です。

サービス機能

このサービスは以下の機能を提供します:

  • 現在時刻の取得 (MCP get_current_time ツール)
    • 時刻(HH:MM:SS)
    • 日付(YYYY-MM-DD)
    • UNIXタイムスタンプ
    • タイムゾーン情報
  • 特定タイムゾーンの時刻取得 (MCP get_time_in_timezone ツール)
    • 指定したタイムゾーンでの時刻情報を取得

インターフェース

ツール: get_current_time

説明: 現在の時刻情報を取得します

パラメータ: なし

レスポンス例:

Current Time: 14:30:45
Current Date: 2023-04-15
Unix Timestamp: 1681539045
Timezone: Asia/Tokyo

ツール: get_time_in_timezone

説明: 指定されたタイムゾーンでの時刻情報を取得します

パラメータ:

  • timezone (必須): タイムゾーン(例: "UTC", "America/New_York", "Asia/Tokyo" など)

レスポンス例:

Time in Europe/London:
Current Time: 05:30:45
Current Date: 2023-04-15
Unix Timestamp: 1681539045
Timezone: Europe/London

開発環境

前提条件

  • Go 1.21+
  • Make

MCP について

このサンプルは Model Context Protocol (MCP) を使用しています。MCPは、LLMアプリケーションと外部データソースやツールとのシームレスな統合を可能にするプロトコルです。

ローカルでの実行

make run

テスト実行

make test

特徴

  • MCPプロトコル対応: LLMとのシームレスな統合
  • Flextime採用: テストでの時刻固定対応
  • タイムゾーン対応: 様々なタイムゾーン指定が可能

Getting Started

Prerequisites

  • Go 1.21+
  • Make

開発プロセス

このプロジェクトでは以下の開発ルールを採用しています:

  1. 日本語での対話

    • コメントやドキュメントは日本語で記述してください
    • コミットメッセージは日本語を基本としますが、英語も許容します
  2. Makefile経由での操作

    • 直接goコマンドを実行せず、対応するMakeコマンドを使用してください
    • 例: go buildmake build
  3. 完了通知

    • 各Makeコマンドは完了時に音声通知を行います
    • 例: make build → 「ビルドが完了しました」
  4. 標準作業フロー

    git pull
    # コード修正
    make fmt && make lint
    make test
    make build
    git commit -m "変更内容"
    git push
    

Using the Makefile

This project includes a Makefile to simplify common operations.

Available Commands

make           # Build the application (default)
make build     # Build the application
make run       # Run the application
make test      # Run tests
make fmt       # Format code
make lint      # Run linter (requires golint)
make vet       # Run go vet
make clean     # Clean build artifacts
make help      # Show help message

Running without Make

If you prefer not to use Make, you can run Go commands directly:

# Build
go build -o bin/app

# Run
go run main.go

# Test
go test -v ./...

MCPサーバーの実行

make run

または直接実行する場合:

go run main.go

MCPサーバーはstdio経由で通信します。これにより、LLMアプリケーションやMCPクライアントとシームレスに連携できます。

Quick Start

1

Clone the repository

git clone https://github.com/glassmonkey/mcp-sample
2

Install dependencies

cd mcp-sample
npm install
3

Follow the documentation

Check the repository's README.md file for specific installation and usage instructions.

Repository Details

Ownerglassmonkey
Repomcp-sample
LanguageGo
LicenseMIT License
Last fetched8/10/2025

Recommended MCP Servers

💬

Discord MCP

Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.

integrationsdiscordchat
🔗

Knit MCP

Connect AI agents to 200+ SaaS applications and automate workflows.

integrationsautomationsaas
🕷️

Apify MCP Server

Deploy and interact with Apify actors for web scraping and data extraction.

apifycrawlerdata
🌐

BrowserStack MCP

BrowserStack MCP Server for automated testing across multiple browsers.

testingqabrowsers

Zapier MCP

A Zapier server that provides automation capabilities for various apps.

zapierautomation