Skip to content

09Manage servers with AI

Connect Gemini CLI to Nexthosting Connect – guide

How to connect the Gemini command line to Nexthosting Connect with a command or an extension and manage your Nexthosting servers in the terminal.

In short

One command adds the server: gemini mcp add --transport http nexthosting-connect https://mcp.nexthosting.net/mcp. After that, you sign in to Nexthosting in Gemini CLI with /mcp auth nexthosting-connect.

  1. Run this command in the terminal:

    Terminal window
    gemini mcp add --transport http nexthosting-connect https://mcp.nexthosting.net/mcp

    With -s user, the entry applies to all projects, otherwise only to the current one.

  2. Start Gemini CLI and enter:

    /mcp auth nexthosting-connect
  3. The browser opens with a Nexthosting page. Sign in and choose the permissions. The first time, only Read is preselected. Gemini CLI is not one of the verified apps, so the page shows you its return address.

{
"mcpServers": {
"nexthosting-connect": {
"httpUrl": "https://mcp.nexthosting.net/mcp"
}
}
}

httpUrl stands for Streamable HTTP. The field url would be the older SSE connection and does not fit.

Gemini CLI can also install the entry as an extension. It lives in the public repository github.com/nexthostingdotnet/nexthosting-connect.

Terminal window
gemini extensions install https://github.com/nexthostingdotnet/nexthosting-connect

Start the sign-in with /mcp auth nexthosting-connect and check that a browser is available on the machine. On a server without a browser, sign in on another machine.