intervals-mcp

intervals-mcp

Enables local-first time tracking with timers and time entries stored in a SQLite database that sync to Intervals in the background, with local-only reporting and queries.

Category
访问服务器

README

intervals-mcp

A standalone MCP server, CLI, and Claude Code plugin for local-first Intervals time tracking. Starting a timer or logging a time entry hits a local SQLite database first; entries sync to Intervals in the background or on demand. Reports and queries are always local-only and never call the Intervals API.

Install (Claude Code plugin)

/plugin marketplace add sixfeetup/intervals-mcp
/plugin install intervals@intervals-mcp

There is no build step to run: the dist/ bundle is committed to the repo. The only requirement is Node >= 22.5.

Install (any MCP host)

Clone the repo and point your MCP host at the bundled server:

git clone https://github.com/sixfeetup/intervals-mcp.git
{
  "command": "node",
  "args": ["/path/to/intervals-mcp/dist/server.mjs"]
}

Configuration

Credentials and settings are resolved in this order:

  1. Environment variables
  2. config.json inside INTERVALS_HOME (or ~/.intervals/)

Environment variables

Variable Description
INTERVALS_API_KEY Intervals API key for HTTP Basic auth
INTERVALS_BASE_URL Intervals API base URL (default: https://api.myintervals.com/)
INTERVALS_PERSON_ID Your Intervals person ID (required for time-entry sync)
INTERVALS_HOME Override the default local storage path (~/.intervals/)

config.json keys

If you prefer file-based configuration, create config.json inside INTERVALS_HOME (or ~/.intervals/):

Key Type Description
apiKey string Intervals API key for HTTP Basic auth
baseUrl string Intervals API base URL (default: https://api.myintervals.com/)
personId number Your Intervals person ID (required for time-entry sync)
syncIntervalMs number Background sync interval in milliseconds

Running intervals setup (or the /intervals-setup slash command) writes this file with 0600 permissions and never puts the API key in model context — the key is entered at an interactive, hidden prompt in your own terminal.

CLI

The bundle ships a zero-dependency CLI (dist/cli.mjs, exposed as intervals via package.json#bin when installed as a package):

Command Description
setup Configure credentials and run initial project sync
status Show DB path, credential source, timers, pending sync
sync-projects Refresh the local project catalog
sync-now Push pending time entries to Intervals now
timers [recent] / timers edit <timer_id> [field=value ...] / timers delete <timer_id> Show, edit, or delete timers
time [range] / time edit <id> [field=value ...] Report time entries (today, yesterday, this-week, last-week, this-month, last-month, YYYY-MM-DD, YYYY-MM-DD..YYYY-MM-DD), or edit one (stop_time=HH:mm recalculates duration)
project-defaults <project_id> <worktype_id> [module_id] Set project defaults

Run node dist/cli.mjs help (or intervals help) for the full usage text.

Agent tools

When installed as a Claude Code plugin, tools surface with the mcp__plugin_intervals_intervals__ prefix:

Tool Description
mcp__plugin_intervals_intervals__find_project_context Search the local project catalog for IDs and classifications (local-only)
mcp__plugin_intervals_intervals__start_timer Start a local timer with a simple description and optional start_at; project/worktype/module are optional
mcp__plugin_intervals_intervals__stop_timer Stop a timer, resolve classification, create a pending time entry, and sync
mcp__plugin_intervals_intervals__edit_timer Update description or project/worktype/module hints on a running local timer
mcp__plugin_intervals_intervals__delete_timer Safely delete an active timer or stopped timer with no linked time entry
mcp__plugin_intervals_intervals__add_time Add a completed time entry directly (duration in minutes)
mcp__plugin_intervals_intervals__edit_time Edit an existing local time entry by short ID or linked timer ID; use stop_time for local stop-time changes that recalculate duration
mcp__plugin_intervals_intervals__delete_time Delete a local or synced time entry by short ID or linked timer ID
mcp__plugin_intervals_intervals__query_time Report time entries by date range and project filter (local-only)
mcp__plugin_intervals_intervals__list_timers List active or recent local timers
mcp__plugin_intervals_intervals__lookup_time_entry Map a stopped local timer ID to the linked local time entry ID
mcp__plugin_intervals_intervals__list_time List recent local time entries with sync status
mcp__plugin_intervals_intervals__set_project_defaults Configure default worktype/module for a project
mcp__plugin_intervals_intervals__sync_now Immediately retry syncing pending time entries to Intervals

mcp__plugin_intervals_intervals__start_timer accepts optional start_at values for retroactive local timer starts. Use HH:mm or H:mm for today in local time, YYYY-MM-DD HH:mm for a local date/time, or an ISO datetime with an explicit offset/timezone. Future start_at values are rejected.

Slash commands

Command Description
/intervals-setup Configure Intervals credentials and run the initial project sync
/intervals-status Show Intervals DB path, credential source, active timers, pending sync, last project sync
/intervals-sync-projects Refresh the local Intervals catalog of clients, projects, worktypes, and modules
/intervals-sync-now Push pending local time entries to Intervals now
/intervals-timers Show active or recent Intervals timers, or edit/delete a timer by ID
/intervals-time Report local time entries by range, or edit an entry by ID
/intervals-project-defaults Set the default worktype and optional module for a project

How it works

  • Timers are local-only. Starting a timer writes a lightweight local row with just a description. Project, worktype, and module hints are optional.
  • Running timers can be reclassified locally. Edit a timer's project, worktype, or module hints before stopping it; the updated classification is applied when the time entry is created.
  • Stop/apply creates a time entry. When you stop a timer, you provide (or resolve) the project and worktype. The server creates a pending time entry and immediately tries to sync it to Intervals.
  • Time entries are local-first. mcp__plugin_intervals_intervals__add_time, mcp__plugin_intervals_intervals__edit_time, and mcp__plugin_intervals_intervals__stop_timer all persist to SQLite before any network call. If sync fails, the entry stays local with a failed or pending status and can be retried.
  • Catalog sync stores active rows. Project sync fetches all catalog pages, keeps active projects and active classifications, and retains clients referenced by active projects.
  • Reports are local-only. mcp__plugin_intervals_intervals__query_time and /intervals-time read from SQLite and never call the Intervals API.

Developer note

If you open this repository itself in Claude Code, you may see the intervals MCP server listed as failed to connect. That's expected: the repo-root .mcp.json is the plugin's own configuration, and it references ${CLAUDE_PLUGIN_ROOT}, which is only set when the plugin is installed through /plugin install. Editing this repo's source doesn't install the plugin, so the variable is unset and the server can't start. It's safe to reject or ignore any prompt about it while working on the code.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选