mcp-cli-gemini
Allows interaction with Google's Gemini CLI, providing tools for one-shot queries, interactive sessions, and extension management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cli-gemini Explain how async/await works in JavaScript"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP CLI Gemini
MCP server that wraps Gemini CLI for use with other AI tools via the Model Context Protocol.
Features
Single unified gemini tool that supports:
One-shot queries to Gemini CLI
Interactive mode session commands
Extension management
Related MCP server: Gemini CLI MCP/OpenAI Bridge
Prerequisites
Gemini CLI installed and configured
Node.js 18+
Installation
npm install
npm run buildUsage
Add to Claude Desktop
Edit your Claude Desktop config file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Add the server:
{
"mcpServers": {
"gemini-cli": {
"command": "node",
"args": ["D:\\WORKSPACE\\tools-node\\mcp-cli-gemini\\dist\\index.js"]
}
}
}Add to Other MCP Clients
Use stdio transport with:
node dist/index.jsAvailable Tools
gemini
Unified tool for all Gemini CLI operations.
Parameters:
query(required): Query to send to Gemini CLImodel(optional): Model to use (e.g., "gemini-pro", "gemini-1.5-flash")sandbox(optional): Run in sandbox mode for code executionyolo(optional): Auto-approve all actionsinteractive(optional): Run in interactive mode (returns command for manual execution)extensions(optional): Extension command: "list" or "info:extensionName"
Examples:
Basic query:
{
"query": "Explain how async/await works in JavaScript",
"model": "gemini-1.5-flash"
}Interactive mode:
{
"query": "Let's discuss design patterns",
"interactive": true
}List extensions:
{
"query": "",
"extensions": "list"
}Get extension info:
{
"query": "",
"extensions": "info:extension-name"
}Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build
npm run build
# Watch mode
npm run watch
# Lint
npm run lint
# Lint and fix
npm run lint:fixLicense
MIT
Available Tools
1 toolgeminiA
Execute Gemini CLI commands. Supports queries, interactive mode, and extension management.
Inputs: query (required), yolo, model, sandbox, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no risk of confusing it with another. The tool's purpose is clearly stated, so an agent can unambiguously select it.
The single tool name 'gemini' is simple, matches the server name, and follows a consistent pattern. With only one name, there are no inconsistencies to penalize.
Exposing only one tool is too few for the apparent scope, as it tries to cover queries, interactive mode, and extension management all in one. This forces the agent to rely on a single catch-all, which is impractical and not a well-structured tool set.
The single tool is a thin wrapper around the entire CLI, providing no first-class operations for distinct tasks. Agents must manually construct CLI commands, which is error-prone and represents a shallow API surface compared to a more complete, structured set.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that wraps the Gemini CLI to provide tools for executing prompts, managing chat sessions, and accessing CLI extensions. It supports both local stdio and remote SSE transports for flexible integration with MCP clients.1-
- AlicenseNot gradedqualityFmaintenanceExposes Gemini CLI's built-in tools and external MCP proxies through a unified MCP endpoint while providing an OpenAI-compatible API for Gemini models. It features configurable security modes to safely manage file system operations, web searches, and shell command execution.24 npm138Apache 2.0
- AlicenseNot gradedqualityDmaintenanceThin MCP server wrapping the Gemini CLI for AI assistants, supporting workspace-aware multi-repository analysis and forward-compatible flags.81 PyPIMIT
- AlicenseCqualityDmaintenanceExposes the local Gemini CLI as an MCP stdio server, providing tools for prompting, web search, file operations, and MCP management, enabling AI clients like Codex CLI and Claude Code to interact with Gemini.227MIT