@togglhq/mcp 1.5.19

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/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@togglhq/mcp",
3
+ "version": "1.5.19",
4
+ "description": "Toggl Focus MCP server — @toggl/mcp on npm, @toggl/mcp-internal on GitHub Packages",
5
+ "license": "UNLICENSED",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/toggl/toggl-mcp.git"
9
+ },
10
+ "type": "module",
11
+ "publishConfig": {
12
+ "registry": "https://registry.npmjs.org",
13
+ "access": "public"
14
+ },
15
+ "files": [
16
+ "build/**/*.js",
17
+ "build/**/*.d.ts",
18
+ "skills/**",
19
+ "README.md"
20
+ ],
21
+ "bin": {
22
+ "mcp": "./build/index.js",
23
+ "toggl-mcp": "./build/index.js"
24
+ },
25
+ "exports": {
26
+ ".": {
27
+ "types": "./build/index.d.ts",
28
+ "import": "./build/index.js",
29
+ "default": "./build/index.js"
30
+ }
31
+ },
32
+ "scripts": {
33
+ "build": "tsdown",
34
+ "build:public": "tsdown",
35
+ "build:internal": "tsdown --config tsdown.config.internal.ts",
36
+ "build:watch": "tsdown --watch",
37
+ "typecheck": "tsgo -p tsconfig.json --noEmit",
38
+ "build:mcpb": "node scripts/build-mcpb-node.cjs",
39
+ "build:mcpb:node": "node scripts/build-mcpb-node.cjs",
40
+ "build:mcpb:binary": "node scripts/build-mcpb-binary.cjs",
41
+ "start": "node build/index.js",
42
+ "lint": "oxlint --deny-warnings src/**/*.ts tsdown.config.ts tsdown.config.internal.ts",
43
+ "lint:fix": "oxlint --deny-warnings --fix src/**/*.ts tsdown.config.ts tsdown.config.internal.ts",
44
+ "format": "oxfmt --write src skills package.json tsconfig.json tsdown.config.ts tsdown.config.internal.ts vitest.config.ts README.md",
45
+ "format:check": "oxfmt --check src skills package.json tsconfig.json tsdown.config.ts tsdown.config.internal.ts vitest.config.ts README.md",
46
+ "test": "pnpm --filter @toggl/operations run build && vitest run"
47
+ },
48
+ "engines": {
49
+ "node": ">=20"
50
+ },
51
+ "dependencies": {
52
+ "date-fns": "4.1.0"
53
+ },
54
+ "devDependencies": {
55
+ "@sentry/node": "10.47.0",
56
+ "@toggl/cli-core": "workspace:^",
57
+ "@toggl/focus-queries": "workspace:^",
58
+ "@toggl/operations": "workspace:^",
59
+ "@types/node": "22.19.11",
60
+ "tsdown": "0.21.8",
61
+ "vitest": "3.2.4"
62
+ }
63
+ }
@@ -0,0 +1,37 @@
1
+ # Internal Toggl MCP Workflows
2
+
3
+ Install `@toggl/mcp-internal` from **GitHub Packages** for internal builds that include staging, MS environments, and telemetry (`toggl-mcp-internal` / `mcp-internal` bins).
4
+
5
+ ## Environments
6
+
7
+ Use the public npm build by default. Use the GitHub internal build only when a Toggl engineer asks for staging or a named MS environment.
8
+
9
+ Run against staging:
10
+
11
+ ```bash
12
+ ENV=staging toggl-mcp-internal
13
+ ```
14
+
15
+ Run against a named MS environment:
16
+
17
+ ```bash
18
+ MS=<name> toggl-mcp-internal
19
+ ```
20
+
21
+ Explicit URL overrides still take precedence:
22
+
23
+ ```bash
24
+ TOGGL_FOCUS_API_URL=<url> TOGGL_ACCOUNTS_API_URL=<url> toggl-mcp-internal
25
+ ```
26
+
27
+ ## Telemetry
28
+
29
+ The GitHub internal build enables Sentry tracing by default with the internal DSN. Tool inputs and outputs are not recorded unless `SENTRY_RECORD_TOOL_IO=true`.
30
+
31
+ Disable telemetry:
32
+
33
+ ```bash
34
+ SENTRY_DSN=off toggl-mcp-internal
35
+ ```
36
+
37
+ Burst detection is enabled when telemetry is enabled. It attaches retry metadata to Sentry spans and logs warnings when an MCP client repeats the same tool rapidly.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: toggl-mcp
3
+ description: Use the Toggl Focus MCP server to read and mutate Focus data (tasks, projects, time blocks, time entries, saved views, custom fields, attachments, organization and org-* domains, org-time-off-me, shared-status/holidays/working-hours tools), manage workspaces and saved profiles, authenticate, and mirror CLI-style workflows from an MCP client. Trigger when the user connects through Model Context Protocol tools rather than the terminal, or asks how to use toggl-focus MCP tools, confirm_token, dry_run, file uploads/downloads, workspace refresh, or profile switching.
4
+ ---
5
+
6
+ # Toggl Focus MCP
7
+
8
+ The MCP server exposes **entity tools** (one tool per domain, for example `tasks`, `projects`) plus **workspace**, **profile**, and **auth** tools. Behavior aligns with the shared `@toggl/operations` catalog used by `toggl` CLI—see the `toggl-cli` skill for terminal equivalents (`toggl --json`, `--dry-run`, etc.).
9
+
10
+ ## Operating rules
11
+
12
+ - Prefer **list** / **get** before mutating when IDs are unknown.
13
+ - Entity calls use **`action`** plus optional **`data`** shaped for that action. Tool schemas list valid `action` values.
14
+ - **`dry_run: true`** validates input and returns `{ dry_run, operation, input }` without calling the API (like CLI `--dry-run`).
15
+ - **Mutations** (non-read operations): first call returns **`confirm_required`** and **`confirm_token`**; repeat the same arguments with **`confirm_token`** to execute once. **`dry_run: true`** skips the API and does not require a token.
16
+ - Use **`workspace-list`** with **`refresh: true`** when a workspace is missing from cache (same idea as `toggl workspace list --refresh`).
17
+ - **`profile-list`**, **`profile-switch`**, **`profile-remove`** control **`active.mcp`** in `~/.toggl/focus-tools.json`. Profiles are shared with the CLI; removing a profile removes it for both.
18
+ - **`profile-remove`** is destructive: first call returns **`confirm_required`** + **`confirm_token`**; call again with the same **`profile_name`** and **`confirm_token`** (same pattern as entity mutations).
19
+ - After **`auth`**, credentials use the same derived profile naming as CLI (`environment-userId`). **`logout`** clears the MCP active profile row only when **`active.mcp`** and that profile exist in **`~/.toggl/focus-tools.json`**. Older setups may still load **`~/.toggl-focus-mcp/config.json`** via compatibility—if logout says nothing was cleared, run **`auth`** once to migrate into the unified file, or delete the legacy path manually if discarding that session.
20
+ - **Files cross the tool boundary as local paths** (the server runs on the user's machine): upload attachments with `attachments-create` / `attachments-bulk-create` passing **`file_path`** / **`file_paths`** (mime inferred from extension, 20 MB cap); download with `attachments-view` passing **`save_to`** (refuses to replace an existing file unless **`overwrite: true`**).
21
+ - **List actions paginate** with `page` / `per_page` where the API supports it; request a page size instead of walking every page when summarizing large workspaces.
22
+ - Some mutations need elevated rights: **custom-fields mutations are workspace-admin-only** (expect 403 otherwise).
23
+
24
+ ## Tools overview
25
+
26
+ - **Entity domains**: tool names match `@toggl/operations` `mcp.entityTool` strings (examples: **`tasks`**, **`projects`**, **`saved-views`**, **`custom-fields`**, **`organization`**, **`org-invitations`**, **`shared-working-hours`**). Each tool accepts **`action`** values surfaced in server instructions and tool descriptions (hyphenated multi-word actions such as `bulk-patch`, `attachments-list`). Curated routing may group endpoints under the most helpful domain (for example composite flows and attachments under **`projects`** / **`tasks`**).
27
+ - **Workspace/auth**: **workspace-list** (optional `refresh`), **workspace-switch**, **profile-list**, **profile-switch**, **profile-remove**, **auth**, **logout**.
28
+ - Catalog entries marked hidden (e.g. calendar integrations, scheduler helpers, utilization targets) are omitted—parity with `visibleOperations()` in the CLI.
29
+
30
+ ## Installing from GitHub (`.mcpb`)
31
+
32
+ Releases ship **per-platform** binary bundles (no Node on `PATH`): pick `darwin-arm64`, `darwin-x64`, `linux-x64`, or `win32-x64` from the `@toggl/mcp@<version>` release assets—see [packages/mcp/README.md](https://github.com/toggl/toggl-mcp/blob/main/packages/mcp/README.md).
33
+
34
+ ## Read next
35
+
36
+ - Repository reference: [packages/mcp/README.md](https://github.com/toggl/toggl-mcp/blob/main/packages/mcp/README.md)
37
+ - Terminal parity: `toggl-cli` skill (`packages/cli/skills/toggl-cli/SKILL.md` in this repo)