> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levios.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect Gemini CLI

> Add levios as a remote MCP server in the Gemini CLI.

<Note>
  Available tools and activation support depend on your current connection. After
  connecting, ask the agent to check the available operations before creating an
  automation.
</Note>

## Add the server

Gemini CLI reads MCP servers from `settings.json`. Choose one location:

* Use `.gemini/settings.json` inside a project to make levios available only in
  that project.
* Use `~/.gemini/settings.json` to make levios available in every project.

Add this remote server entry:

```json theme={null}
{
  "mcpServers": {
    "levios": {
      "httpUrl": "https://levios.app/api/mcp"
    }
  }
}
```

Gemini CLI uses `httpUrl` for a streaming HTTP endpoint, not `url`. If the file
already has other servers, add the `levios` entry inside the existing
`mcpServers` object instead of replacing the file.

## Authorize the connection

Gemini CLI discovers the authorization requirement automatically when levios
answers an unauthenticated request with `401`. Complete the levios sign-in in
the browser window that opens, review the permissions and Instagram accounts,
then approve the request.

To request the flow explicitly instead of relying on discovery, add the OAuth
block:

```json theme={null}
{
  "mcpServers": {
    "levios": {
      "httpUrl": "https://levios.app/api/mcp",
      "authProviderType": "dynamic_discovery",
      "oauth": {
        "enabled": true
      }
    }
  }
}
```

See [the Gemini CLI MCP guide](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html)
for the current field names and authentication provider types.

## Verify access

Ask Gemini CLI to list your levios accounts or automations. The result must
contain only accounts included in the grant. Tools that need permissions you did
not approve will not appear.

If the server has no tools, open **Settings > MCP** in levios and check its
status, permissions, and account access. Revoke the connection and start again
if you need to choose a different permission set.

Do not add headers, an API key, or a bearer token to this entry. The browser
authorization flow supplies the credential.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.