Skip to content

gemini cli mcp command generates settings.json that cannot be loaded #15551

@TianqiZhang

Description

@TianqiZhang

What happened?

When used the following command to add remote http MCP server:
gemini mcp add -t http microsoft-learn https://learn.microsoft.com/api/mcp

gemini cli auto-generated this, which is correct json:

  "mcpServers": {
    "microsoft-learn": {
      "url": "https://learn.microsoft.com/api/mcp",
      "type": "http"
    }
  }

However, when starting gemini in this folder, it outputs this error:

Invalid configuration in F:\mcp\mcp\.gemini\settings.json:

Error in: mcpServers.microsoft-learn
    Unrecognized key(s) in object: 'type'

Please fix the configuration and try again.
See: https://github.com/google-gemini/gemini-cli/blob/main/docs/get-started/configuration.md

What did you expect to happen?

gemini cli should respect and load correct mcp config that user uses gemini mcp add -t http <name> <url> to generate.

Client information

Client Information

Run gemini to enter the interactive CLI, then run the /about command.

> /about
CLI Version                                                                      0.22.2                                                                                                                                                  │
│ Git Commit                                                                       9bc9a3192                                                                                                                                               │
│ Model                                                                            auto-gemini-3                                                                                                                                           │
│ Sandbox                                                                          no sandbox                                                                                                                                              │
│ OS                                                                               win32                                                                                                                                                   │
│ Auth Method                                                                      OAuth                                                                                                                                                   │
│ User Email                                                                       <masked>@gmail.com

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/coreIssues related to User Interface, OS Support, Core Functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions