Skip to content

Connect VS Code to Hourbun

By Fred Wu, maker of Hourbun · Checked · Report a mistake

The short answer

VS Code reads the MCP servers of a project from .vscode/mcp.json, and uses them with GitHub Copilot. Put the setup of Hourbun there: the server hourbun under servers, with the type http, the address and the header with a token of the page API & MCP. Without the headers, VS Code signs in to Hourbun with OAuth instead. It then tracks time and reads your projects as you.

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.

VS Code Token Docs of VS Code Put it in .vscode/mcp.json of a project. It needs GitHub Copilot. Without the headers, VS Code signs in to Hourbun with OAuth instead.
{
  "servers": {
    "hourbun": {
      "type": "http",
      "url": "https://hourbun.com/api/v1/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

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.

  • “Resume my timer.”

    Calls resume_timer

  • “Track 2 hours on Website for today: bug fixes.”

    Calls list_projects then create_time_entry

  • “Delete the entry that I just added by mistake.”

    Calls list_time_entries then delete_time_entry

  • “Which clients do I work for?”

    Calls list_clients

A file of the project#

.vscode/mcp.json holds the MCP servers of one project, under servers. The setup of Hourbun is the server hourbun with the type http, the address of the server and the header Authorization. VS Code needs GitHub Copilot to use an MCP server.

The file is part of the project, so a token in it is a secret in the folder of the project. Keep the file out of a repository that others read, or leave the headers out: without them, VS Code signs in to Hourbun with OAuth, and each person connects with their own account and role.

Sign in instead of a token#

With no header, VS Code finds the sign-in of Hourbun in the first answer of the server. Sign in, then allow VS Code in the workspace of your choice. The connection is then in the list of the page API & MCP, beside your tokens.

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 VS Code, so that the list says where it is used. Read lets VS Code 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 VS Code: 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.

Allow the connection#

When VS Code opens Hourbun, sign in, and Hourbun asks you to allow it. The page names VS Code and where Hourbun sends your answer. Choose the Workspace and the Access: Read, or Read and write to also track time and use your timer. Then press Allow, or Deny.

The connection works in that one workspace, with your role there. Hourbun keeps it as a token of yours, with an access token that lives 1 hour and a refresh token that ends after 90 days without use, both only as secure hashes. The access of a connection never changes: for other access, connect VS Code again.

What VS Code can do#

Hourbun has one MCP tool for each operation of its API, and VS Code 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 VS Code 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 VS Code. The owner and the admins of the workspace can revoke it too, and it stops when you leave the workspace.

Questions

Questions and answers

Does Hourbun work with VS Code?

Yes. VS Code with GitHub Copilot connects to Hourbun's MCP server from .vscode/mcp.json, with a token in the header, or with a sign-in to Hourbun when the headers are left out.

Does VS Code need GitHub Copilot for Hourbun?

Yes. The setup of VS Code needs GitHub Copilot. Hourbun needs nothing more than its setup in .vscode/mcp.json, with a token or a sign-in.

Is my Hourbun token safe in .vscode/mcp.json?

It is a secret in the folder of the project: keep the file out of a repository that others read. Without the headers, VS Code signs in with OAuth, and no token is in the file.

Sources

The setup of VS Code follows its own documents, read on 13 November 2026:

Try Hourbun for free.

14 days, no card. Add a client, track your first hour, and send the invoice.