Gemini CLI 🤝 FastMCP: Simplifying MCP server development

2025年9月22日
Jack Wotherspoon Developer Advocate
Jeremiah Lowin FastMCP Creator

Get ready to streamline your development of Model Context Protocol (MCP) servers! Gemini CLI now seamlessly integrates with FastMCP, Python's leading library for building MCP servers. We’re thrilled to announce this integration between two open-source projects that empowers you to effortlessly connect your custom MCP tools and prompts, directly to Gemini CLI!

Gemini CLI 🤝 FastMCP

As of FastMCP v2.12.3, you can now install local STDIO transport MCP servers built with FastMCP using the fastmcp install gemini-cli command.

fastmcp install gemini-cli server.py
Shell

This command simplifies the process and makes your FastMCP server's capabilities instantly available and configured within Gemini CLI! It automatically handles the configuration, dependency management, and calls Gemini CLI’s built-in MCP management system (gemini mcp add). For local server development, this integration offers a convenient way to get started.

Unlock Gemini CLI’s Full Potential

MCP servers can drastically improve your Gemini CLI experience by allowing the agent to perform actions and access context it would otherwise not have. FastMCP's Pythonic design, using decorators and type hints, makes creating these components simple and intuitive.

  • Tools: Allow Gemini CLI to perform actions, computations, or interact with external APIs and databases, becoming an active participant in your workflows.
  • Prompts: Use your FastMCP-defined prompts as slash commands within Gemini CLI (e.g., /promptname). This streamlines interactions and makes commonly used prompts feel native to your terminal environment.

Get Started Today

Want to try out the integration? It’s easy to get up and running with Gemini CLI and FastMCP.

  1. Install Gemini CLI: npm install -g @google/gemini-cli@latest
  2. Install FastMCP (v2.12.3 or later): pip install fastmcp>=2.12.3
  3. Create your server.py with custom tools and prompts. (example)
  4. Integrate: fastmcp install gemini-cli server.py
  5. Launch Gemini CLI and use /mcp to verify.

For more details and advanced configurations, refer to the official FastMCP integration documentation.

We're excited to see what innovative MCP servers you build and how you leverage them within Gemini CLI!

Do you have feature requests or enhancements you would like to see in FastMCP or Gemini CLI? Both are open-sourced, which means you can open a new issue on FastMCP or Gemini CLI directly on GitHub to let us know what you think.