yt-toggl-mcp
Provides tools for managing Toggl Track time entries, timers, projects, clients, tags, and reports via the Toggl Track API v9.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@yt-toggl-mcpWhat am I currently tracking?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
yt-toggl-mcp
A small, self-hosted MCP server for Toggl Track (API v9). It runs over stdio and exposes time tracking, projects/clients, and reporting to any MCP client.
No telemetry. The only network egress is to api.track.toggl.com. Workspace-level tokens are
stripped from every response and user emails are masked.
Tools
Tool | What it does |
| Verify the token; returns the (masked) user and accessible workspaces. |
| Remaining API requests and reset time per organization. |
| List accessible workspaces. |
| List projects in a workspace. |
| List clients in a workspace. |
| List tags in a workspace. |
| Return the running timer with elapsed seconds. |
| Load a single entry by id. |
| List entries for a |
| Create a completed entry ( |
| Edit an existing entry; only the fields you pass are changed. |
| Permanently delete an entry. |
| Start a running timer with optional description, project, tags. |
| Stop the running timer (or a specific |
| Total time for a range, grouped by project, sorted by hours. |
period accepts today, yesterday, week, lastWeek, month, lastMonth. Ranges are
interpreted in local time and end_date is inclusive at the tool boundary. since takes unix
seconds and, per Toggl, also returns entries deleted since that time.
Toggl enforces a sliding-window request quota per user per organization; on 402 the error
result carries quota_remaining and quota_resets_in_seconds.
toggl_report clips every entry to the requested range, so an entry crossing a boundary is neither
double-counted nor dropped. It scans backward in 84-day windows and respects Toggl's historical
retention boundary: if it reaches that boundary it returns incomplete: true together with
incomplete_reason, rather than reporting a silently short total. Any other error is propagated.
Related MCP server: solidtime-mcp-server
Configuration
Credentials live in a per-tool file under your home directory, matching the other yt-* MCP
servers. Environment variables take precedence, so the file is optional in CI or containers.
~/.yt-toggl-mcp/credentials.json:
{
"apiToken": "<your token>",
"workspaceId": 1234567
}Variable | Required | Default | Purpose |
| no |
| Toggl Track API token (track.toggl.com/profile). |
| no |
| Default workspace for workspace-scoped tools. |
| no |
| Metadata cache TTL in ms. |
A token must come from one of the two sources, otherwise the server exits with a message naming
the file to create. workspaceId is optional — omit it if you only have one workspace.
Install
Prerequisites: Node.js >=20.19.0 and a Toggl Track API token from
track.toggl.com/profile (scroll to the bottom → "Click to reveal").
npm
npx -y yt-toggl-mcpAny MCP client that speaks stdio works. Generic client config:
{
"mcpServers": {
"yt-toggl-mcp": {
"command": "npx",
"args": ["-y", "yt-toggl-mcp"]
}
}
}yt-toggl-mcp --help prints the credential path and the environment variables; --version prints
the version. Both write to stderr, since stdout carries the MCP protocol.
opencode
1. Create the credentials file
Write ~/.yt-toggl-mcp/credentials.json (Windows: C:\Users\<you>\.yt-toggl-mcp\credentials.json):
{
"apiToken": "<your token>",
"workspaceId": 1234567
}workspaceId is optional. Alternatively set TOGGL_API_KEY (and optionally
TOGGL_DEFAULT_WORKSPACE_ID) in the environment — env vars win over the file.
2. Register the server
Add this to ~/.config/opencode/opencode.jsonc (Windows:
C:\Users\<you>\.config\opencode\opencode.jsonc) under the existing mcp key:
{
"mcp": {
"yt-toggl-mcp": {
"type": "local",
"command": ["npx", "-y", "yt-toggl-mcp"]
}
}
}No environment block is needed: the server reads its own credentials file, like yt-gmail-mcp
and yt-zoho-mcp.
3. Restart opencode
Config is read once at startup and is not hot-reloaded, so the server only loads after a restart.
4. Verify
Ask opencode to call toggl_check_auth. It should return your (masked) account and workspace list.
A quick win after that: ask "what am I currently tracking?".
Development
npm install
npm run build
npm run lint
npm testnpm test runs the Vitest suite with HTTP mocked, so no token or live calls are needed.
node dist/index.js runs the built server locally — it reads the same credentials file described
above. npm run dev watches the source with tsx instead of building.
License
MIT © yentsun — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
- TimequipOAuthcom.timequip
Manage Timequip projects, tasks, comments, members, and dashboards through MCP.
- mcpOAuthnet.todoist
Official Todoist MCP server for AI assistants to manage tasks, projects, and workflows.
- mcp-serverOAuthio.klokin
MCP server exposing klokin time-tracking operations (employees, time entries, stores) to AI clients.
Read and write Mission Control state via MCP — projects, tasks, subtasks, templates, status updates.
Related MCP Servers
- FlicenseAqualityCmaintenanceMCP server for logging and checking Jira Cloud worklogs from AI agents such as Claude Code, Claude Desktop, Cursor, or any MCP client that supports stdio.71-
- AlicenseNot gradedqualityDmaintenanceMCP server for SolidTime — the open-source time tracking app. Enables start/stop timers, manage time entries, projects, clients, tags, and tasks directly from MCP-compatible clients.1MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server for Traggo, a tag-based time tracking tool. Manage time spans, timers and tags, get useful stats.GPL 3.0
- AlicenseBqualityCmaintenanceMCP server for Clockify time tracking, enabling CRUD operations on workspaces, projects, tasks, clients, tags, users, and time entries.36MIT