
Security News
Ruby's Bundler 4.0.18 Extends Cooldown to bundle lock and bundle cache
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.
@whenlabs/velocity-mcp
Advanced tools
MCP server that gives coding agents self-awareness of their execution speed
An MCP server that gives coding agents self-awareness of their own execution speed, enabling time-based planning and estimation.
Part of the WhenLabs toolkit — install all 6 tools with one command:
npx @whenlabs/when install
Note: velocity is now bundled into
@whenlabs/when. Runningnpx @whenlabs/when installgives you velocity plus five other tools in a single MCP server. This standalone package is still maintained for users who only want velocity.
Coding agents (Claude Code, Cursor, Codex, etc.) have no concept of time. They plan in terms of tasks but cannot estimate how long those tasks will take to execute. Every completed task is a data point about the agent's throughput -- but that data evaporates after each session. velocity-mcp fixes this by recording task-level execution telemetry, categorizing tasks, and estimating future plan duration based on historical performance.
velocity_end_task captures lines added/removed/files changed from git diff --stat and stores them with the task record; velocity_stats reports lines_per_minute throughputvelocity_estimate returns a p25–p75 range, median duration, and confidence level (high/medium/low/none based on similar task count)~/.velocity-mcp/velocity.db (or .velocity/velocity.db project-local)@modelcontextprotocol/sdkbetter-sqlite3 (WAL mode, zero-config)zoduuid v4Get velocity plus five other developer tools in a single MCP server:
npx @whenlabs/when install
If you only want velocity:
npx velocity-mcp install
This will:
~/.claude/CLAUDE.mdTo uninstall: npx velocity-mcp uninstall
claude mcp add velocity-mcp -- npx velocity-mcp
Add to your MCP config:
{
"mcpServers": {
"velocity-mcp": {
"command": "npx",
"args": ["velocity-mcp"]
}
}
}
npx velocity-mcp
git clone <repo-url>
cd velocity-mcp
npm install
npm run build
npm start
Umbrella vs standalone: the
@whenlabs/whenumbrella MCP server exposes onlyvelocity_start_taskandvelocity_end_task. The full set below — includingvelocity_estimate,velocity_stats, andvelocity_history— is available when you runvelocity-mcpas its own MCP server.
velocity_start_taskBegin timing a coding task.
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | No | Unique ID (auto-generated if omitted) |
category | enum | Yes | scaffold, implement, refactor, debug, test, config, docs, or deploy |
description | string | Yes | Short description of the task |
tags | string[] | No | Free-form tags for matching (e.g. typescript, react) |
estimated_files | number | No | Expected number of files to touch |
project | string | No | Project identifier (auto-detected from git remote if omitted) |
velocity_end_taskStop timing a task and record the result. Returns duration, and compares against historical performance for completed tasks.
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | Yes | The task ID to end |
status | enum | Yes | completed, failed, or abandoned |
actual_files | number | No | Files actually modified |
notes | string | No | Additional context |
velocity_estimateEstimate how long a multi-step plan will take based on historical data.
| Parameter | Type | Required | Description |
|---|---|---|---|
plan | array | Yes | List of planned tasks, each with category, optional tags, description, and optional estimated_files |
Returns per-task estimates with confidence levels and a total estimate.
velocity_statsQuery aggregate performance statistics.
| Parameter | Type | Required | Description |
|---|---|---|---|
group_by | enum | Yes | category, tag, project, day, or week |
filter_category | string | No | Filter to a specific category |
filter_tag | string | No | Filter to a specific tag |
filter_project | string | No | Filter to a specific project |
last_n_days | number | No | Time window (default: 30) |
velocity_historyView recent task records with full metadata.
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Max records to return (default: 20) |
filter_category | enum | No | Filter by category |
filter_status | enum | No | Filter by status (completed, failed, abandoned) |
When estimating a new task, the engine finds historical tasks using a weighted similarity score:
|A intersection B| / |A union B|)estimated_files is provided, tasks with similar file counts score higherTasks with similarity >= 0.3 are included. The duration estimate is the weighted median of matched tasks. When no historical data exists, a heuristic based on category and file count is used.
Confidence tiers:
| Level | Criteria |
|---|---|
high | 10+ similar historical tasks |
medium | 3-9 similar tasks |
low | 1-2 similar tasks |
none | No historical data (heuristic fallback) |
If you installed via npx @whenlabs/when install or npx velocity-mcp install, this is already configured globally. Otherwise, add this to your CLAUDE.md or system prompt:
## Task Timing
You have access to `velocity-mcp` tools. Follow these rules:
1. Before starting any discrete coding task, call `velocity_start_task` with appropriate category and tags.
2. After completing each task, call `velocity_end_task` with the result status.
3. When creating a multi-step plan, call `velocity_estimate` to provide the user with a time estimate.
4. If the user asks about your speed or performance, call `velocity_stats`.
velocity-mcp/
├── src/
│ ├── index.ts # MCP server entry point (stdio transport)
│ ├── lib.ts # Library exports for embedding in other MCP servers
│ ├── types.ts # Shared types, enums, and utility functions
│ ├── cli/
│ │ ├── install.ts # Global install command
│ │ ├── uninstall.ts # Global uninstall command
│ │ └── detect-project.ts # Auto project detection from git/cwd
│ ├── db/
│ │ ├── schema.ts # SQLite schema, migrations, DB initialization
│ │ └── queries.ts # Prepared statements for all database operations
│ ├── matching/
│ │ └── similarity.ts # Jaccard similarity, recency weighting, estimation engine
│ ├── tools/
│ │ ├── start-task.ts # velocity_start_task tool registration
│ │ ├── end-task.ts # velocity_end_task tool registration
│ │ ├── estimate.ts # velocity_estimate tool registration
│ │ ├── stats.ts # velocity_stats tool registration
│ │ └── history.ts # velocity_history tool registration
│ └── __tests__/
│ ├── similarity.test.ts
│ └── queries.test.ts
├── package.json
├── tsconfig.json
├── vitest.config.ts
└── .gitignore
# Install dependencies
npm install
# Build TypeScript
npm run build
# Watch mode for development
npm run dev
# Run tests
npm test
# Run tests in watch mode
npm run test:watch
# Start the server
npm start
Data is stored in SQLite at ~/.velocity-mcp/velocity.db (global) or .velocity/velocity.db (project-local, if a .velocity/ directory exists in your project root). The database uses WAL journal mode and contains two tables:
tasks -- every recorded task with id, category, tags (JSON), description, project, timestamps, duration, status, file counts, and notesmeta -- schema version and first-run dateBrand-new velocity installs have no history, so their first estimates fall back to heuristics and report confidence: none. Federation lets you upload a narrow slice of task telemetry to a shared endpoint in exchange for aggregate priors that warm-start estimates for thin categories.
⚠️ There is no public velocity server. The client speaks a documented HTTP contract, but you must deploy a server yourself. See
docs/federation-wire-format.mdforPOST /v1/tasksandGET /v1/priors.
npx velocity-mcp federation enable --endpoint https://your-server.example
npx velocity-mcp federation disable
npx velocity-mcp federation status
Federation is off by default. When enabled, only a privacy-whitelisted slice is uploaded (category, durations, file/line counts, model id, context size, tests-passed signal, and HMAC-hashed tags). The client refuses to upload anything else — description, notes, project, git_diff_stat, task id, and raw tag strings never leave the machine.
MIT
FAQs
MCP server that gives coding agents self-awareness of their execution speed
The npm package @whenlabs/velocity-mcp receives a total of 31 weekly downloads. As such, @whenlabs/velocity-mcp popularity was classified as not popular.
We found that @whenlabs/velocity-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.