Connect Command-Line AI Tools to Time Doctor (Claude Code, Codex CLI, Gemini) - Beta
Note: The AI connection (MCP) is available on all Time Doctor subscription plans and can be accessed by Owners, Admins, and Managers.
TL;DR:
Create a connection key in Time Doctor's Settings / AI Connections, then add Time Doctor as an MCP server in Claude Code, Codex CLI, Gemini Code Assist, or Antigravity using that key. Each tool uses a different command or config file, but all connect to the same Time Doctor MCP server URL.
Before Starting
- Have a Time Doctor login with the Owner, Admin, or Manager role.
- In Time Doctor, go to Settings / AI Connections, click Connect an AI Tool, select the tool, and click Create Connection. Copy the connection key. It is shown only once, so store it somewhere safe. In the commands below, replace
YOUR_API_KEYwith that key. - Open a terminal. On Windows, open the Start menu and search for PowerShell. On Mac, press Cmd + Space and search for Terminal.
Claude Code
- Run this command:
claude mcp add --transport http --scope user timedoctor https://api2.timedoctor.com/api/2.0/mcp/mcp --header "x-api-key: YOUR_API_KEY" - Start a new session by typing
claudein the terminal. The Time Doctor tools are ready to use.
Codex CLI
Codex CLI requires Node.js and a Codex-enabled OpenAI account. A standard ChatGPT login may not be enough — confirm the account has Codex access before starting.
- Install Codex CLI (skip this step if it is already installed):
npm install -g @openai/codex - Open the Codex config file:
~/.codex/config.tomlon Mac and Linux,%USERPROFILE%\.codex\config.tomlon Windows. This config applies to all Codex sessions on the machine. - Add this block, keeping the line breaks:
[mcp_servers.timedoctor]url = "https://api2.timedoctor.com/api/2.0/mcp/mcp"http_headers = { "x-api-key" = "YOUR_API_KEY" } - Start a new Codex session. If Codex does not use the tools automatically, mention Time Doctor directly in the request.
Gemini
The Gemini web app does not support custom MCP connections. Use one of the two paths below instead.
Gemini Code Assist (requires a Standard or Enterprise license)
-
- Install Gemini CLI (skip this step if it is already installed):
npm install -g @google/gemini-cli - Run this command to register Time Doctor:
gemini mcp add --transport http --scope user timedoctor https://api2.timedoctor.com/api/2.0/mcp/mcp --header "x-api-key: YOUR_API_KEY" - Type
geminito start a session and sign in with the licensed Google account.
- Install Gemini CLI (skip this step if it is already installed):
Antigravity (for individual Google accounts)
-
- Install Antigravity from antigravity.google/download, or install the Antigravity CLI following Google's install guide.
- Open Antigravity, click Settings in the bottom left, then Customizations.
- Under Installed MCP Servers, click Open MCP Config. Using the CLI instead? The file is
~/.gemini/config/mcp_config.jsonon Mac and Linux,%USERPROFILE%\.gemini\config\mcp_config.jsonon Windows. -
Add this block, then save and click Refresh in the app:
{"mcpServers": {"timedoctor": {"serverUrl": "https://api2.timedoctor.com/api/2.0/mcp/mcp","headers": {"x-api-key": "YOUR_API_KEY"}}}} - Start a conversation in the app, or run
agyin the terminal.
Next Step
See Getting Started: What to Ask Your Time Doctor AI Connection for examples of what to ask.
Should there be any inconsistencies or concerns regarding the article, contact support@timedoctor.com for prompt assistance.