Skip to content

Gemini CLI MCP Tool Integration Issue - Command Spawn Error (ENOENT) #30

@collaxd

Description

@collaxd

Problem Description

I'm experiencing errors when trying to use the Gemini-CLI MCP (Model Context Protocol) integrated with Claude Code. Despite the configuration appearing correct, Gemini commands are not working properly.

System Configuration

PC Information

  • Operating System: Microsoft Windows 11 Pro
  • Version: 10.0.26100 Build 26100
  • Total RAM: 32.712 MB Total
  • Architecture: x64-based PC

Tool Versions

  • Node.js: v22.18.0
  • npm: 10.9.3
  • Git: 2.49.0.windows.1
  • Git Bash: MINGW64_NT-10.0-26100 3.5.7-463ebcdc.x86_64

MCP Configuration

Configuration File Location

C:\Users\COLLA\.claude.json

Gemini-CLI MCP Configuration

{
  "mcpServers": {
    "gemini-cli": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "gemini-mcp-tool"],
      "env": {
        "GOOGLE_API_KEY": "[API_KEY_OCULTA]"
      }
    }
  }
}

Command Used to Add MCP

claude mcp add gemini-cli -- npx -y gemini-mcp-tool

Current Status

  • ✅ MCP Server configured in project
  • ✅ Google API Key configured in environment
  • ✅ Package gemini-mcp-tool accessible via npx
  • ❌ Gemini commands returning errors

Failed Commands Tested

  • /gemini-cli:ask-gemini (MCP) ola gemini
  • /gemini-cli:Help (MCP)
  • /gemini-cli:ping (MCP)
  • /gemini-cli:timeout-test (MCP)

Additional Context

  • MCP is configured both in the current project and user home directory
  • API key is present in configuration but not working properly
  • Other Claude Code tools work normally

Error Logs or Messages

Error executing ask-gemini: Failed to spawn command: spawn gemini ENOENT

Error Analysis

  • ENOENT: "Error: No such file or directory" - indicates that the gemini command was not found
  • System is trying to execute gemini directly instead of using npx -y gemini-mcp-tool
  • Possible issue with MCP configuration or command parsing

Objective

Identify and resolve the issue preventing proper functioning of the Gemini-CLI MCP to be able to use Gemini functionalities integrated with Claude Code.


Date: August 23, 2025
Claude Code Version: 1.0.89

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions