Add an MCP Connector to Gemini CLI

Connect Gemini CLI to another tool or service with the gemini mcp add command, check the connection, and choose whether it works in one project or in all.

Checked against official docs on 12 Oct 2026

On this page

A connector lets your assistant use another tool or service. Connectors use a shared standard called MCP (Model Context Protocol). The connector itself is called an MCP server.

There are two common kinds:

  • Local (stdio): the connector runs on your computer. You add it with the command that starts it.
  • Remote (http): the connector runs on the internet. You add it with a web address (URL).

Find the connector's setup line

Open the official page of the connector you want. Look for a URL, or a start command such as a line that starts with npx. Only add connectors from people you trust.

Add the connector

You run this in your normal terminal, not inside a Gemini session. The pattern is:

gemini mcp add [options] <name> <commandOrUrl> [args...]

You choose the name. For a remote connector, add --transport http. Google's example, with a made-up address:

gemini mcp add --transport http http-server https://api.example.com/mcp/

For a local connector, give the start command after the name. Google's example, with a made-up server:

gemini mcp add python-server python server.py -- --server-arg my-value

To pass a setting such as a key, add -e KEY=value. To send a sign-in header to a remote connector, add --header.

Choose where it applies

By default, gemini mcp add saves the connector for the current project, in .gemini/settings.json inside the project folder. Add --scope user to save it in ~/.gemini/settings.json, so that it works in all your projects.

Do not use the --trust option while you learn. It skips every confirmation question for that connector.

Check that it worked

gemini mcp list

Each connector shows Connected or Disconnected. A local connector shows as connected only in a folder that you trust. Inside a session, type /mcp list to see connectors and their tools. If a remote connector needs a sign-in, type /mcp auth <name>.

Remove a connector

gemini mcp remove <name>

Add --scope user if you added it with that option. Browse connectors that we checked in our Connectors list.

Sources