# Google Gemini CLI

## Content

You can configure Gemini CLI from the terminal or by editing `~/.gemini/settings.json` directly.
The terminal command is recommended because it updates the configuration for you.

##### Option 1: Add from terminal (Recommended)

1\. Open a terminal\.
2\. Run:
`gemini mcp add --scope user --transport http --header "Authorization: Bearer <YOUR_MCP_TOKEN>" spreadjs-mcp https://developer.mescius.com/mcp/spreadjs`
3\. Verify the configuration:
`<span class="">gemini mcp list</span>`
Inside Gemini CLI, you can also run `/mcp` to check the server status and available tools.

##### Option 2: Manually edit `settings.json`

1\. Open `~/.gemini/settings.json`.
2\. Add the MCP server configuration:

```json
{
  "mcpServers": {
    "spreadjs-mcp": {
      "httpUrl": "https://developer.mescius.com/mcp/spreadjs",
      "headers": {
        "Authorization": "Bearer <YOUR_MCP_TOKEN>"
      },
      "timeout": 30000
    }
  }
}
```

3\. Restart Gemini CLI\.
<br/>

References: [MCP servers with Gemini CLI](https://geminicli.com/docs/tools/mcp-server/ "https://geminicli.com/docs/tools/mcp-server/")