Skip to main content
Glama

geminicli-mcp

ヘッドレスGemini CLIをラップするステートレスなMCPサーバー。

  • stdioトランスポート、クライアントごとにspawn

  • 2つのツール: gemini_prompt, gemini_prompt_with_context

  • セッションなし、working_dirなし、タイムアウト強制なし

  • サーバープロセスのcwdで実行

インストール

npm install
npm run build

バイナリはgeminicli-mcpとして公開されています(package.json#binを参照)。

Related MCP server: gemini-cli-mcp

ツール

gemini_prompt

フィールド

型

必須

備考

prompt

string

はい

プロンプトテキスト

model

string

いいえ

例: gemini-2.5-pro

CLIの応答テキストを返します。

gemini_prompt_with_context

フィールド

型

必須

備考

prompt

string

はい

プロンプトテキスト

context

string

はい

<context>内のプロンプトの前に付加されます

model

string

いいえ

例: gemini-2.5-pro

CLIの応答テキストを返します。

環境変数

  • GEMINI_CLI_BIN — geminiバイナリパスを上書きします。

  • 子プロセスの環境変数はNO_COLOR=1およびTERM=dumbでサニタイズされます。

Available Tools

2 tools
gemini_promptA

Invoke the headless Gemini CLI with a single prompt. Stateless — each call is an independent turn. Runs in the MCP server's current working directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesPrompt text sent to the Gemini CLI.
modelNoOptional model identifier (e.g., gemini-2.5-pro).

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: statelessness, independence of calls, and execution directory. However, it lacks details on permissions, rate limits, error handling, or output format. For a tool with no annotations, this is adequate but leaves gaps in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and front-loaded: three short sentences with zero waste. Each sentence adds value—stating the purpose, behavioral trait (statelessness), and execution context—earning its place efficiently.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description is minimally complete. It covers purpose and basic behavior but lacks details on output, errors, or advanced usage. For a stateless CLI tool, this is adequate but not comprehensive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('prompt' and 'model') fully. The description doesn't add any parameter-specific meaning beyond what the schema provides, such as examples or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Invoke the headless Gemini CLI with a single prompt.' It specifies the verb ('invoke') and resource ('Gemini CLI'), and distinguishes it from the sibling tool by noting it's 'stateless — each call is an independent turn.' However, it doesn't explicitly name the sibling tool for full differentiation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage: 'Stateless — each call is an independent turn' and 'Runs in the MCP server's current working directory.' This implies when to use it (for independent prompts) and hints at an alternative (the sibling tool likely handles context). However, it doesn't explicitly name the sibling or state when-not-to-use scenarios.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

gemini_prompt_with_contextA

Invoke the headless Gemini CLI with a prompt plus a separate context block. Stateless — each call is an independent turn. The context is prepended to the prompt inside a tag. Runs in the MCP server's current working directory.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesPrompt text sent to the Gemini CLI.
contextYesContext block prepended to the prompt (e.g., file contents, prior notes).
modelNoOptional model identifier (e.g., gemini-2.5-pro).

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses key behavioral traits: statelessness, context prepending inside a <context> tag, and execution in the MCP server's current working directory. However, it lacks details on permissions, rate limits, error handling, or output format, which are important for a CLI invocation tool with no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured: three sentences that efficiently cover purpose, behavior, and execution context without redundancy. Each sentence adds distinct value, and it's front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (3 parameters, no annotations, no output schema), the description is partially complete. It covers the basic operation and statelessness but lacks details on output format, error conditions, or model-specific behaviors. Without an output schema, the description should ideally hint at return values or response structure, which it doesn't, leaving gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all three parameters (prompt, context, model) with descriptions. The description adds minimal value beyond the schema, mentioning that context is 'prepended to the prompt inside a <context> tag' and that the tool is stateless, but doesn't provide additional syntax, format, or usage details for the parameters. This meets the baseline of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Invoke the headless Gemini CLI with a prompt plus a separate context block.' It specifies the verb ('invoke'), resource ('Gemini CLI'), and distinguishes it from the sibling tool 'gemini_prompt' by mentioning the separate context block. However, it doesn't explicitly name the sibling for differentiation, keeping it at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides some usage context: 'Stateless — each call is an independent turn' and 'Runs in the MCP server's current working directory.' It implies when to use this tool (for prompts with separate context blocks) but doesn't explicitly state when to use it versus the sibling 'gemini_prompt' or other alternatives, nor does it provide exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv0.1.0
    • First observedgemini_prompt
    • First observedgemini_prompt_with_context

TDQS

A3.6/5.0

Scored across 2 tools

Disambiguation4/5

The two tools have clearly distinct purposes: one handles simple prompts, while the other adds a separate context block. The descriptions explicitly differentiate them, making misselection unlikely. However, the core functionality is similar, which could cause minor confusion in edge cases.

Naming Consistency5/5

Both tools follow a consistent 'gemini_prompt' prefix with descriptive suffixes ('with_context'), using snake_case throughout. The naming pattern is predictable and clearly indicates their relationship and differences.

Tool Count3/5

With only 2 tools, the server feels thin for a CLI interface, potentially lacking operations like configuration management, history, or batch processing. While the tools cover basic prompt execution, the scope seems limited compared to typical CLI toolkits.

Completeness2/5

The server is severely incomplete for a Gemini CLI domain, missing essential operations such as model selection, parameter tuning, file handling, conversation history, or error management. Agents will face dead ends when trying to perform common CLI tasks beyond basic prompting.

Maintenance

ActivityStale
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An 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
    -
  • A
    license
    A
    quality
    D
    maintenance
    A secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command injection.
    2
    7 npm
    5
    MIT
  • F
    license
    A
    quality
    D
    maintenance
    Wraps the Gemini CLI as an MCP server, enabling AI tools to perform Gemini queries, interactive sessions, and extension management via a unified tool.
    1
    1
    -