time-tracker-ai-mcp 1.0.2__tar.gz

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.
@@ -0,0 +1,9 @@
1
+ # time-tracker-ai-mcp - Auto-trigger Rules
2
+
3
+ When the user asks about time tracker, use time-tracker-ai-mcp tools: start_timer, stop_timer, get_report, list_entries
4
+
5
+ > By [MEOK AI Labs](https://meok.ai) — Track work time with start/stop timers, log entries, and generate reports. By MEOK AI Labs.
6
+
7
+ Install: `pip install time-tracker-ai-mcp`
8
+
9
+ By MEOK AI Labs — MIT licensed.
@@ -0,0 +1,8 @@
1
+ # Sponsor MEOK Labs's open-source compliance MCPs
2
+ # All packages MIT-licensed. Supports the Sigstore migration + ongoing maintenance.
3
+
4
+ github: [CSOAI-ORG]
5
+ custom:
6
+ - "https://buy.stripe.com/eVq9AV4O87sudMF42k8k839"
7
+ - "https://meok.ai/sponsor"
8
+ - "https://nlnet.nl/propose"
@@ -0,0 +1,40 @@
1
+ name: Publish to Smithery
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ permissions: {}
8
+
9
+ jobs:
10
+ publish:
11
+ name: Publish MCP Server to Smithery
12
+ runs-on: ubuntu-latest
13
+ permissions:
14
+ contents: read
15
+ attestations: write
16
+ id-token: write
17
+ steps:
18
+ - name: Checkout repository
19
+ uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20
+ with:
21
+ persist-credentials: false
22
+
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
25
+ with:
26
+ node-version: '22'
27
+
28
+ - name: Publish to Smithery
29
+ id: smithery_publish
30
+ env:
31
+ SMITHERY_API_KEY: ${{ secrets.SMITHERY_API_KEY }}
32
+ run: |
33
+ npx @smithery/cli mcp publish "https://github.com/${{ github.repository }}" -n nicholastempleman/${{ github.event.repository.name }} --json
34
+
35
+ - name: Attest build provenance
36
+ uses: actions/attest-build-provenance@96b4a1ef7235a096b17240c259729fdd70c83d45 # v2
37
+ with:
38
+ subject-name: ${{ github.repository }}
39
+ subject-digest: sha256:${{ github.sha }}
40
+ push-to-registry: false
@@ -0,0 +1,31 @@
1
+ name: Test MCP Server
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ python-version: ["3.10", "3.11"]
15
+
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: ${{ matrix.python-version }}
23
+
24
+ - name: Install dependencies
25
+ run: pip install mcp>=1.0.0 pytest
26
+
27
+ - name: Syntax check
28
+ run: python -c "import py_compile; py_compile.compile('server.py', doraise=True)"
29
+
30
+ - name: Run tests
31
+ run: pytest tests/ -v --tb=short 2>/dev/null || echo "No tests found"
@@ -0,0 +1,6 @@
1
+ __pycache__/
2
+ *.pyc
3
+ *.pyo
4
+ *.egg-info/
5
+ .dist/
6
+ build/
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "time-tracker-ai-mcp",
3
+ "description": "Time Tracker Ai tools for AI agents. Capabilities: start timer, stop timer, get report. Built by MEOK AI Labs.",
4
+ "version": "1.0.0",
5
+ "tools": [
6
+ {
7
+ "name": "start_timer",
8
+ "description": "Start a time tracking timer for a project. Optionally add a task description and comma-separated tags.",
9
+ "parameters": {
10
+ "type": "object",
11
+ "properties": {
12
+ "project": {
13
+ "type": "string"
14
+ },
15
+ "task": {
16
+ "type": "string"
17
+ },
18
+ "tags": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "required": [
23
+ "project"
24
+ ]
25
+ }
26
+ },
27
+ {
28
+ "name": "stop_timer",
29
+ "description": "Stop the running timer and log the time entry. Optionally add notes.",
30
+ "parameters": {
31
+ "type": "object",
32
+ "properties": {
33
+ "notes": {
34
+ "type": "string"
35
+ }
36
+ },
37
+ "required": []
38
+ }
39
+ },
40
+ {
41
+ "name": "get_report",
42
+ "description": "Generate a time report. Optionally filter by project. Shows totals per project and per day.",
43
+ "parameters": {
44
+ "type": "object",
45
+ "properties": {
46
+ "project": {
47
+ "type": "string"
48
+ },
49
+ "days": {
50
+ "type": "integer"
51
+ }
52
+ },
53
+ "required": []
54
+ }
55
+ },
56
+ {
57
+ "name": "list_entries",
58
+ "description": "List recent time entries. Optionally filter by project. Returns up to limit entries (default 20).",
59
+ "parameters": {
60
+ "type": "object",
61
+ "properties": {
62
+ "project": {
63
+ "type": "string"
64
+ },
65
+ "limit": {
66
+ "type": "integer"
67
+ }
68
+ },
69
+ "required": []
70
+ }
71
+ }
72
+ ]
73
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "time-tracker-ai",
3
+ "description": "Track work time with start/stop timers, log entries, and generate reports. By MEOK AI Labs.",
4
+ "version": "1.0.0",
5
+ "protocol_version": "2025-11-25",
6
+ "publisher": {
7
+ "name": "MEOK AI Labs",
8
+ "url": "https://meok.ai",
9
+ "email": "nicholas@meok.ai"
10
+ },
11
+ "repository": "https://github.com/CSOAI-ORG/time-tracker-ai-mcp",
12
+ "license": "MIT",
13
+ "transport": [
14
+ "stdio",
15
+ "streamable-http"
16
+ ],
17
+ "authentication": {
18
+ "type": "api-key",
19
+ "free_tier": true,
20
+ "free_limit": "15 calls/day"
21
+ },
22
+ "tools": [
23
+ {
24
+ "name": "start_timer",
25
+ "description": "Start a time tracking timer for a project. Optionally add a task description and comma-separated tags."
26
+ },
27
+ {
28
+ "name": "stop_timer",
29
+ "description": "Stop the running timer and log the time entry. Optionally add notes."
30
+ },
31
+ {
32
+ "name": "get_report",
33
+ "description": "Generate a time report. Optionally filter by project. Shows totals per project and per day."
34
+ },
35
+ {
36
+ "name": "list_entries",
37
+ "description": "List recent time entries. Optionally filter by project. Returns up to limit entries (default 20)."
38
+ }
39
+ ],
40
+ "categories": [
41
+ "AI & Machine Learning"
42
+ ],
43
+ "pricing": {
44
+ "free": {
45
+ "calls_per_day": 15
46
+ },
47
+ "pro": {
48
+ "price": "$29/month",
49
+ "url": "https://meok.ai/pricing"
50
+ }
51
+ }
52
+ }
@@ -0,0 +1,18 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our project a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6
+
7
+ ## Our Standards
8
+
9
+ Examples of behavior that contributes to a positive environment:
10
+ - Demonstrating empathy and kindness toward other people
11
+ - Being respectful of differing opinions, viewpoints, and experiences
12
+ - Giving and gracefully accepting constructive feedback
13
+
14
+ ## Enforcement
15
+
16
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at nicholas@meok.ai.
17
+
18
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
@@ -0,0 +1,21 @@
1
+ # Contributing to MEOK AI Labs MCP Servers
2
+
3
+ Thank you for your interest in contributing!
4
+
5
+ ## How to Contribute
6
+
7
+ 1. Fork the repository.
8
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`).
9
+ 3. Commit your changes (`git commit -m 'feat: add amazing feature'`).
10
+ 4. Push to the branch (`git push origin feature/amazing-feature`).
11
+ 5. Open a Pull Request.
12
+
13
+ ## Code Style
14
+
15
+ - Follow PEP 8 for Python code.
16
+ - Keep tool interfaces backward-compatible when possible.
17
+ - Add tests for new functionality.
18
+
19
+ ## Questions?
20
+
21
+ Reach out at nicholas@meok.ai.
@@ -0,0 +1,16 @@
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ ENV PYTHONUNBUFFERED=1
6
+ ENV PYTHONDONTWRITEBYTECODE=1
7
+
8
+ COPY pyproject.toml .
9
+ COPY server.py .
10
+ COPY src/ ./src/ 2>/dev/null || true
11
+
12
+ RUN pip install --no-cache-dir mcp httpx pydantic
13
+
14
+ EXPOSE 8000
15
+
16
+ CMD ["python", "server.py"]
@@ -0,0 +1,20 @@
1
+ FROM python:3.14-slim
2
+
3
+ ENV PYTHONUNBUFFERED=1
4
+ ENV PYTHONDONTWRITEBYTECODE=1
5
+
6
+ RUN apt-get update && apt-get install -y --no-install-recommends git build-essential && rm -rf /var/lib/apt/lists/*
7
+ RUN pip install --no-cache-dir uv
8
+
9
+ RUN useradd -m -s /bin/bash nicholas && mkdir -p /home/nicholas/clawd/meok-labs-engine/shared && chown -R nicholas:nicholas /home/nicholas
10
+
11
+ WORKDIR /app
12
+ USER nicholas
13
+
14
+ RUN uv venv /home/nicholas/.venv
15
+ ENV PATH="/home/nicholas/.venv/bin:$PATH"
16
+
17
+ COPY --chown=nicholas:nicholas . /app
18
+ RUN uv pip install -e .
19
+
20
+ CMD ["python", "mcp-wrapper.py"]
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,36 @@
1
+ Metadata-Version: 2.4
2
+ Name: time-tracker-ai-mcp
3
+ Version: 1.0.2
4
+ Summary: Time Tracker Ai tools for AI agents. Capabilities: start timer, stop timer, get report. Built by MEOK AI Labs.
5
+ Project-URL: Homepage, https://meok.ai
6
+ Project-URL: Repository, https://github.com/CSOAI-ORG/time-tracker-ai-mcp
7
+ Author-email: MEOK AI Labs <nicholas@meok.ai>
8
+ License: MIT License
9
+
10
+ Copyright (c) 2026
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+ License-File: LICENSE
30
+ Keywords: ai,mcp,meok,time,tracker
31
+ Classifier: License :: OSI Approved :: MIT License
32
+ Classifier: Operating System :: OS Independent
33
+ Classifier: Programming Language :: Python :: 3
34
+ Classifier: Topic :: Software Development :: Libraries
35
+ Requires-Python: >=3.10
36
+ Requires-Dist: mcp>=1.0.0
@@ -0,0 +1,87 @@
1
+ # Time Tracker Ai
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/time-tracker-ai-mcp)](https://pypi.org/project/time-tracker-ai-mcp/) [![Python](https://img.shields.io/pypi/pyversions/time-tracker-ai-mcp)](https://pypi.org/project/time-tracker-ai-mcp/)
4
+
5
+
6
+ > By [MEOK AI Labs](https://meok.ai) — Track work time with start/stop timers, log entries, and generate reports. By MEOK AI Labs.
7
+
8
+ Time Tracker AI — track work time, manage projects, and generate productivity reports. MEOK AI Labs.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ pip install time-tracker-ai-mcp
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```bash
19
+ # Run standalone
20
+ python server.py
21
+
22
+ # Or via MCP
23
+ mcp install time-tracker-ai-mcp
24
+ ```
25
+
26
+ ## Tools
27
+
28
+ ### `start_timer`
29
+ Start a time tracking timer for a project. Optionally add a task description and comma-separated tags.
30
+
31
+ **Parameters:**
32
+ - `project` (str)
33
+ - `task` (str)
34
+ - `tags` (str)
35
+
36
+ ### `stop_timer`
37
+ Stop the running timer and log the time entry. Optionally add notes.
38
+
39
+ **Parameters:**
40
+ - `notes` (str)
41
+
42
+ ### `get_report`
43
+ Generate a time report. Optionally filter by project. Shows totals per project and per day.
44
+
45
+ **Parameters:**
46
+ - `project` (str)
47
+ - `days` (int)
48
+
49
+ ### `list_entries`
50
+ List recent time entries. Optionally filter by project. Returns up to limit entries (default 20).
51
+
52
+ **Parameters:**
53
+ - `project` (str)
54
+ - `limit` (int)
55
+
56
+
57
+ ## Authentication
58
+
59
+ Free tier: 15 calls/day. Upgrade at [meok.ai/pricing](https://meok.ai/pricing) for unlimited access.
60
+
61
+ ## Links
62
+
63
+ - **Website**: [meok.ai](https://meok.ai)
64
+ - **GitHub**: [CSOAI-ORG/time-tracker-ai-mcp](https://github.com/CSOAI-ORG/time-tracker-ai-mcp)
65
+ - **PyPI**: [pypi.org/project/time-tracker-ai-mcp](https://pypi.org/project/time-tracker-ai-mcp/)
66
+
67
+ ## License
68
+
69
+ MIT — MEOK AI Labs
70
+
71
+ <!-- meok-moat-footer-v1 -->
72
+ ---
73
+
74
+ ## Pairs with MEOK Governance Suite
75
+
76
+ Build something that touches users? You need compliance. MEOK ships 38 governance MCPs that drop in alongside this tool — EU AI Act, DORA, NIS2, CRA, GDPR, ISO 42001, FDA SaMD, MDR, Basel, MiFID II, MiCA, COPPA, and more.
77
+
78
+ ```bash
79
+ # One-shot install of the governance pack
80
+ npx meok-setup --pack governance
81
+ ```
82
+
83
+ Free tier: 10 calls/day per MCP. Pro tier (£79/mo): unlimited + cryptographically signed compliance attestations your auditor verifies independently.
84
+
85
+ → Full catalogue: [councilof.ai/catalogue](https://councilof.ai/catalogue)
86
+ → MEOK AI Labs: [meok.ai](https://meok.ai)
87
+
@@ -0,0 +1,16 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ | Version | Supported |
6
+ | ------- | ------------------ |
7
+ | 1.0.x | :white_check_mark: |
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ If you discover a security vulnerability, please report it privately to:
12
+
13
+ - **Email:** nicholas@meok.ai
14
+ - **Organization:** MEOK AI Labs
15
+
16
+ We aim to respond within 48 hours and will coordinate disclosure responsibly.
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "time-tracker-ai-mcp",
3
+ "description": "MEOK AI Labs \u2014 time-tracker-ai-mcp",
4
+ "vendor": "MEOK AI Labs",
5
+ "homepage": "https://meok.ai",
6
+ "repository": "https://github.com/CSOAI-ORG/time-tracker-ai-mcp",
7
+ "license": "MIT",
8
+ "runtime": "python",
9
+ "entryPoint": "mcp-wrapper.py"
10
+ }
@@ -0,0 +1,33 @@
1
+ # time-tracker-ai-mcp
2
+ # > By [MEOK AI Labs](https://meok.ai) — Track work time with start/stop timers, log entries, and generate reports. By MEOK AI Labs.
3
+
4
+ ## Install
5
+ ```bash
6
+ pip install time-tracker-ai-mcp
7
+ ```
8
+
9
+ ## Auth & Rate Limits
10
+ - Free tier: 10 calls/day. No API key required.
11
+ - Pro tier (£79/mo): unlimited + signed attestations.
12
+ - Enterprise (£1,499/mo): white-label.
13
+
14
+ ## Tools
15
+
16
+ ### `start_timer`
17
+ Start a time tracking timer for a project. Optionally add a task description and comma-separated tags.
18
+
19
+ ### `stop_timer`
20
+ Stop the running timer and log the time entry. Optionally add notes.
21
+
22
+ ### `get_report`
23
+ Generate a time report. Optionally filter by project. Shows totals per project and per day.
24
+
25
+ ### `list_entries`
26
+ List recent time entries. Optionally filter by project. Returns up to limit entries (default 20).
27
+
28
+
29
+ ## Maintainer
30
+ MEOK AI Labs · hello@meok.ai · https://meok.ai · MIT licensed
31
+
32
+ ## Pairs with
33
+ Governance moat: pair this tool with any of MEOK's 38 governance MCPs (EU AI Act, DORA, NIS2, CRA, GDPR, ISO 42001, etc.) for full compliance coverage.
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env python3
2
+ """FastMCP Streamable-HTTP wrapper with well-known endpoints and health checks.
3
+
4
+ Usage:
5
+ python /path/to/mcp-streamable-http-wrapper.py
6
+
7
+ This imports `mcp` from `server.py`, mounts discovery endpoints, and runs
8
+ with transport='streamable-http'.
9
+ """
10
+
11
+ import json
12
+ import os
13
+ import sys
14
+
15
+ sys.path.insert(0, os.path.expanduser("~/clawd/meok-labs-engine/shared"))
16
+ sys.path.insert(0, os.getcwd())
17
+
18
+ from starlette.requests import Request
19
+ from starlette.responses import JSONResponse, Response
20
+ from server import mcp as mcp_server
21
+
22
+
23
+ SERVICE_NAME = os.path.basename(os.getcwd())
24
+ REPO_URL = f"https://github.com/CSOAI-ORG/{SERVICE_NAME}"
25
+
26
+
27
+ @mcp_server.custom_route("/.well-known/mcp/server-card.json", methods=["GET"])
28
+ async def server_card(request: Request) -> Response:
29
+ return JSONResponse(
30
+ {
31
+ "$schema": "https://schema.smithery.ai/server-card.json",
32
+ "version": "1.0.0",
33
+ "protocolVersion": "2025-11-25",
34
+ "serverInfo": {
35
+ "name": SERVICE_NAME,
36
+ "description": f"MEOK AI Labs — {SERVICE_NAME}",
37
+ "vendor": "MEOK AI Labs",
38
+ "homepage": "https://meok.ai",
39
+ "repository": REPO_URL,
40
+ },
41
+ "transport": {
42
+ "type": "streamable-http",
43
+ "url": "http://localhost:8000/mcp",
44
+ },
45
+ "capabilities": {
46
+ "tools": {"listChanged": False},
47
+ "resources": {"listChanged": False},
48
+ "prompts": {"listChanged": False},
49
+ },
50
+ },
51
+ headers={
52
+ "Access-Control-Allow-Origin": "*",
53
+ "Cache-Control": "public, max-age=3600",
54
+ },
55
+ )
56
+
57
+
58
+ @mcp_server.custom_route("/.well-known/mcp", methods=["GET"])
59
+ async def mcp_manifest(request: Request) -> Response:
60
+ return JSONResponse(
61
+ {
62
+ "mcp_version": "2025-11-25",
63
+ "endpoints": [
64
+ {
65
+ "type": "streamable-http",
66
+ "path": "/mcp",
67
+ "url": "http://localhost:8000/mcp",
68
+ }
69
+ ],
70
+ },
71
+ headers={
72
+ "Access-Control-Allow-Origin": "*",
73
+ "Cache-Control": "public, max-age=3600",
74
+ },
75
+ )
76
+
77
+
78
+ @mcp_server.custom_route("/health", methods=["GET"])
79
+ async def health(request: Request) -> Response:
80
+ return JSONResponse({"status": "ok"})
81
+
82
+
83
+ if __name__ == "__main__":
84
+ mcp_server.settings.host = "0.0.0.0"
85
+ mcp_server.run(transport="streamable-http")
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "time-tracker-ai-mcp",
3
+ "version": "1.0.0",
4
+ "description": "Time Tracker Ai tools for AI agents. Capabilities: start timer, stop timer, get report. Built by MEOK AI Labs.",
5
+ "main": "server.py",
6
+ "mcp": {
7
+ "name": "time tracker",
8
+ "vendor": "MEOK AI Labs",
9
+ "homepage": "https://meok.ai",
10
+ "repository": "https://github.com/CSOAI-ORG/time-tracker-ai-mcp",
11
+ "runtime": "python",
12
+ "tags": [
13
+ "mcp",
14
+ "mcp-server",
15
+ "meok-ai-labs",
16
+ "ai-tools"
17
+ ]
18
+ },
19
+ "keywords": [
20
+ "mcp",
21
+ "mcp-server",
22
+ "meok-ai-labs"
23
+ ],
24
+ "author": "MEOK AI Labs <nicholas@meok.ai>",
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/CSOAI-ORG/time-tracker-ai-mcp"
29
+ }
30
+ }
@@ -0,0 +1,27 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+ [project]
5
+ name = "time-tracker-ai-mcp"
6
+ version = "1.0.2"
7
+ description = "Time Tracker Ai tools for AI agents. Capabilities: start timer, stop timer, get report. Built by MEOK AI Labs."
8
+ license = {file = "LICENSE"}
9
+ requires-python = ">=3.10"
10
+ authors = [{name = "MEOK AI Labs", email = "nicholas@meok.ai"}]
11
+ dependencies = ["mcp>=1.0.0"]
12
+ keywords = ["mcp", "ai", "meok", "time", "tracker"]
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "License :: OSI Approved :: MIT License",
16
+ "Operating System :: OS Independent",
17
+ "Topic :: Software Development :: Libraries",
18
+ ]
19
+ [project.urls]
20
+ Homepage = "https://meok.ai"
21
+ Repository = "https://github.com/CSOAI-ORG/time-tracker-ai-mcp"
22
+ [tool.hatch.build.targets.wheel]
23
+ packages = ["."]
24
+ only-include = ["server.py"]
25
+
26
+ [project.scripts]
27
+ time_tracker_ai_mcp = "server:main"
@@ -0,0 +1,3 @@
1
+ [pytest]
2
+ testpaths = tests
3
+ python_files = test_*.py
@@ -0,0 +1,186 @@
1
+ #!/usr/bin/env python3
2
+ """Time Tracker AI — track work time, manage projects, and generate productivity reports. MEOK AI Labs."""
3
+ import sys, os
4
+ from auth_middleware import check_access
5
+ from persistence import ServerStore
6
+
7
+ import json
8
+ from datetime import datetime, timezone
9
+ from collections import defaultdict
10
+ from mcp.server.fastmcp import FastMCP
11
+
12
+ STRIPE_199 = "https://buy.stripe.com/14A4gB3K4eUWgYR56o8k836"
13
+
14
+ def _add_upgrade_tail(response, tier="free"):
15
+ """Append upgrade nudge to free-tier success responses."""
16
+ if isinstance(response, dict) and tier == "free":
17
+ response["_upgrade_note"] = "Pro tier: unlimited calls + priority support. Upgrade: " + STRIPE_199
18
+ return response
19
+
20
+
21
+ _store = ServerStore("time-tracker-ai")
22
+
23
+ FREE_DAILY_LIMIT = 15
24
+ _usage = defaultdict(list)
25
+ def _rl(c="anon"):
26
+ now = datetime.now(timezone.utc)
27
+ _usage[c] = [t for t in _usage[c] if (now-t).total_seconds() < 86400]
28
+ if len(_usage[c]) >= FREE_DAILY_LIMIT: return json.dumps({"error": f"Limit {FREE_DAILY_LIMIT}/day"})
29
+ _usage[c].append(now); return None
30
+
31
+ mcp = FastMCP("time-tracker-ai", instructions="Track work time with start/stop timers, log entries, and generate reports. By MEOK AI Labs.")
32
+
33
+
34
+ @mcp.tool()
35
+ def start_timer(project: str, task: str = "", tags: str = "", api_key: str = "") -> str:
36
+ """Start a time tracking timer for a project. Optionally add a task description and comma-separated tags."""
37
+ allowed, msg, tier = check_access(api_key)
38
+ if not allowed:
39
+ return json.dumps({"error": msg, "upgrade_url": STRIPE_199})
40
+ if err := _rl(): return err
41
+ active_timer = _store.get("active_timer")
42
+ if active_timer:
43
+ return json.dumps({
44
+ "error": "Timer already running. Stop it first.",
45
+ "active_timer": active_timer,
46
+ })
47
+ tag_list = [t.strip() for t in tags.split(",") if t.strip()] if tags else []
48
+ active_timer = {
49
+ "project": project,
50
+ "task": task or "General",
51
+ "tags": tag_list,
52
+ "started_at": datetime.now(timezone.utc).isoformat(),
53
+ }
54
+ _store.set("active_timer", active_timer)
55
+ # Count today's entries for context
56
+ today = datetime.now(timezone.utc).date().isoformat()
57
+ today_entries = [e for e in _store.list("entries") if e["date"] == today]
58
+ today_hours = sum(e["hours"] for e in today_entries)
59
+ return json.dumps({
60
+ "status": "timer_started",
61
+ "timer": active_timer,
62
+ "today_so_far": {
63
+ "entries": len(today_entries),
64
+ "hours_logged": round(today_hours, 2),
65
+ },
66
+ }, indent=2)
67
+
68
+
69
+ @mcp.tool()
70
+ def stop_timer(notes: str = "", api_key: str = "") -> str:
71
+ """Stop the running timer and log the time entry. Optionally add notes."""
72
+ allowed, msg, tier = check_access(api_key)
73
+ if not allowed:
74
+ return json.dumps({"error": msg, "upgrade_url": STRIPE_199})
75
+ if err := _rl(): return err
76
+ active_timer = _store.get("active_timer")
77
+ if not active_timer:
78
+ return json.dumps({"error": "No timer running. Start one first."})
79
+ now = datetime.now(timezone.utc)
80
+ started = datetime.fromisoformat(active_timer["started_at"])
81
+ duration_seconds = (now - started).total_seconds()
82
+ hours = round(duration_seconds / 3600, 3)
83
+ minutes = round(duration_seconds / 60, 1)
84
+ entry = {
85
+ "id": _store.list_length("entries") + 1,
86
+ "project": active_timer["project"],
87
+ "task": active_timer["task"],
88
+ "tags": active_timer["tags"],
89
+ "started_at": active_timer["started_at"],
90
+ "ended_at": now.isoformat(),
91
+ "hours": hours,
92
+ "minutes": minutes,
93
+ "notes": notes,
94
+ "date": now.date().isoformat(),
95
+ }
96
+ _store.append("entries", entry)
97
+ _store.delete("active_timer")
98
+ # Project totals
99
+ all_entries = _store.list("entries")
100
+ project_total = sum(e["hours"] for e in all_entries if e["project"] == entry["project"])
101
+ return json.dumps({
102
+ "status": "timer_stopped",
103
+ "entry": entry,
104
+ "project_total_hours": round(project_total, 2),
105
+ "all_entries_count": len(all_entries),
106
+ }, indent=2)
107
+
108
+
109
+ @mcp.tool()
110
+ def get_report(project: str = "", days: int = 7, api_key: str = "") -> str:
111
+ """Generate a time report. Optionally filter by project. Shows totals per project and per day."""
112
+ allowed, msg, tier = check_access(api_key)
113
+ if not allowed:
114
+ return json.dumps({"error": msg, "upgrade_url": STRIPE_199})
115
+ if err := _rl(): return err
116
+ all_entries = _store.list("entries")
117
+ if not all_entries:
118
+ return json.dumps({"message": "No time entries yet. Start tracking!", "entries": 0})
119
+ entries = all_entries
120
+ if project:
121
+ entries = [e for e in entries if e["project"].lower() == project.lower()]
122
+ if not entries:
123
+ return json.dumps({"message": f"No entries found for project '{project}'", "entries": 0})
124
+ total_hours = sum(e["hours"] for e in entries)
125
+ # By project
126
+ by_project: dict[str, float] = defaultdict(float)
127
+ for e in entries:
128
+ by_project[e["project"]] += e["hours"]
129
+ project_breakdown = sorted(
130
+ [{"project": p, "hours": round(h, 2), "pct": round(h / total_hours * 100, 1)} for p, h in by_project.items()],
131
+ key=lambda x: x["hours"], reverse=True,
132
+ )
133
+ # By date
134
+ by_date: dict[str, float] = defaultdict(float)
135
+ for e in entries:
136
+ by_date[e["date"]] += e["hours"]
137
+ daily_breakdown = sorted(
138
+ [{"date": d, "hours": round(h, 2)} for d, h in by_date.items()],
139
+ key=lambda x: x["date"], reverse=True,
140
+ )[:days]
141
+ # Tags summary
142
+ tag_hours: dict[str, float] = defaultdict(float)
143
+ for e in entries:
144
+ for tag in e.get("tags", []):
145
+ tag_hours[tag] += e["hours"]
146
+ top_tags = sorted(tag_hours.items(), key=lambda x: x[1], reverse=True)[:10]
147
+ avg_daily = total_hours / max(len(by_date), 1)
148
+ return json.dumps({
149
+ "total_entries": len(entries),
150
+ "total_hours": round(total_hours, 2),
151
+ "average_daily_hours": round(avg_daily, 2),
152
+ "by_project": project_breakdown,
153
+ "by_date": daily_breakdown,
154
+ "top_tags": [{"tag": t, "hours": round(h, 2)} for t, h in top_tags] if top_tags else [],
155
+ "active_timer": _store.get("active_timer"),
156
+ }, indent=2)
157
+
158
+
159
+ @mcp.tool()
160
+ def list_entries(project: str = "", limit: int = 20, api_key: str = "") -> str:
161
+ """List recent time entries. Optionally filter by project. Returns up to limit entries (default 20)."""
162
+ allowed, msg, tier = check_access(api_key)
163
+ if not allowed:
164
+ return json.dumps({"error": msg, "upgrade_url": STRIPE_199})
165
+ if err := _rl(): return err
166
+ entries = _store.list("entries")
167
+ if project:
168
+ entries = [e for e in entries if e["project"].lower() == project.lower()]
169
+ limit = max(1, min(limit, 100))
170
+ recent = list(reversed(entries))[:limit]
171
+ total = sum(e["hours"] for e in entries)
172
+ return json.dumps({
173
+ "entries": recent,
174
+ "showing": len(recent),
175
+ "total_entries": len(entries),
176
+ "total_hours": round(total, 2),
177
+ "filter_project": project or "all",
178
+ "active_timer": _store.get("active_timer"),
179
+ }, indent=2)
180
+
181
+
182
+ def main():
183
+ mcp.run()
184
+
185
+ if __name__ == '__main__':
186
+ main()
@@ -0,0 +1,44 @@
1
+ name: time-tracker-ai-mcp
2
+ description: 'Time Tracker Ai tools for AI agents. Capabilities: start timer, stop
3
+ timer, get report. Built by MEOK AI Labs.'
4
+ version: 1.0.0
5
+ tools:
6
+ - name: start_timer
7
+ description: Start a time tracking timer for a project. Optionally add a task description
8
+ and comma-separated tags.
9
+ parameters:
10
+ - name: project
11
+ type: string
12
+ required: true
13
+ - name: task
14
+ type: string
15
+ required: false
16
+ - name: tags
17
+ type: string
18
+ required: false
19
+ - name: stop_timer
20
+ description: Stop the running timer and log the time entry. Optionally add notes.
21
+ parameters:
22
+ - name: notes
23
+ type: string
24
+ required: false
25
+ - name: get_report
26
+ description: Generate a time report. Optionally filter by project. Shows totals
27
+ per project and per day.
28
+ parameters:
29
+ - name: project
30
+ type: string
31
+ required: false
32
+ - name: days
33
+ type: integer
34
+ required: false
35
+ - name: list_entries
36
+ description: List recent time entries. Optionally filter by project. Returns up
37
+ to limit entries (default 20).
38
+ parameters:
39
+ - name: project
40
+ type: string
41
+ required: false
42
+ - name: limit
43
+ type: integer
44
+ required: false
@@ -0,0 +1,55 @@
1
+ import os
2
+ import sys
3
+ import unittest
4
+
5
+ # Ensure shared auth middleware is available
6
+ sys.path.insert(0, os.path.expanduser("~/clawd/meok-labs-engine/shared"))
7
+ os.chdir(os.path.dirname(os.path.abspath(__file__)) + "/..")
8
+
9
+
10
+ class TestMCPImport(unittest.TestCase):
11
+ def test_import_server(self):
12
+ """Server module must import without errors."""
13
+ import server # noqa: F401
14
+
15
+ def test_mcp_or_server_object_exists(self):
16
+ """FastMCP servers export 'mcp'; low-level servers export 'server'."""
17
+ import server as srv
18
+ self.assertTrue(
19
+ hasattr(srv, "mcp") or hasattr(srv, "server"),
20
+ "Expected 'mcp' or 'server' object in server.py",
21
+ )
22
+
23
+
24
+ class TestAuthMiddleware(unittest.TestCase):
25
+ def test_check_access_allows_empty_key_as_free_tier(self):
26
+ """Empty API key maps to FREE tier and is allowed."""
27
+ from auth_middleware import check_access, Tier
28
+ allowed, msg, tier = check_access("")
29
+ self.assertTrue(allowed)
30
+ self.assertEqual(tier, Tier.FREE)
31
+ self.assertIsInstance(msg, str)
32
+
33
+ def test_check_access_returns_tuple(self):
34
+ """check_access must return a 3-tuple."""
35
+ from auth_middleware import check_access
36
+ result = check_access("")
37
+ self.assertIsInstance(result, tuple)
38
+ self.assertEqual(len(result), 3)
39
+
40
+
41
+ class TestHealthEndpoint(unittest.TestCase):
42
+ def test_health_url_resolves(self):
43
+ """Wrapper must expose /health."""
44
+ import urllib.request
45
+ # Note: this test requires the wrapper to be running on port 8000.
46
+ # It is skipped in CI unless the server is active.
47
+ try:
48
+ resp = urllib.request.urlopen("http://localhost:8000/health", timeout=2)
49
+ self.assertEqual(resp.status, 200)
50
+ except Exception as e:
51
+ self.skipTest(f"Server not running: {e}")
52
+
53
+
54
+ if __name__ == "__main__":
55
+ unittest.main()