KyteProject/togglgo-mcp
If you are the rightful owner of togglgo-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Toggl MCP Server is a lightweight Model Context Protocol server for Toggl time tracking, built in Go.
start_time_entry
Start a new time entry with a description and workspace ID.
stop_time_entry
Stop the current running time entry in a workspace.
get_current_time_entry
Retrieve the currently running time entry.
get_time_entries
Get time entries with optional date filtering.
get_time_entries_for_day
Get time entries for a specific day.
create_project
Create a new project in a workspace.
get_projects
Retrieve projects in a workspace with optional active status filtering.
Toggl MCP Server
A lightweight MCP (Model Context Protocol) server for Toggl time tracking, built in Go.
Features
Time Entry Management
- ā ļø start_time_entry - Start a new time entry
- ā ļø stop_time_entry - Stop the current running time entry
- ā get_current_time_entry - Get the currently running time entry
- ā get_time_entries - Get time entries with optional date filtering
- ā get_time_entries_for_day - Get time entries for a specific day (convenience)
Project Management
- ā create_project - Create a new project
- ā get_projects - Get projects in a workspace
TODO
- update_time_entry
- update_project
Out of Scope
For now I've chosen to leave these out-of-scope to minimise risk of accidental destructive actions.
- š« delete_project
- š« delete_entry
Project Structure
togglgo-mcp/
āāā main.go # Entry point
āāā app/
ā āāā client.go # Toggl API client
ā āāā handlers.go # MCP tool handlers
ā āāā types.go # Type definitions
ā āāā utils.go # Helper functions
āāā go.mod
āāā go.sum
āāā README.md
Setup
-
Get your Toggl API token from Toggl Track Profile
-
Set the environment variable:
export TOGGL_API_TOKEN=your_api_token_here
Installation
go mod tidy
go build -o toggl-mcp
Development
Prerequisites
- Go 1.21 or later
- Toggl API token for testing
Building and Testing
# Install dependencies
go mod tidy
# Run tests
go test ./app -v
# Run tests with coverage
go test ./app -cover
# Build the binary
go build -o toggl-mcp
# Run the MCP server (for debugging)
./toggl-mcp
Install & Usage with Claude Desktop
You can use this MCP server as a custom tool in Claude Desktop (Anthropic's desktop app) by configuring it in your Claude config file.
1. Build the MCP Server
go build -o toggl-mcp
3. Configure Claude Desktop
Edit (or create) your Claude Desktop config file, usually located at:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add a section pointing to the binary, for example:
{
"mcpServers": {
"toggl": {
"command": "/Users/yourname/togglgo-mcp/toggl-mcp",
"env": {
"TOGGL_API_TOKEN": "your-token-here"
}
}
}
}
Note:
- Make sure the
command
path points to your builttoggl-mcp
binary. - You can set the
TOGGL_API_TOKEN
here or in your shell environment. - Claude Desktop will launch the MCP server as needed.
4. Start Claude Desktop
- Restart Claude Desktop. It will detect and use your custom MCP tool.
- You can now use the Toggl tools from within Claude Desktop.
API Reference
Time Entry Tools
start_time_entry
description
(required) - Description of the time entryworkspace_id
(required) - Workspace IDproject_id
(optional) - Project ID
stop_time_entry
workspace_id
(required) - Workspace ID
get_current_time_entry
No parameters required.
get_time_entries
start_date
(optional) - Start date (YYYY-MM-DD)end_date
(optional) - End date (YYYY-MM-DD)
Important: The Toggl API uses inclusive start, exclusive end date logic. To get entries for a single day (e.g., July 9th), use start_date=2025-07-09
and end_date=2025-07-10
.
get_time_entries_for_day
date
(required) - Date to get entries for (YYYY-MM-DD)
Convenience tool that automatically handles the date range for a single day.
Project Tools
create_project
name
(required) - Project nameworkspace_id
(required) - Workspace IDcolor
(optional) - Project colorclient_id
(optional) - Client ID
get_projects
workspace_id
(required) - Workspace IDactive
(optional) - Filter by active status
Testing
The project includes comprehensive test coverage (86.4%) for all major components.
Running Tests
# Run all tests
go test ./app
# Run tests with verbose output
go test ./app -v
# Run tests with coverage
go test ./app -cover
# Generate detailed coverage report
go test ./app -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
# Generate function-level coverage report
go tool cover -func=coverage.out