Skip to main content
Glama
personal-timesheet-mcp

personal-timesheet-mcp

by cruzleedan

Timesheet MCP Server

A Model Context Protocol (MCP) server that provides CRUD operations for timesheet management via REST API endpoints.

šŸ‘¤ For End Users: See README-USER.md for simple installation instructions
šŸ‘Øā€šŸ’» For Developers: Continue reading below
šŸ“¦ Publishing: See Publishing Guide to distribute your connector

Features

  • Create timesheet entries

  • Read timesheet entries (list and get single)

  • Update existing entries

  • Delete timesheet entries

  • List Projects for reference

  • Configurable API base URL

  • Support for both Go and Node.js backend APIs

Related MCP server: TimePRO MCP Server

Prerequisites

  • Node.js 18 or higher

  • A running instance of the Timesheet Logger backend API

  • Claude Desktop (for integration)

Installation

  1. Navigate to the mcp directory:

cd mcp
  1. Install dependencies:

npm install
  1. Configure environment variables:

cp .env.example .env
# Edit .env and set TIMESHEET_API_BASE_URL
  1. Build the project:

npm run build

Configuration

Environment Variables

Create a .env file or set environment variables:

TIMESHEET_API_BASE_URL=http://localhost:3000/api

Claude Desktop Integration

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

For end users (after publishing to npm):

{
  "mcpServers": {
    "timesheet": {
      "command": "timesheet-mcp",
      "env": {
        "TIMESHEET_API_BASE_URL": "http://localhost:3000/api"
      }
    }
  }
}

For local development:

{
  "mcpServers": {
    "timesheet": {
      "command": "node",
      "args": ["/absolute/path/to/timesheet_logger/mcp/build/index.js"],
      "env": {
        "TIMESHEET_API_BASE_URL": "http://localhost:3000/api"
      }
    }
  }
}

Usage

Development Mode

Run in development mode with auto-reload:

npm run dev

Production Mode

Build and run:

npm run build
npm start

Available Tools

1. create_timesheet_entry

Create a new timesheet entry.

Parameters:

  • project_id (string, required): Project ID

  • date (string, required): Entry date (YYYY-MM-DD)

  • hours (number, required): Hours worked

  • description (string, optional): Entry description

  • billable (boolean, optional): Whether entry is billable (default: true)

2. list_timesheet_entries

List timesheet entries with optional filters.

Parameters:

  • start_date (string, optional): Filter by start date (YYYY-MM-DD)

  • end_date (string, optional): Filter by end date (YYYY-MM-DD)

  • project_id (string, optional): Filter by project ID

  • limit (number, optional): Maximum results (default: 50)

  • offset (number, optional): Offset for pagination (default: 0)

3. get_timesheet_entry

Get a single timesheet entry by ID.

Parameters:

  • entry_id (string, required): Entry ID

4. update_timesheet_entry

Update an existing timesheet entry.

Parameters:

  • entry_id (string, required): Entry ID

  • project_id (string, optional): New project ID

  • date (string, optional): New date (YYYY-MM-DD)

  • hours (number, optional): New hours

  • description (string, optional): New description

  • billable (boolean, optional): New billable status

5. delete_timesheet_entry

Delete a timesheet entry.

Parameters:

  • entry_id (string, required): Entry ID

6. list_projects

List available projects.

Parameters: None

7. create_project

Create a new project. Requires admin or manager role.

Parameters:

  • name (string, required): Project name

  • description (string, optional): Project description

  • is_active (boolean, optional): Whether project is active (default: true)

8. login

Manually trigger browser-based login. Opens a browser window for authentication.

Parameters: None

Note: Useful after logout or for manual authentication. If already logged in, will show current user.

9. logout

Logout from the current session and clear stored authentication tokens.

Parameters: None

Note: After logout, you will need to re-authenticate (via browser login) on the next request.

Testing

Test with Local Backend

  1. Start your backend API:

# From backend/api-nodejs or backend/api-go
docker-compose up
  1. Run the MCP server:

npm run dev
  1. Test through Claude Desktop or use the MCP Inspector

Troubleshooting

Connection Refused

  • Ensure the backend API is running

  • Verify the TIMESHEET_API_BASE_URL is correct

  • Check that the port matches your backend configuration

Authentication Errors

  • Verify API key if required by your backend

  • Check that the API endpoint supports the operations

Tool Not Found

  • Rebuild the project: npm run build

  • Restart Claude Desktop

  • Verify the path in Claude Desktop config is absolute

Development

Project Structure

mcp/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ index.ts              # Main MCP server entry point
│   ā”œā”€ā”€ config.ts             # Configuration management
│   ā”œā”€ā”€ types.ts              # TypeScript types
│   ā”œā”€ā”€ api/
│   │   ā”œā”€ā”€ client.ts         # HTTP client wrapper
│   │   └── timesheet.ts      # Timesheet API operations
│   └── tools/
│       ā”œā”€ā”€ create-entry.ts   # Create tool
│       ā”œā”€ā”€ list-entries.ts   # List tool
│       ā”œā”€ā”€ get-entry.ts      # Get tool
│       ā”œā”€ā”€ update-entry.ts   # Update tool
│       └── delete-entry.ts   # Delete tool
ā”œā”€ā”€ build/                    # Compiled output
ā”œā”€ā”€ package.json
ā”œā”€ā”€ tsconfig.json
└── README.md

Adding New Tools

  1. Create a new file in src/tools/

  2. Define the tool schema using Zod

  3. Implement the handler function

  4. Register the tool in src/index.ts

License

MIT

Available Tools

9 tools
create_projectB

Create a new project. Requires admin or manager role.

Inputs: name (required), is_active, description.

create_timesheet_entryB

Create a new timesheet entry with project, date, hours, and optional description

Inputs: date (required), hours (required), project_id (required), billable, +1 more.

delete_timesheet_entryB

Delete a timesheet entry by ID

Inputs: entry_id (required).

get_timesheet_entryB

Get a single timesheet entry by ID

Inputs: entry_id (required).

list_projectsA

List all available projects that can be used for timesheet entries

Inputs: no named parameters.

list_timesheet_entriesA

List timesheet entries with optional filters for date range, project, and pagination

Inputs: limit, offset, end_date, project_id, +1 more.

loginA

Login to your timesheet account via browser. Opens a browser window where you can enter your credentials. Use this after logout or to manually authenticate.

Inputs: no named parameters.

logoutA

Logout from the current timesheet session. Clears stored authentication tokens. You will need to re-authenticate (via browser login) on the next request.

Inputs: no named parameters.

update_timesheet_entryC

Update an existing timesheet entry. Only provided fields will be updated.

Inputs: entry_id (required), date, hours, billable, +2 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 9 tools

    Disambiguation5/5

    Each tool targets a distinct action and resource. Login and logout are separate from project and timesheet entry operations, and CRUD tools for timesheet entries are clearly delineated.

    Naming Consistency4/5

    Most tools follow a verb_noun pattern (e.g., create_project, list_timesheet_entries), but 'login' and 'logout' are single words, breaking the pattern slightly. Overall structure is clear.

    Tool Count5/5

    With 9 tools spanning authentication, project management, and timesheet entry CRUD, the count is well-scoped for the domain without being excessive or thin.

    Completeness4/5

    Core workflows are covered: authentication, project listing and creation, and full CRUD on timesheet entries. Missing project update/delete, but these are less critical for typical timesheet use.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      A comprehensive MCP server for time tracking, project management, and AI-powered memory storage using semantic search. It enables users to log time, manage client billing, and capture shared or personal ideas through integrated tools and team collaboration features.
      1
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      An MCP server that wraps the TimePRO API, enabling AI assistants to automatically create, view, and manage timesheets for authenticated users. It provides tools for searching clients and projects, retrieving configuration defaults, and performing full CRUD operations on timesheet entries.
      10
      MIT