npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@pulses/hubstaff-mcp

v2.1.1

Published

Hubstaff Time Tracking (API v2) and Hubstaff Tasks (API v1) MCP server

Readme

Hubstaff MCP Server (TypeScript)

A Model Context Protocol (MCP) server for integrating with Hubstaff Time Tracking (API v2) and Hubstaff Tasks (API v1).

Setup

Installation

npm install
npm run build

Environment Variables

Set one of the following authentication options:

# Option 1: Direct access token
export HUBSTAFF_ACCESS_TOKEN="your_access_token"

# Option 2: Refresh token (auto-refreshes)
export HUBSTAFF_REFRESH_TOKEN="your_refresh_token"

Running the Server

npm start

Or in development mode:

npm run dev

Tools

Users (1 tool)

  • hubstaff_get_current_user - Get current user information

Organizations (2 tools)

  • hubstaff_list_organizations - List all organizations
  • hubstaff_list_org_members - List organization members with pagination

Projects (3 tools)

  • hubstaff_list_projects - List projects with filtering and pagination
  • hubstaff_create_project - Create a new project
  • hubstaff_update_project - Update existing project

Activities (2 tools)

  • hubstaff_list_activities - List tracked activities with filters
  • hubstaff_list_daily_activities - List aggregated daily activities

Screenshots (1 tool)

  • hubstaff_list_screenshots - List screenshots from tracked time

Notes (1 tool)

  • hubstaff_list_notes - List notes from tracked time

App/URL Usage (2 tools)

  • hubstaff_list_app_usage - List application usage during tracked time
  • hubstaff_list_url_usage - List URL usage during tracked time

Tasks - Time Tracking API v2 (3 tools)

  • hubstaff_list_tasks - List tasks with filtering
  • hubstaff_get_task - Get specific task details
  • hubstaff_create_task - Create a new task

Reports (1 tool)

  • hubstaff_weekly_report - Generate weekly activity report

Board Tasks - Tasks API v1 (8 tools)

  • hubstaff_tasks_list_projects - List task board projects
  • hubstaff_tasks_list_columns - List project columns
  • hubstaff_tasks_list_tasks - List tasks in project
  • hubstaff_tasks_get_task - Get task details
  • hubstaff_tasks_create_task - Create board task
  • hubstaff_tasks_update_task - Update board task
  • hubstaff_tasks_delete_task - Delete board task
  • hubstaff_tasks_list_sprints - List project sprints

Webhooks (2 tools)

  • hubstaff_list_webhooks - List configured webhooks
  • hubstaff_create_webhook - Create new webhook

Features

Authentication

  • Automatic token refresh 60 seconds before expiry
  • Support for both access tokens and refresh tokens
  • Secure token caching

Response Formats

All tools support both json and markdown response formats:

  • response_format: "json" - Returns structured JSON
  • response_format: "markdown" - Returns formatted markdown (default)

Pagination

List tools support pagination with:

  • page_start_id - ID to start from
  • page_limit - Number of items (max 100)
  • has_more - Indicates more results available
  • next_page_start_id - ID for next page

Error Handling

  • 401: Authentication failed
  • 403: Permission denied
  • 404: Resource not found
  • 429: Rate limit exceeded (1000 req/hr)
  • Timeout: 30 second request timeout

Architecture

src/
├── index.ts          # Main server entry with tool registration
├── client.ts         # TokenManager and HTTP client
├── constants.ts      # API URLs and configuration
├── types.ts          # TypeScript interfaces
└── tools/
    ├── users.ts
    ├── organizations.ts
    ├── projects.ts
    ├── activities.ts
    ├── screenshots.ts
    ├── notes.ts
    ├── usage.ts
    ├── tasks.ts
    ├── reports.ts
    ├── board-tasks.ts
    └── webhooks.ts

Development

TypeScript

  • Strict mode enabled
  • Full type safety
  • ESM modules

Validation

  • Zod schemas with .strict() enforcement
  • Input validation on all parameters

Testing

To test locally, you can use the MCP Inspector:

npm run build
npx @modelcontextprotocol/inspector ./dist/index.js

API References

  • Hubstaff Time Tracking API v2: https://api.hubstaff.com/v2
  • Hubstaff Tasks API v1: https://api.hubstaff.com/v1
  • Auth: https://account.hubstaff.com/access_tokens