Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions mcp/geminicli.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
title: Gemini CLI
sidebarTitle: Gemini CLI
description: Configure the Control Plane MCP Server for Gemini CLI
---

Connect Gemini CLI to Control Plane to manage your infrastructure through natural language conversations.

## Prerequisites

<CardGroup cols={2}>
<Card title="Gemini CLI" icon="download">
Get started with [Gemini CLI](https://geminicli.com/docs/get-started/)
</Card>
<Card title="Service Account Token" icon="key">
Create a [service account](/guides/create-service-account) with appropriate permissions
</Card>
</CardGroup>

## Configuration

<Steps>
<Step title="Add the MCP Server">
Ask gemini to show you where the user scope `settings.json` file is:

```
show me where the global user settings.json file is
```

Open the `settings.json` file and add in the control plane mcp server details:

```json
"mcpServers": {
"cpln": {
"url": "https://mcp.cpln.io/mcp",
"headers": {
"Authorization": "Bearer <your-service-account-token>"
}
}
}
```
<Warning>
Replace `<your-service-account-token>` with your actual service account token.
</Warning>

We recommend the **user** scope to make the MCP server available across all your projects. If you prefer to define it locally, open a .gemini folder in your local project, create a settings.json file inside and update the MCP server there.

</Step>

<Step title="Verify the Connection">
List your configured MCP servers to confirm the setup:
```bash
gemini mcp list
```
You should see cpln listed with a successful connection.
```bash
cpln: https://mcp.cpln.io/mcp (sse) - ✓ Connected
```
</Step>
</Steps>

## Managing MCP Servers

```bash
# List all MCP servers
gemini mcp list

# Remove an MCP server
gemini mcp remove cpln

# Get help on MCP commands
gemini mcp --help
```

<Note>
For the latest configuration options and troubleshooting, refer to the official [Gemini CLI Documentation](https://geminicli.com/docs/tools/mcp-server/).
</Note>

## Example Conversation

Here's an example of deploying a public workload through Gemini CLI:

<Steps>
<Step title="Set Context">
```
Use org "my-org" and gvc "my-gvc" for context.
```
</Step>
<Step title="Deploy a Workload">
```
Create a publicly accessible workload called "my-api" using nginx:latest on port 80.
```
</Step>
<Step title="Get the Endpoint">
```
Monitor the readiness of my-api and give me the public endpoint once it's ready.
```
</Step>
</Steps>

## Troubleshooting

<AccordionGroup>
<Accordion title="Authentication errors">
- Check that your service account token is valid.
- Ensure the token is entered without extra spaces or quotes.
- Verify the token has appropriate permissions (see [Service Account Permissions](/mcp/overview#service-account-permissions)).
- **Check for typos in the org name** you're using for context, this is a common cause of authentication failures.
</Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
<Card title="Usage Examples" icon="lightbulb" href="/mcp/examples">
See practical examples of Control Plane operations
</Card>
<Card title="Policy Reference" icon="shield" href="/reference/policy">
Learn about permissions and access control
</Card>
</CardGroup>
3 changes: 3 additions & 0 deletions mcp/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ The Control Plane MCP Server works with **any AI assistant or development tool t
<Card title="Antigravity" href="/mcp/antigravity">
Google Antigravity IDE
</Card>
<Card title="Gemini CLI" href="/mcp/geminicli">
Gemini CLI
</Card>
</CardGroup>

<Note>
Expand Down
2 changes: 1 addition & 1 deletion mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
"mcp/overview",
{
"group": "Tool Setup",
"pages": ["mcp/claude", "mcp/codex", "mcp/cursor", "mcp/vscode", "mcp/antigravity"]
"pages": ["mcp/claude", "mcp/codex", "mcp/cursor", "mcp/vscode", "mcp/antigravity", "mcp/geminicli"]
},
"mcp/examples"
]
Expand Down