Minimal MCP server and client sample with Gemini function calling

Minimal MCP server and client sample with Gemini function calling

mcp-server-sample-yokoba•byyokoba

A sample repository providing minimal MCP server implementations, including one with greet and farewell tools, alongside minimal clients and a Gemini function-calling client that selects tools.

License: Not specified•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Provides minimal MCP server samples in Python.
  • •Includes a second MCP server sample exposing greet and farewell tools.
  • •Includes a Gemini function-calling MCP client that chooses between greet and farewell based on time and calls the server.
  • •Includes a minimal MCP client for connection checking.

BEST FOR

  • •Developers learning the minimum structure of an MCP server and client.
  • •Developers who want an LLM such as Gemini to automatically select which tool to call.

ABOUT MCP-SERVER-SAMPLE-YOKOBA

Minimal MCP server and client sample with Gemini function calling is cataloged as an MCP server attributed to yokoba. A sample repository providing minimal MCP server implementations, including one with greet and farewell tools, alongside minimal clients and a Gemini function-calling client that selects tools. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Minimal MCP server and client sample with Gemini function calling are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What is the purpose of this repository?

It serves as a memo for people who want to know how to build a minimal MCP server and client and how to let Gemini automatically choose tools.

Which tools does the second server sample provide?

The second server sample provides two tools: greet and farewell.

How does the Gemini client choose a tool?

The LLM selects greet or farewell according to the time and then calls the server.

上游原版 README

在 GitHub 查看同一版本原文

README.md · f82fa271a5dd · 采集于 2026-11-13 12:13:15 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

Simple MCP Server & Client Sample (with Gemini Function Calling)

概要

  • MCP(Model Context Protocol)とは?
    機械学習モデルやAIエージェントに外部のツール(API)を呼ばせるプロトコル。

  • 本リポジトリの目的

    • 「MCPサーバ・クライアントの最小構成ってどう作るの?」
    • 「LLM(Gemini)でどのツールを呼ぶか自動で選ばせたい」
      というニーズ向けの備忘録です。

ファイル構成

  • mcp_simple_server1.py
    MCPサーバの最小サンプル。

  • mcp_simple_client1.py
    MCPクライアントの最小サンプル(接続確認用)。

  • mcp_simple_server2.py
    MCPサーバの最小サンプル。
    greet/farewell の2つのtoolを用意。

  • mcp_simple_client2.py
    Gemini function callingを使ったMCPクライアント。
    LLMが時刻によって自動でgreetまたはfarewellを選択し、サーバを呼び出します。


実行環境

  • Python 3.13(3.10以上なら動作するはず)
  • fastmcp >= 2.5.2
  • google-genai >= 1.18.0
  • uv (なくても動作するが高速化目的で推奨)

インストールと実行

  1. 必要なパッケージをインストール
uv init
uv add google-genai
uv add fastmcp
  1. Gemini APIキーを取得し、環境変数GEMINI_API_KEYに設定
    (Google AI Studioで無料発行可能)

  2. サーバ・クライアントの起動例

  • サーバ単体で起動(例)

    python mcp_simple_client1.py
    
  • クライアント+Gemini連携で実行(例)

    python mcp_simple_client2.py
    

使い方

  • サンプルコードはすべてコピペ・実行可能です。
  • Geminiのfunction callingで時刻によるtool選択をLLMに委ねています。

注意

  • エラーハンドリングや例外処理はシンプルさを優先して省略しています。
  • 実際の業務・サービス実装では適切なバリデーション、ログ、例外処理を追加してください。

License

MITライセンス等ご自由に。
備忘録・サンプル用途です。ご自身の責任でご利用ください。

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Minimal MCP server and client sample with Gemini function calling from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-server-sample-yokoba)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools