Fetches GitHub activity data through the companion Activity Collector MCP for generating timesheets based on commit history and repository activity.
Fetches GitLab activity data through the companion Activity Collector MCP for generating timesheets based on commit history and project activity.
Fetches Google Calendar events through the companion Activity Collector MCP for generating timesheets based on scheduled meetings and appointments.
Timesheet Assistant MCP
An MCP (Model Context Protocol) server for generating timesheets and submitting them to PSI Project Server (SharePoint-based timesheet systems).
Features
Timesheet Generation: Generate daily, weekly, monthly, or custom date range timesheets
PSI Integration: Automated submission to PSI Project Server
Activity Data Integration: Works with Activity Collector MCP for data fetching
Smart Summarization: Automatically summarizes work descriptions to 255 characters
Browser Automation: Uses Puppeteer for SharePoint authentication and form filling
Task Management: Hierarchical task tree navigation for PSI
Prerequisites
⚠️ Important: This MCP requires Activity Collector MCP to fetch activity data from GitLab, GitHub, and Calendar services.
Installation
Via npx (Recommended)
Via npm
From Source
Configuration
For Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
For Claude Code (VS Code)
Add to ~/Library/Application Support/Code/User/mcp.json:
Configuration File
Create ~/.timesheet-assistant-mcp-config.json:
Usage
First Time Setup
Configure PSI credentials:
Configure PSI with username: YOUR_USERNAME and password: YOUR_PASSWORD
Generating Timesheets
Daily:
Generate timesheet for todayWeekly:
Generate timesheet for this weekMonthly:
Generate timesheet for November 2024Date Range:
Generate timesheet from 2024-12-01 to 2024-12-07
Submitting to PSI
Generate timesheet (using Activity Collector MCP)
Get PSI tasks (call once, reuse for all days):
Get PSI tasks for 2024-12-05Select task from the hierarchical tree
Submit timesheet:
Submit to PSI for 2024-12-05 with task index 3 and description "..."
Available Tools (8)
Timesheet Generation (4 tools)
generate_timesheet- Generate monthly timesheetgenerate_weekly_timesheet- Generate weekly timesheetgenerate_daily_timesheet- Generate single day timesheetgenerate_date_range_timesheet- Generate custom date range timesheet
Note: These tools orchestrate the Activity Collector MCP to fetch data.
PSI Integration (4 tools)
configure_psi- Configure PSI credentialsget_psi_tasks- Get available tasks from PSI (call once per timesheet period)submit_to_psi- Submit timesheet entry to PSIinspect_psi_page- Debug PSI page structure
How It Works
Timesheet Generation Flow
LLM calls timesheet generation tool (e.g.,
generate_weekly_timesheet)Tool returns instructions for fetching data from Activity Collector MCP
LLM uses Activity Collector tools (
fetch_gitlab_activity,fetch_github_activity,fetch_google_calendar_events)LLM builds and formats the timesheet
PSI Submission Flow
Call
get_psi_tasksonce to get available tasksUser selects a task by index
Call
submit_to_psifor each day (reusing same task index)Browser automation fills SharePoint form and saves
PSI Integration Details
Uses Puppeteer for browser automation
Supports HTTP Basic Auth for SharePoint
Handles lazy-loaded accordion trees for task selection
Smart grid cell detection for SharePoint JSGrid
Automatic form filling with MouseEvent simulation
Security
PSI credentials stored in
~/.timesheet-assistant-mcp-tokens.jsonwith restricted permissions (600)Browser runs in non-headless mode by default (can see what's happening)
All data remains local
Troubleshooting
Activity Collector Not Available
Solution: Install and configure Activity Collector MCP
PSI Submission Fails
Solution: Run inspect_psi_page to check PSI page structure
Browser Crashes
Solution: Ensure Puppeteer dependencies are installed:
License
MIT
Contributing
Issues and pull requests welcome!
Author
Sharad Mathur (sharad.mathur@thepsi.com)
Related Projects
Activity Collector MCP - Required companion MCP for data fetching