Skip to content

saigontechnology/logtime-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Timesheet MCP Server

An MCP (Model Context Protocol) server for logging time to the Insider system.

Features

  • List all projects available to the user
  • Log time entries to specific projects with various rates and activities

Setup

Prerequisites

  • Python 3.10 or higher
  • The MCP framework (pip install mcp)
  • An Insider account with API access

Environment Variables

Set the following environment variables before running the server:

export INSIDER_AUTH_TOKEN="your-bearer-token-here"
export INSIDER_USER_ID="your-user-id"
export INSIDER_EMP_CODE="your-employee-code"

Installation

  1. Clone this repository
  2. Install the package:
pip install -e .

Usage

Running the Server

python -m timesheet_mcp

Tool: list_projects

Lists all projects available to the user.

{
  "name": "list_projects",
  "arguments": {}
}

Response:

{
  "projects": [
    {
      "id": 10522,
      "name": "Project Name"
    },
    ...
  ]
}

Tool: log_time_project

Logs time to a specific project.

{
  "name": "log_time_project",
  "arguments": {
    "projectId": 10522,
    "hours": 4,
    "logDates": ["2025-05-29"],
    "hourRate": 1.5,
    "activity": 1,
    "comment": "Working on feature X"
  }
}

Parameters:

  • projectId (required): Project ID from list_projects
  • hours (required): Number of hours to log (between 0.5 and 24)
  • logDate (required): List of Dates to log time for in YYYY-MM-DD format
  • hourRate (optional, default: 1.0): Hour rate (1 for normal, 1.5 for OT weekday, 2 for OT weekend, 3 for OT holiday)
  • activity (optional, default: 1): Activity type (1 for Code, 2 for Test)
  • comment (optional): Comment for the time entry

Response:

{
  "success": true,
  "message": "Time logged successfully",
  "details": {
    "status": "success"
  }
}

Running Tests

python -m unittest discover tests

License

MIT

About

Logtime MCP server for ST insider

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published