---
title: "Connect Gemini CLI to 1Post over MCP"
url: "https://get1post.com/assistants/gemini-cli.md"
canonical_url: "https://get1post.com/assistants/gemini-cli"
last_updated: "2026-10-26"
type: "how-to"
summary: "Add the 1Post MCP server to Gemini CLI: the exact settings, how to sign in or use a key, and a request and reply to check it works."
related: ["https://get1post.com/assistants.md", "https://get1post.com/docs/mcp.md", "https://get1post.com/docs/mcp-oauth.md", "https://get1post.com/docs/api-authentication.md"]
---

# Connect Gemini CLI to 1Post over MCP

Add the 1Post MCP server to Gemini CLI: the exact settings, how to sign in or use a key, and a request and reply to check it works.

Connect Gemini CLI to 1Post by adding the MCP server at https://api.get1post.com/v1/mcp with your API key, or at https://api.get1post.com/v1/mcp/oauth to sign in. Gemini CLI then lists your accounts, schedules posts and reads results with your role. The steps and the exact Gemini CLI settings are below; actions that cancel or reply need confirmation.

## Set up Gemini CLI

1. Make a key. In 1Post, make a key with write scope under Settings, then API keys.
2. Add the server. Run the add command with the HTTP transport and the key as a header. It writes the project config by default.
3. Check the connection. Start Gemini CLI and ask it to list your 1Post accounts.

## The Gemini CLI settings

**Add from the command line**

```bash
gemini mcp add --transport http --header "Authorization: Bearer op_live_YOUR_KEY" 1post https://api.get1post.com/v1/mcp
```

**~/.gemini/settings.json**

```json
{
  "mcpServers": {
    "1post": {
      "httpUrl": "https://api.get1post.com/v1/mcp",
      "headers": {
        "Authorization": "Bearer op_live_YOUR_KEY"
      }
    }
  }
}
```

The command writes .gemini/settings.json in the project; the user file ~/.gemini/settings.json serves every project.

## A request and its reply

Once connected, Gemini CLI sends tool calls like this one when you ask it to schedule a post. Account ids come from list_accounts.

**Tool call**

```json
{
  "name": "create_post",
  "arguments": {
    "accounts": [
      "ACCOUNT_ID"
    ],
    "text": "Doors open at nine.",
    "schedule_at": "2026-11-02T15:00:00Z"
  }
}
```

**Reply, abridged**

```json
{
  "id": "POST_ID",
  "status": "scheduled",
  "scheduled_at": "2026-11-02T15:00:00.000Z",
  "accounts": [
    {
      "account_id": "ACCOUNT_ID",
      "status": "queued"
    }
  ]
}
```

## What the connection can do

| Tool | What it does | Needs |
| --- | --- | --- |
| list_accounts | Lists connected accounts and their state | Read |
| create_post | Saves, schedules or publishes a post | Write |
| get_post | Reads one post and the result for each account | Read |
| cancel_post | Cancels a post that has not started | Write and confirm: true |

The connection acts with the role of the member who made the key or signed in, so a contributor's posts still go to review. The full tool list is on the [MCP page](https://get1post.com/docs/mcp.md).

## Questions

**User file or project file?**

Use the user file for a key you want everywhere and the project file only when the project should carry the connection.

**What can Gemini CLI do once it is connected?**

It can list your accounts, create and update posts, read results and analytics, and cancel or reply when you confirm. It cannot do more than the member behind the key or sign-in.

## Sources

- [Gemini CLI documentation: MCP servers](https://geminicli.com/docs/tools/mcp-server/), read 2026-10-26

## Related

- [Connect an assistant to 1Post over MCP](https://get1post.com/assistants.md)
- [The MCP server: 1Post docs](https://get1post.com/docs/mcp.md)
- [MCP sign-in with OAuth: 1Post docs](https://get1post.com/docs/mcp-oauth.md)
- [API authentication and keys: 1Post docs](https://get1post.com/docs/api-authentication.md)
