Wakapi MCP Server
Query and analyze Wakapi development-time tracking data through an MCP server.
Retrieve coding statistics for a user over specified time ranges, filtered by project, language, editor, OS, machine, or label.
List and filter a user's projects.
Retrieve user profile information.
View leaderboard rankings.
Get all-time coding summary since today.
Retrieve detailed information for a specific project.
Fetch recent development logs/heartbeats across recent days, optionally filtered by project and limited in count.
Test connectivity to the Wakapi server.
Provides development time tracking tools by collecting logs from Wakapi REST API, including statistics, project details, leaderboards, and recent development activity logs
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., "@Wakapi MCP Server show me my coding stats from last week"
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.
Wakapi MCP Server
This is an MCP (Model Context Protocol) server. It provides development time tracking tools by collecting logs from Wakapi REST API.
This repository is unofficial. Use at your own risk.
Quick Start
Prerequisites
Python 3.11 or higher
Wakapi server with API access
MCP Server Configuration Examples
Quickstart with Environment Variables
{
"mcpServers": {
"wakapi": {
"env": {
"WAKAPI_URL": "http://localhost:3000",
"WAKAPI_API_KEY": "your-api-key"
},
"command": "uv",
"args": [
"tool",
"run",
"--from",
"git+https://github.com/impure0xntk/mcp-wakapi",
"wakapi-mcp"
]
}
}
}Enhanced Security with Configuration File
{
"mcpServers": {
"wakapi": {
"command": "uv",
"args": [
"tool",
"run",
"--from",
"git+https://github.com/impure0xntk/mcp-wakapi",
"wakapi-mcp",
"--config",
"/path/to/config.toml"
]
}
}
}Related MCP server: WakaTime MCP Server
Features
Collects development time logs via the Wakapi API
Provides MCP tools for retrieving development data
Fast processing using FastMCP
Reproducible development environment with Nix flakes
Modular tool architecture
Improved testability through dependency injection
Design based on the single responsibility principle
Provided Tools
This server provides the following tools that can be used by MCP-compatible clients:
Note: {api_path} is configurable: by default, /compat/wakatime/v1.
Please see the Configuration section.
Tool Name | Description | API Endpoint |
Get Stats | Retrieve statistics for a given user over a specified time range | |
Get Projects | Retrieve and filter the user projects | |
Get User | Retrieve the given user information | |
Get Leaders | Retrieve leaderboard information | |
Get All Time Since Today | Retrieve all time information since today | |
Get Project Detail | Retrieve detailed information about a specific project | |
Get Recent Logs | Retrieve recent development logs | |
Test Connection | Test connection to the Wakapi server | None |
Configuration Details
Environment Variables Configuration
The most common way to configure the server is through environment variables:
export WAKAPI_URL="http://your-wakapi-server:3000"
export WAKAPI_API_KEY="your_actual_api_key_here"
export WAKAPI_API_PATH="/compat/wakatime/v1"Or pass to mcpServers:
{
"mcpServers": {
"wakapi": {
"env": {
"WAKAPI_URL": "http://localhost:3000",
"WAKAPI_API_KEY": "your-api-key"
},
...Configuration Files
You can also use configuration files in TOML or JSON format:
TOML format (config.toml):
[wakapi]
url = "http://your-wakapi-server:3000"
api_key = "your_actual_api_key_here"
api_path = "/compat/wakatime/v1"
timeout = 30
retry_count = 3
[server]
host = "0.0.0.0"
port = 8000
[logging]
level = "INFO"
format = "%(asctime)s - %(name)s - %(levelname)s - %(message)s"JSON format (config.json):
{
"wakapi": {
"url": "http://your-wakapi-server:3000",
"api_key": "your_actual_api_key_here",
"api_path": "/compat/wakatime/v1",
"timeout": 30,
"retry_count": 3
},
"server": {
"host": "0.0.0.0",
"port": 8000
},
"logging": {
"level": "INFO",
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
}
}For Developers
Setup Development Environment
This project provides a reproducible development environment using Nix flakes:
# Start the development environment
nix develop
# Or start a shell
nix-shellAnd also use uv to activate, sync and run.
nix build for the packaged server does not currently succeed: MCP 2026-07-28
needs fastmcp 4.x on the mcp 2.x SDK, and no available nixpkgs carries it.
Use uv sync until nixpkgs ships fastmcp 4.
Starting the MCP Server from python command
# Set environment variables
export WAKAPI_URL="http://localhost:3000"
export WAKAPI_API_KEY="your_actual_api_key_here"
export WAKAPI_API_PATH="/compat/wakatime/v1"
# Start the server in STDIO mode (default)
python main.py --transport stdio
# Start the server in Streamable HTTP mode
python main.py --transport http
# Start with a configuration file
python main.py --config /path/to/config.tomlAuthentication Method: The API key is automatically base64-encoded and sent as a Bearer token.
--transport stdio: Uses STDIO transport (default). Can be used directly with MCP clients like opencode--transport http: Uses Streamable HTTP transport. The endpoint ishttp://<host>:<port>/mcp, with host and port taken from the[server]section of the config file
Streamable HTTP
MCP revision 2026-07-28 replaced the standalone SSE endpoint with a single Streamable HTTP endpoint. One route at /mcp carries initialize, tools/list and tools/call, including server-initiated SSE streams, so --transport sse no longer exists.
Add --stateless-http to run without server-side session state, which suits
serverless or horizontally scaled deployments that cannot keep sessions warm:
python main.py --transport http --stateless-httpTesting
You can test the server using pytest:
# Run all tests
pytest
# Run specific tests
pytest tests/test_mcp_server.py -vLicense
Apache License 2.0
Contributing
Issues and Pull Requests are welcome.
Available Tools
8 toolsget_all_time_since_todayGet All Time Since TodayC
Retrieve summary for all time since today for the specified user.
operationId: get-all-time summary: Retrieve summary for all time description: Mimics https://wakatime.com/developers#all_time_since_today tags: [wakatime] parameters:
name: user in: path description: User ID to fetch data for (or 'current') required: true schema: type: string responses: 200: description: OK schema: v1.AllTimeViewModel
Requires ApiKeyAuth: Set header Authorization to your API Key
encoded as Base64 and prefixed with Basic.
Inputs: user. Returns: Model for all time view.
get_leadersGet LeadersB
List of users ranked by coding activity in descending order.
operationId: get-wakatime-leaders summary: List of users ranked by coding activity in descending order. description: Mimics https://wakatime.com/developers#leaders tags: [wakatime] responses: 200: description: OK schema: v1.LeadersViewModel
Requires ApiKeyAuth: Set header Authorization to your API Key
encoded as Base64 and prefixed with Basic.
Inputs: no named parameters. Returns: Model for leaders view.
get_project_detailGet Project DetailB
Retrieve a single project.
Mimics undocumented endpoint related to https://wakatime.com/developers#projects.
Requires ApiKeyAuth: Set header Authorization to your API Key encoded as Base64
and prefixed with Basic.
Inputs: id (required), user. Returns: object
get_projectsGet ProjectsB
Retrieve and filter the user's projects.
operationId: get-wakatime-projects summary: Retrieve and filter the user's projects description: Mimics https://wakatime.com/developers#projects tags: [wakatime] parameters:
name: user in: path description: User ID to fetch data for (or 'current') required: true schema: type: string
name: q in: query description: Query to filter projects by schema: type: string responses: 200: description: OK schema: v1.ProjectsViewModel
Requires ApiKeyAuth: Set header Authorization to your API Key
encoded as Base64 and prefixed with Basic.
Inputs: q, user. Returns: Model for projects view.
get_recent_logsGet Recent LogsA
Get heartbeats of user for recent days (extension of heartbeats GET).
Mimics https://wakatime.com/api/v1/users/{user}/heartbeats for multiple days.
Requires ApiKeyAuth: Set header Authorization to your API Key encoded as Base64
and prefixed with Basic.
Inputs: days, user, limit, project_name. Returns: result
get_statsGet StatsB
Retrieve statistics for a given user.
operationId: get-wakatime-stats summary: Retrieve statistics for a given user description: Mimics https://wakatime.com/developers#stats tags: [wakatime] parameters:
name: user in: path description: User ID to fetch data for (or 'current') required: true schema: type: string
name: range in: path description: Range interval identifier required: true schema: type: string enum: [ "today", "yesterday", "week", "month", "year", "7_days", "last_7_days", "30_days", "last_30_days", "6_months", "last_6_months", "12_months", "last_12_months", "last_year", "any", "all_time" ]
name: project in: query description: Project to filter by schema: type: string
name: language in: query description: Language to filter by schema: type: string
name: editor in: query description: Editor to filter by schema: type: string
name: operating_system in: query description: OS to filter by schema: type: str
name: machine in: query description: Machine to filter by schema: type: string
name: label in: query description: Project label to filter by schema: type: string responses: 200: description: OK schema: v1.StatsViewModel
Requires ApiKeyAuth: Set header Authorization to your API Key
encoded as Base64 and prefixed with Basic.
Inputs: user (required), range (required), label, editor, +4 more. Returns: Model for stats view.
get_userGet UserC
Retrieve the given user.
operationId: get-wakatime-user summary: Retrieve the given user description: Mimics https://wakatime.com/developers#users tags: [wakatime] parameters:
name: user in: path description: User ID to fetch (or 'current') required: true schema: type: string responses: 200: description: OK schema: v1.UserViewModel
Requires ApiKeyAuth: Set header Authorization to your API Key
encoded as Base64 and prefixed with Basic.
Inputs: user. Returns: Model for user view.
test_connectionTest ConnectionA
Test Wakapi server connection via simple API call to fetch projects.
Returns: A dictionary with the connection test result, including: - status (str): 'success' or 'error'. - message (str): Description of the result. - projects_count (int, optional): Number of projects if successful. - server_url (str): The Wakapi server URL. - api_path (str): The API path used for requests. - error (str, optional): Error message if failed.
Inputs: no named parameters. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools target clearly different resources: user, projects, leaders, heartbeats, project detail, and connection test. However, get_stats and get_all_time_since_today could be confused when using the 'any' or 'all_time' range, and get_projects vs get_project_detail is close but distinguishable.
Tool names follow a mostly consistent get_* snake_case pattern for retrieval operations. test_connection is a reasonable exception for an action tool, though it slightly breaks the retrieval-oriented naming pattern.
Eight tools is well-scoped for a read-oriented Wakapi API wrapper. Each tool covers a distinct endpoint or operation without excessive redundancy.
The surface covers core read workflows: user info, stats, projects, project detail, leaders, recent heartbeats, all-time summary, and connection testing. Some WakaTime/Wakapi endpoints like summaries, durations, or heartbeat posting are missing, but common retrieval needs are mostly covered.
Maintenance
Related MCP Connectors
Read your WakaTime coding time: summaries, stats, projects, goals, commits and leaderboards.
Read your tracked time and projects, pause tracking or add a note, from Claude or ChatGPT.
GitHub stats, Wrapped, profile comparisons and README stats cards for any GitHub username.
Read tracked time and projects; create projects and start or stop timers in DeskTime.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables users to measure, track, and compare response times of GitHub Copilot and other AI models. Provides statistical analysis and performance comparison tools for evaluating AI model efficiency.-
- AlicenseNot gradedqualityDmaintenanceProvides access to WakaTime coding analytics data through MCP tools. Enables querying coding stats, activity summaries, project lists, and time tracking information from your WakaTime account.MIT
- AlicenseBqualityDmaintenanceEnables time tracking and project management through the Clockify API. Supports starting/stopping timers, logging time entries, managing projects and tasks, and generating reports with natural language commands.2116 npmMIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM agents to query and analyze ActivityWatch time tracking data, including window activity, web browsing, and category management with natural language time periods and automatic data aggregation.12GPL 3.0