Developers

Connect with MCP

Use DoubleTime's MCP server to let AI tools work with approved account data and actions.

Server details

MCP clients use the same URL as the server endpoint and the OAuth resource.

MCP endpoint

https://doubletime.io/mcp

Paste this URL when your MCP client asks for the DoubleTime server.

MCP OAuth resource

https://doubletime.io/mcp

MCP clients request this resource and must include the mcp scope before tool calls are accepted.

Connection flow

  1. Add the server

    Add the MCP endpoint to an OAuth-capable MCP client such as Codex, Claude Code, Gemini CLI, OpenCode, Cursor, or ChatGPT.

  2. Approve OAuth access

    DoubleTime opens an approval screen where the user can review the client name, access target, and requested scopes.

  3. Use tools through the client

    The MCP client calls DoubleTime tools with the approved bearer token. Each tool still checks its required scopes.

  4. Review or revoke later

    Connected MCP clients appear in DoubleTime Connected Apps, where access can be reviewed or revoked.

Connect from CLI tools

These clients connect to the same DoubleTime MCP endpoint and complete access through OAuth. Approve only the scopes the agent needs for the work it will perform.

Codex CLI

Codex authenticates MCP servers from the shell, separate to an interactive Codex session.

Add the server

Run from your shell:

codex mcp add doubletime --url https://doubletime.io/mcp
Start OAuth

Codex opens the browser approval flow and stores the approved grant for this MCP server.

Run from your shell:

codex mcp login doubletime

DoubleTime shows a consent screen where the user can choose which scopes to approve.

Claude Code

Add the remote HTTP server. Claude Code will use OAuth discovery when the server requires authentication.

Add the server

Run from your shell:

claude mcp add --transport http doubletime https://doubletime.io/mcp
Authenticate in Claude Code

Claude opens the MCP panel. Select DoubleTime, then start the authentication flow.

Run from your shell:

claude /mcp

Complete the DoubleTime approval screen in the browser before using tools.

Gemini CLI

Add the streamable HTTP server. Gemini CLI handles OAuth discovery for remote MCP servers.

Add the server

Run from your shell:

gemini mcp add --transport http doubletime https://doubletime.io/mcp
Authenticate in Gemini CLI

Gemini starts OAuth for the named server and opens the browser approval flow.

Run from your shell:

gemini /mcp auth doubletime

OAuth requires browser access and a local callback so the approval flow can complete.

OpenCode

Add DoubleTime as a remote MCP server. OpenCode handles OAuth for authenticated remote MCP servers.

Add the server

Choose remote, then enter these details when prompted.

Server name

doubletime

Server URL

https://doubletime.io/mcp

Run from your shell:

opencode mcp add
Authenticate in OpenCode

OpenCode starts OAuth for the named server and opens the browser approval flow.

Run from your shell:

opencode mcp auth doubletime

OpenCode may also start OAuth automatically when the remote MCP server requests authentication.

Bearer token access

OAuth is preferred for interactive AI tools because each client can request access through the approval screen. Headless agents can also connect with a static bearer token when the MCP client supports custom HTTP headers.

Token requirements

  • Use a fine-grained API token, not a legacy dt_ token.
  • Select the MCP resource and include the mcp scope.
  • Add only the tool scopes the agent needs, such as tasks:read or invoices:write.
  • Store the token as a secret and rotate it when the agent host changes.

Header format

Authorization: Bearer <dtfg_token>

Configure the token on the MCP client or agent host that calls https://doubletime.io/mcp. Each tool call still checks the scopes on that token.

Available MCP tools

Tool availability depends on the scopes approved for the MCP client. Detailed payload rules are available inside the MCP server at doubletime://docs/tools.

Tool responses are scope-aware. A tool can succeed while omitting nested related records when the approved client does not have the related read scope.

AreaToolsScopes
Profileprofile.getprofile:read
Taskstasks.list, tasks.get, tasks.notes, tasks.invoice_import_candidates, tasks.create, tasks.update, tasks.delete, tasks.reordertasks:read, tasks:write
Time entriestime_entries.list, time_entries.get, time_entries.create, time_entries.update, time_entries.deletetime:read, time:write
Clients and projectsclients.list, clients.get, clients.create, clients.update, clients.delete, projects.list, projects.get, projects.create, projects.update, projects.deleteclients:read, clients:write, projects:read, projects:write
Tags and rulestags.list, tags.create, tags.update, tags.delete, rules.list, rules.get, rules.create, rules.update, rules.toggle_enabled, rules.deletetags:read, tags:write, rules:read, rules:write
Invoicesinvoices.list, invoices.get, invoices.create, invoices.update, invoices.delete, invoices.preview, invoices.sendinvoices:read, invoices:write, invoices:send
Invoice detailsinvoice_payments.list, invoice_payments.record, invoice_payments.delete, invoice_payment_receipts.send, invoice_adjustments.list, invoice_adjustments.create, invoice_adjustments.delete, invoice_artifacts.list, invoice_artifacts.delete, invoice_dispatches.list, invoice_dispatches.resendinvoices:read, invoices:write, invoices:send
Reports and Billing Hubreports.run, billing_hub.summary, billing_hub.invoice_selectionreports:read, billing:read

Built-in guidance

Built-in MCP docs resources

doubletime://docs/overview

High-level MCP behavior and permission guidance.

doubletime://docs/tools

Tool-by-tool scopes, payload expectations, and usage rules.

doubletime://docs/workflows/time-tracking

Workflow guidance for creating tasks and managing timers.

doubletime://docs/workflows/invoicing

Workflow guidance for drafting, previewing, sending, and recording invoice payments.

Built-in MCP prompts

doubletime.tool_usage

Explains how an agent should choose tools and read DoubleTime MCP documentation.

doubletime.time_tracking_workflow

Guides a time tracking workflow.

doubletime.invoice_workflow

Guides an invoicing workflow.

Related information

Safe use notes

  • The mcp scope is required for MCP access.
  • Settings scopes are not available on the MCP resource.
  • Tool responses are scope-aware and may omit nested records that fall outside the approved scopes.
  • Write tools require the matching read scope and may change account records.
  • Send, resend, receipt, preview, and delete tools should be treated as deliberate user actions.
  • If a tool returns Access denied or Resource not found, treat it as a real permission or ownership boundary.