MCP.so
登录

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

@yokoba

基本信息

分类

AI 与智能体

许可证

MIT

传输方式

stdio

作者

yokoba

关于 Simple MCP Server & Client Sample

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

Simple MCP Server & Client Sample 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

Simple MCP Server & Client Sample 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

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

This repository provides minimal examples of an MCP (Model Context Protocol) server and client. It demonstrates how to let a Gemini LLM automatically select which tool to call using function calling, based on context such as time of day.

How to use Simple MCP Server & Client Sample (with Gemini Function Calling)?

Install dependencies with uv init, uv add google-genai, uv add fastmcp. Set the GEMINI_API_KEY environment variable. Run python mcp_simple_client1.py for a basic client or python mcp_simple_client2.py for the Gemini‑integrated client that automatically chooses between the greet and farewell tools.

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

  • Minimal MCP server and client implementations
  • Gemini function calling automatically selects tools
  • Two sample tools: greet and farewell
  • Built with the fastmcp and google-genai libraries
  • Works with Python 3.10+ and recommended uv for speed

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

  • Learning the minimum structure of an MCP server and client
  • Demonstrating how an LLM (Gemini) can call different tools based on context
  • Starting point for quickly building custom MCP‑powered AI agents

常见问题

1

What is MCP?

Model Context Protocol (MCP) is a protocol that lets machine learning models or AI agents call external tools (APIs).

2

What is the purpose of this repository?

It provides a minimal MCP server and client sample, and shows how to let a Gemini LLM automatically choose which tool to call based on time of day.

3

What are the runtime requirements?

Python 3.10 or later, fastmcp >= 2.5.2, google-genai >= 1.18.0, and a Gemini API key set as the environment variable `GEMINI_API_KEY`. Using `uv` is recommended but not required.

4

Are there any limitations or cautions?

The code prioritises simplicity and omits error handling and exception processing. For production use, add proper validation, logging, and error handling.

5

What license applies?

The code is offered freely under the MIT License. It is a memo/sample; use it at your own responsibility.

评论

AI 与智能体 分类下的更多 MCP 服务器