[Integrations](https://hourbun.com/integrations)

# [Connect Gemini CLI to Hourbun](https://hourbun.com/integrations/gemini-cli)

By Fred Wu, maker of Hourbun · Checked 13 November 2026 · [Report a mistake](mailto:support@hourbun.com)

## The short answer

Gemini CLI adds Hourbun's MCP server with one command in your project: gemini mcp add, with the transport http, the header Authorization with a token of the page API & MCP, and the address of the server. In its settings, the address of such a server is httpUrl, not url. It then tracks time, runs your timer and reads your projects as you, with your role.

## Where in the app

- API & MCP → New token
- API & MCP → Connect an AI assistant

## What you need

- A Hourbun account in an active workspace
- Gemini CLI in a terminal, in your project
- A token of the page API & MCP

## Set it up

The setup that the page API & MCP of Hourbun gives, with the address of the server. In a setup with a token, put the text of your token in the place of `YOUR_TOKEN`.

### Gemini CLI (Token)

Run it in a terminal, in your project.

[Docs of Gemini CLI](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)

```
gemini mcp add --transport http --header "Authorization: Bearer YOUR_TOKEN" hourbun https://hourbun.com/api/v1/mcp
```

## What to ask

Ask in your own words: the assistant chooses the tools of Hourbun. Under each question, the tools that it calls. The tools of invoices and uninvoiced time answer for the owner and the admins.

- “What is not invoiced for Acme this month?” Calls `whoami`, then `get_uninvoiced`.
- “Track 3 hours on Website for yesterday: content updates.” Calls `list_projects`, then `create_time_entry`.
- “Discard my timer.” Calls `discard_timer`.
- “Which projects can I track time on?” Calls `list_projects`.

## A command in your project

`gemini mcp add --transport http` adds Hourbun to the settings of Gemini CLI as the server `hourbun`, with the header `Authorization` and the address of the server. Run it in a terminal, in the folder of your project.

## httpUrl, not url

Gemini CLI names the address of a server over HTTP `httpUrl`: its `url` is for a server of Server-Sent Events. Hourbun answers each request with JSON and opens no event stream, so a setup that you write by hand puts the address under `httpUrl`. With the address under `url`, Gemini CLI cannot reach Hourbun.

## Make a token

On the page **API & MCP** of Hourbun, **New token** opens a form with the **Name**, the **Access** and **Expires after**. Name the token after Gemini CLI, so that the list says where it is used. **Read** lets Gemini CLI read your projects, clients, time and expenses; **Read and write** also lets it track time and use your timer. A token can end after 7, 30, 90 or 365 days, or never.

**Create token** shows the text of the token once, with **Copy token**. Under **Use it with an AI assistant**, choose Gemini CLI: its setup has the token in it, and **Copy setup** copies it whole. After **Done**, no page shows the token again: Hourbun keeps only a secure hash of it. The token acts as you, in this workspace and with your role, until it expires or you revoke it.

## What Gemini CLI can do

Hourbun has one MCP tool for each operation of its API, and Gemini CLI gets only the tools that your role and the access allow. With **Read**, it reads your projects, clients, tasks, time entries, timer and expenses. With **Read and write**, it also tracks time, changes and deletes your time entries, and starts, pauses, resumes, stops and discards your timer. Invoices and uninvoiced time are for the owner and the admins of the workspace: a member or a manager gets no tool for them.

Each tool calls what the REST API calls, so Gemini CLI gets the same answers, amounts and refusals as a script. An entry on an issued invoice, or an approved or submitted one, is locked, and a money field that your role does not see is left out. Hourbun keeps no prompt and no chat: a tool receives only its arguments.

## Stop the connection

Each token and each connection is in the list of the page **API & MCP**, with its access, its status and the day of its last use. **Revoke** ends it at once, and Hourbun refuses the next request of Gemini CLI. The owner and the admins of the workspace can revoke it too, and it stops when you leave the workspace.

## Questions and answers

### Does Hourbun work with Gemini CLI?

Yes. Gemini CLI connects to Hourbun's MCP server over HTTP, with one command and a token in the header Authorization.

### Why can Gemini CLI not reach Hourbun from my settings file?

Check that the address is under httpUrl. Gemini CLI reads url as a server of Server-Sent Events, and Hourbun opens no event stream.

### Can Gemini CLI see the cost rates of my team?

Only when your role sees them: Hourbun leaves out of each result a money field that your role does not see, as in the app.

## Sources

The setup of Gemini CLI follows its own documents, read on 13 November 2026:

- [Gemini CLI documentation](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md)

## Related

- [The MCP server in the API reference](https://hourbun.com/developers#mcp)
- [Time tracking in the help centre](https://hourbun.com/help/time-tracking)
- [Time tracking apps with an MCP server](https://hourbun.com/best/time-tracking-apps-with-an-mcp-server)
- [ChatGPT](https://hourbun.com/integrations/chatgpt)
- [Claude](https://hourbun.com/integrations/claude)
- [Claude Code](https://hourbun.com/integrations/claude-code)
- [Codex](https://hourbun.com/integrations/codex)
- [Cursor](https://hourbun.com/integrations/cursor)
- [VS Code](https://hourbun.com/integrations/vscode)
- [All integrations](https://hourbun.com/integrations)
