Gemma MCP Client
About
A client for Google's Gemma-3 model that enables function calling through MCP.
Details
- Author
- monatis
- Categories
- Developer Tools, AI
Jump to
Setup
Install Gemma MCP Client in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/monatis/gemma-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
A Python package that combines Google's Gemma language model with MCP (Model Content Protocol) server integration, enabling powerful function calling capabilities across both local functions and remote MCP tools.
- Seamless integration with Google's Gemma language model
- Support for both local Python functions and remote MCP tools
- Automatic tool discovery and registration from MCP servers
- Python-style function calling syntax
- Proper resource management with async context managers
- Support for multiple MCP servers
- Easy testing through test server support
uv add gemma-mcp # or pip install gemma-mcp if you love the old way
- Python 3.10+
- google-genai: Google Generative AI Python SDK
- FastMCPMCP utilities
from gemma_mcp import GemmaMCPClient # a standard MCP configuration mcp_config = { "mcpServers": { "weather": { "url": "https://weather-api.example.com/mcp" }, "assistant": { "command": "python", "args": ["./assistant_server.py"] } } } # Initialize client with MCP support async with GemmaMCPClient(mcp_config=mcp_config).managed() as client: # Chat with automatic function execution response = await client.chat( "What's the weather like in London?", execute_functions=True ) print(response)
You can add local functions in three ways:
async def my_function(param1: str, param2: int = 0): """Function description.""" return {"result": param1 + str(param2)} client.add_function(my_function)
function_def = { "name": "my_function", "description": "Function description", "parameters": { "type": "object", "properties": { "param1": {"type": "string"}, "param2": {"type": "integer", "default": 0} }, "required": ["param1"] } } client.add_function(function_def)
from gemma_mcp import FunctionDefinition function_def = FunctionDefinition( name="my_function", description="Function description", parameters={ "type": "object", "properties": { "param1": {"type": "string"}, "param2": {"type": "integer", "default": 0} }, "required": ["param1"] }, required=["param1"] ) client.add_function(function_def)
The MCP configuration supports multiple server types:
mcp_config = { "mcpServers": { "server_name": { "url": "https://server-url/mcp" } } }
mcp_config = { "mcpServers": { "server_name": { "command": "python", "args": ["./server.py"] } } }
The package includes support for testing with in-memory MCP servers:
from fastmcp import FastMCP from gemma_mcp import GemmaMCPClient # Create test server mcp = FastMCP("Test Server") # Initialize client with test server client = GemmaMCPClient() client.mcp_client.add_test_server(mcp) # Use the client as normal async with client.managed(): response = await client.chat("Test message", execute_functions=True)
The main client class that handles both Gemma model interactions and MCP tool integration.
- api_key(str, optional): Gemini API key. If not provided, will look for GEMINI_API_KEY env var
- model(str): Model to use, defaults to "gemma-3-27b-it"
- temperature(float): Generation temperature, defaults to 0.7
- system_prompt(str, optional): Custom system prompt
- mcp_config(dict, optional): MCP configuration dictionary
- add_function(function): Add a function definition
- chat(message, execute_functions=False): Send a message and get response
- initialize(): Initialize the client and all components
- cleanup(): Clean up all resources
A dataclass for representing function definitions.
- name(str): Function name
- description(str): Function description
- parameters(dict): Function parameters schema
- required(list): List of required parameters
- callable(callable, optional): The actual callable function
Contributions are welcome! Please feel free to submit a Pull Request.
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
next-devtools-mcp is a MCP server that provides Next.js development tools and utilities for AI coding assistants like Claude and Cursor.
Word search, crossword, and sudoku generator MCP server with printable PDF worksheets, themed word banks, and verifiable LLM evals. Local-first, from the makers of puzzletide.com.
A demonstration server for ActionKit, providing access to Slack actions via Claude Desktop.
MCP server that lets Claude Code agents delegate tasks to agents in other project directories, with parallel dispatch, sessions, and async jobs.
Statistical regression testing for LLM agents: p-value, effect size, and CI on behavior change.
A Python MCP package that gives your LLM agents complete file system and shell capabilities — production-ready, sandboxed, and wired to any LLM in minutes.
Integrates with Google AI Studio/Gemini API for PDF to Markdown conversion and content generation.
Anchor Browser (https://anchorbrowser.io) is secure infrastructure for computer-use agents — stealth cloud browsers, authentication, captcha bypass, and a hosted MCP server for Cursor, Claude, and Windsurf.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.




