@togglhq/mcp 1.14.0 → 1.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,17 +1,64 @@
1
- # Toggl 2.0 MCP Server
1
+ # Toggl MCP
2
2
 
3
- A local MCP (Model Context Protocol) server that connects to the Toggl 2.0 API. Works with any MCP client including Claude Code and Claude Desktop.
3
+ Connect Claude, VS Code, Cursor and other MCP clients to Toggl 2.0: tasks, projects, time entries and workspace operations. Setup guide: [docs.toggl.com/toggl-mcp-and-cli](https://docs.toggl.com/toggl-mcp-and-cli).
4
4
 
5
- The server supports MCP `2026-07-28` and keeps compatibility with legacy MCP clients. JSON tool results include `structuredContent` for modern clients and a text fallback for older clients.
5
+ ## Remote MCP (recommended)
6
+
7
+ Add Toggl's remote MCP server to your client. There is nothing to install, and the client signs you in through your browser on first use.
8
+
9
+ | Region | URL |
10
+ | ------ | -------------------------------- |
11
+ | US | `https://focus.toggl.com/mcp` |
12
+ | EU | `https://focus.eu.toggl.com/mcp` |
13
+
14
+ [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=toggl&config=%7B%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Ffocus.toggl.com%2Fmcp%22%7D)
15
+ [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=toggl&config=eyJ1cmwiOiJodHRwczovL2ZvY3VzLnRvZ2dsLmNvbS9tY3AifQ%3D%3D)
16
+
17
+ The one-click buttons use the US URL; EU accounts should add the EU URL by hand.
18
+
19
+ ### Claude Code
20
+
21
+ ```bash
22
+ claude mcp add --transport http toggl https://focus.toggl.com/mcp
23
+ ```
24
+
25
+ Then run `/mcp` in Claude Code to sign in.
26
+
27
+ ### Claude Desktop and claude.ai
28
+
29
+ Open **Settings → Connectors → Add custom connector** and paste the URL for your region.
30
+
31
+ ## Hosted relay (clients that only run local servers)
32
+
33
+ If your MCP client cannot add a remote server, this package can relay the remote MCP instead. It is off unless you choose it, and an existing install never switches on its own:
34
+
35
+ ```json
36
+ {
37
+ "mcpServers": {
38
+ "toggl": {
39
+ "command": "npx",
40
+ "args": ["@togglhq/mcp"],
41
+ "env": { "TOGGL_MCP_MODE": "hosted" }
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ In the `.mcpb` bundles, set **Connection mode** to `hosted`. Set it back to `local` (or remove `TOGGL_MCP_MODE`) and restart to return to the local tools, profiles and `TOGGL_API_TOKEN`, unchanged.
48
+
49
+ - **Sign-in:** call **hosted-sign-in** (opens your browser) or run `npx @togglhq/mcp auth --hosted` (`--manual` for headless machines). The hosted sign-in is separate from CLI and local MCP profiles and is stored in `~/.toggl/mcp-hosted.json` (mode 0600); refreshing it never touches `focus-tools.json`. **hosted-sign-out** forgets it; **hosted-status** shows the mode, region and sign-in state.
50
+ - **Workspace:** use the hosted `list_workspaces` and `select_workspace` tools. Nothing is selected for you, and the selection is account-wide: it changes the active workspace for every hosted Toggl MCP connection on your account (for example claude.ai). Local profiles and `workspace-switch` do not apply here.
51
+ - **Changes:** in apps that show MCP Apps cards, a hosted tool with its own card is confirmed there. Every other hosted change first returns a `confirm_token` and a summary; repeating the call with that token runs that one action once. Failed calls are never retried; check before repeating.
52
+ - **Not supported in hosted mode:** `TOGGL_API_TOKEN`, custom or staging `TOGGL_FOCUS_API_URL` / `TOGGL_ACCOUNTS_API_URL` (only the exact US and EU addresses; for EU set both to `https://focus.eu.toggl.com` and `https://accounts.eu.toggl.com`), profile pinning, and the local entity tools. The server reports these instead of falling back to local mode.
53
+ - **Limitation:** the sign-in asks Toggl Accounts for the hosted `focus` scope and the `/mcp` resource, but the hosted server does not yet check a token's audience, so the hosted grant is not technically limited to `/mcp`.
6
54
 
7
- ## One-click install
55
+ ## Local server (legacy)
8
56
 
9
- [![Install in VS Code](https://img.shields.io/badge/Install_in-VS_Code-0098FF?style=flat-square&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect/mcp/install?name=toggl&config=%7B%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40togglhq%2Fmcp%22%5D%2C%22env%22%3A%7B%7D%7D)
10
- [![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/install-mcp?name=toggl&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkB0b2dnbGhxL21jcCJdfQ%3D%3D)
57
+ The original local server runs on your machine with Node.js. It is still supported for API-key and custom-URL setups, but new setups should use the remote MCP above.
11
58
 
12
- On first use, call the **auth** MCP tool to sign in (opens your browser). For Claude Code and Claude Desktop, see **Add to your MCP client** below.
59
+ The server supports MCP `2026-07-28` and keeps compatibility with legacy MCP clients. JSON tool results include `structuredContent` for modern clients and a text fallback for older clients.
13
60
 
14
- ## Install
61
+ ### Install
15
62
 
16
63
  ```bash
17
64
  npm install @togglhq/mcp
@@ -26,15 +73,15 @@ npx @togglhq/mcp auth
26
73
 
27
74
  For one-off runs without a local install: `npx -y @togglhq/mcp auth`.
28
75
 
29
- ## Add to your MCP client
76
+ ### Add to your MCP client
30
77
 
31
- ### Claude Code
78
+ #### Claude Code
32
79
 
33
80
  ```bash
34
81
  claude mcp add toggl-focus -- npx @togglhq/mcp
35
82
  ```
36
83
 
37
- ### Claude Desktop
84
+ #### Claude Desktop
38
85
 
39
86
  Add to your Claude Desktop config file:
40
87
 
@@ -54,33 +101,7 @@ Add to your Claude Desktop config file:
54
101
 
55
102
  Restart Claude Desktop after saving.
56
103
 
57
- ## Hosted mode
58
-
59
- If your MCP client can add a remote MCP server, prefer connecting it straight to Toggl's hosted MCP at `https://focus.toggl.com/mcp` (EU: `https://focus.eu.toggl.com/mcp`); the client handles sign-in itself.
60
-
61
- For clients that only run local servers, this package can relay the hosted MCP instead. It is off unless you choose it, and an existing install never switches on its own:
62
-
63
- ```json
64
- {
65
- "mcpServers": {
66
- "toggl": {
67
- "command": "npx",
68
- "args": ["@togglhq/mcp"],
69
- "env": { "TOGGL_MCP_MODE": "hosted" }
70
- }
71
- }
72
- }
73
- ```
74
-
75
- In the `.mcpb` bundles, set **Connection mode** to `hosted`. Set it back to `local` (or remove `TOGGL_MCP_MODE`) and restart to return to the local tools, profiles and `TOGGL_API_TOKEN`, unchanged.
76
-
77
- - **Sign-in:** call **hosted-sign-in** (opens your browser) or run `npx @togglhq/mcp auth --hosted` (`--manual` for headless machines). The hosted sign-in is separate from CLI and local MCP profiles and is stored in `~/.toggl/mcp-hosted.json` (mode 0600); refreshing it never touches `focus-tools.json`. **hosted-sign-out** forgets it; **hosted-status** shows the mode, region and sign-in state.
78
- - **Workspace:** use the hosted `list_workspaces` and `select_workspace` tools. Nothing is selected for you, and the selection is account-wide: it changes the active workspace for every hosted Toggl MCP connection on your account (for example claude.ai). Local profiles and `workspace-switch` do not apply here.
79
- - **Changes:** in apps that show MCP Apps cards, a hosted tool with its own card is confirmed there. Every other hosted change first returns a `confirm_token` and a summary; repeating the call with that token runs that one action once. Failed calls are never retried; check before repeating.
80
- - **Not supported in hosted mode:** `TOGGL_API_TOKEN`, custom or staging `TOGGL_FOCUS_API_URL` / `TOGGL_ACCOUNTS_API_URL` (only the exact US and EU addresses; for EU set both to `https://focus.eu.toggl.com` and `https://accounts.eu.toggl.com`), profile pinning, and the local entity tools. The server reports these instead of falling back to local mode.
81
- - **Limitation:** the sign-in asks Toggl Accounts for the hosted `focus` scope and the `/mcp` resource, but the hosted server does not yet check a token's audience, so the hosted grant is not technically limited to `/mcp`.
82
-
83
- ## Authentication
104
+ ### Authentication
84
105
 
85
106
  Uses **OAuth2 with PKCE** via the Toggl Accounts service. Credentials are stored in `~/.toggl/focus-tools.json` (mode 0600). Access tokens refresh automatically — call **auth** again (or run `npx @togglhq/mcp auth`) to switch workspaces or if your refresh token expires (after 4 weeks of inactivity).
86
107
 
@@ -88,7 +109,7 @@ Uses **OAuth2 with PKCE** via the Toggl Accounts service. Credentials are stored
88
109
 
89
110
  > **Unified config vs legacy file:** MCP **logout** only removes credentials when there is a matching profile row under **`~/.toggl/focus-tools.json`** with **`active.mcp`** set. Call **`auth`** once to migrate into the unified file if logout reports nothing was cleared (or run `npx @togglhq/mcp auth` from a terminal).
90
111
 
91
- ### CI or headless environments
112
+ #### CI or headless environments
92
113
 
93
114
  Set `TOGGL_API_TOKEN` to a personal Toggl API key (`toggl_sk_…`, from Toggl 2.0 **Settings → API token**). It takes precedence over any OAuth profile: no browser opens, nothing refreshes, and nothing is written to `~/.toggl/focus-tools.json`.
94
115
 
@@ -113,9 +134,9 @@ API keys only reach the Toggl 2.0 API. Tools that call Toggl Accounts return `re
113
134
 
114
135
  The `toggl` CLI (`@togglhq/cli`) honours the same variables; `--workspace-id` overrides `TOGGL_WORKSPACE_ID` there. The key is never logged and is redacted from error reports.
115
136
 
116
- ## Tools
137
+ ### Tools
117
138
 
118
- ### Entity tools
139
+ #### Entity tools
119
140
 
120
141
  One tool per domain (for example `tasks`, `projects`, `time-entries`, `organization`). Each tool accepts:
121
142
 
@@ -126,11 +147,11 @@ One tool per domain (for example `tasks`, `projects`, `time-entries`, `organizat
126
147
 
127
148
  **Mutation confirmation:** mutating tools return `confirm_required` with a `confirm_token` on the first call; repeat with `confirm_token` to execute.
128
149
 
129
- ### Deep links
150
+ #### Deep links
130
151
 
131
152
  - **deep-links** — read-only, no API calls. `action: "get"` returns the Toggl 2.0 web URL for a `task`, `project`, `time_entry`, `calendar_day`, `report` or `member` in the active organization and workspace, on the profile's environment (production or staging). It also returns a Track URL where the IDs map (members, by organization user ID); otherwise `track.url` is `null` with a `note` saying why. A time entry needs `task_id` to open directly; `calendar_day` opens the calendar on the week of its `date`. Example: `{ "action": "get", "data": { "entity": "report", "report_type": "detailed", "period": "prevMonth" } }`.
132
153
 
133
- ### Workspace, profiles, and auth
154
+ #### Workspace, profiles, and auth
134
155
 
135
156
  - **workspace-list** — list workspaces (`refresh: true` refetches from Accounts)
136
157
  - **workspace-switch** — set the active workspace
package/build/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as PUBLIC_SENTRY_PRIVACY_OPTIONS, c as initProductAnalytics, d as shutdownProductAnalytics, i as runMcpCli, l as resolveProductAnalyticsDistinctId, o as captureToolInvocation, s as getProductAnalyticsDistinctId, u as resolvePublicSentryDsn } from "./src-g5pldSDF.js";
2
+ import { a as PUBLIC_SENTRY_PRIVACY_OPTIONS, c as initProductAnalytics, d as shutdownProductAnalytics, i as runMcpCli, l as resolveProductAnalyticsDistinctId, o as captureToolInvocation, s as getProductAnalyticsDistinctId, u as resolvePublicSentryDsn } from "./src-Xaefc7X0.js";
3
3
  import * as Sentry from "@sentry/node";
4
4
  //#region src/analytics-tool-metadata.ts
5
5
  /**
@@ -162,7 +162,7 @@ function wrapServerWithProductAnalytics(server) {
162
162
  }
163
163
  //#endregion
164
164
  //#region src/cli.ts
165
- const packageVersion = "1.14.0";
165
+ const packageVersion = "1.14.1";
166
166
  let sentryEnabled = false;
167
167
  let productAnalyticsEnabled = false;
168
168
  runMcpCli({
package/build/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- import { i as runMcpCli, n as MCP_MAX_TOOL_INPUT_ELEMENTS, r as bootstrapServer, t as MCP_CACHE_TTL_MS } from "./src-g5pldSDF.js";
2
+ import { i as runMcpCli, n as MCP_MAX_TOOL_INPUT_ELEMENTS, r as bootstrapServer, t as MCP_CACHE_TTL_MS } from "./src-Xaefc7X0.js";
3
3
  export { MCP_CACHE_TTL_MS, MCP_MAX_TOOL_INPUT_ELEMENTS, bootstrapServer, runMcpCli };
@@ -62353,7 +62353,7 @@ function registerWorkspaceTools(server) {
62353
62353
  //#region src/package-version.ts
62354
62354
  function mcpPackageVersion() {
62355
62355
  try {
62356
- return "1.14.0";
62356
+ return "1.14.1";
62357
62357
  } catch {
62358
62358
  return "unknown";
62359
62359
  }
@@ -81692,7 +81692,7 @@ import_main.default.config({
81692
81692
  quiet: true,
81693
81693
  ignore: ["MISSING_ENV_FILE"]
81694
81694
  });
81695
- const packageVersion = "1.14.0";
81695
+ const packageVersion = "1.14.1";
81696
81696
  const MCP_CACHE_TTL_MS = 300 * 1e3;
81697
81697
  const MCP_MAX_TOOL_INPUT_ELEMENTS = 1e4;
81698
81698
  function resolvePublicUrls() {
@@ -81876,4 +81876,4 @@ function bootstrapServer(options = {}) {
81876
81876
  //#endregion
81877
81877
  export { PUBLIC_SENTRY_PRIVACY_OPTIONS as a, initProductAnalytics as c, shutdownProductAnalytics as d, runMcpCli as i, resolveProductAnalyticsDistinctId as l, MCP_MAX_TOOL_INPUT_ELEMENTS as n, captureToolInvocation as o, bootstrapServer as r, getProductAnalyticsDistinctId as s, MCP_CACHE_TTL_MS as t, resolvePublicSentryDsn as u };
81878
81878
 
81879
- //# sourceMappingURL=src-g5pldSDF.js.map
81879
+ //# sourceMappingURL=src-Xaefc7X0.js.map
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@togglhq/mcp",
3
- "version": "1.14.0",
3
+ "version": "1.14.1",
4
4
  "description": "Toggl 2.0 MCP server for Claude Code, Claude Desktop, and other MCP clients.",
5
5
  "license": "UNLICENSED",
6
+ "keywords": [
7
+ "toggl",
8
+ "mcp",
9
+ "model-context-protocol",
10
+ "time-tracking",
11
+ "tasks",
12
+ "projects",
13
+ "claude"
14
+ ],
6
15
  "type": "module",
7
16
  "publishConfig": {
8
17
  "registry": "https://registry.npmjs.org",
@@ -60,5 +69,6 @@
60
69
  "tsdown": "0.21.8",
61
70
  "vitest": "3.2.7"
62
71
  },
63
- "mcpName": "io.github.toggl/toggl-mcp"
72
+ "mcpName": "io.github.toggl/toggl-mcp",
73
+ "homepage": "https://docs.toggl.com/toggl-mcp-and-cli"
64
74
  }