Skip to main content

Connect Gemini CLI

The steps below demonstrate how to connect to the DoiT MCP server using Gemini CLI.

Required permissions​

Prerequisites​

Connection type​

Gemini CLI connects to DoiT MCP using a local stdio connection. The CLI launches the published package (@doitintl/doit-mcp-server) on your machine using standard input/output (stdio) using npx. Ensure Node.js is on your PATH.

Configure the DoiT MCP server​

  1. Create or edit the Gemini CLI settings.json in one of these locations.

    • All sessions (user): ~/.gemini/settings.json on macOS and Linux, or %USERPROFILE%\.gemini\settings.json on Windows.

    • One project: .gemini/settings.json at the root of the project where you run Gemini CLI. Create the .gemini directory if it does not exist.

    See Gemini CLI configuration.

  2. In a text editor, open the settings.json file.

  3. Add or merge the following JSON (if the file already has other keys, add the mcpServers object without removing existing content).

    {
    "mcpServers": {
    "doit_mcp_server": {
    "command": "npx",
    "args": ["-y", "@doitintl/doit-mcp-server@latest"],
    "env": {
    "DOIT_API_KEY": `<doit_api_key>`
    }
    }
    }
    }
  4. Replace doit_api_key with your DoiT API key.

  5. Save and close the settings.json file.

  6. Launch Gemini CLI. Gemini CLI automatically detects and connects to the DoiT MCP server. If your client lists available MCP tools, confirm the DoiT server appears before you rely on it in a session.

    You can now open a new chat to start asking questions or make requests related to DoiT Cloud Intelligence data.