cd /news/developer-tools/show-hn-vscode-inline-comments-with-… · home topics developer-tools article
[ARTICLE · art-60194] src=github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

Show HN: VSCode Inline Comments with MCP

A developer released an open-source VSCode extension that lets users and AI agents (via MCP) attach comments to highlighted text without modifying files. Comments are stored in a workspace JSON file, anchor to quoted text rather than line numbers, and update live in the editor. The tool supports CLI, MCP server, and editor UI, with features like stale detection and reflow re-anchoring.

read2 min views2 publishedJul 15, 2026
Show HN: VSCode Inline Comments with MCP
Image: source

Highlight text and attach comments to it — without modifying the file. Comments live in .comments.json

at the workspace root. Agents (Claude, via MCP) and you (via the editor or CLI) write to the same store, and the editor updates live.

Comments anchor to the text they quote, not to a line/character offset. Edit above a comment and it follows the prose. Rewrap a paragraph and it still resolves (whitespace is normalized away). Reword the quoted text entirely and the comment degrades to ⚠ stale

, pinned at its last known line — it is never silently dropped.

In the editor: select text → ⌥C

, or click the gutter +

on any line. Reply, edit, resolve, and delete from the thread UI.

From Claude: the MCP server exposes add_comment

, list_comments

, reply_to_comment

, update_comment

, resolve_comment

, unresolve_comment

, delete_comment

. Claude's comments show up labelled Claude

and appear in an open editor within ~1s.

From a terminal:

node dist/cli.mjs --workspace /path/to/project add \
  --file Chapter2.tex --quote "the exact text" --body "your comment"
node dist/cli.mjs --workspace /path/to/project list --all
php
src/anchor.ts     quote -> range resolution   (pure Node)
src/store.ts      .comments.json read/write   (pure Node)
src/extension.ts  Comments API, watcher, commands   <- the only file importing 'vscode'
src/mcp.ts        MCP stdio server
src/cli.ts        CLI

anchor.ts

and store.ts

must never import vscode

— that module only exists inside the extension host, and the MCP server and CLI are plain Node processes.

npm install
npm run build       # or: npm run watch
npm run typecheck
npm run package     # -> inline-comments-0.1.0.vsix
Setting Default
inlineComments.file
.comments.json
Store path, relative to workspace root
inlineComments.author
OS username Name recorded on comments you create
inlineComments.showResolved
false
Show resolved threads in the editor

Reflow re-anchoring collapses whitespace, but not line-comment markers. If you rewrap text that is itself commented out (LaTeX %

, //

, #

), the rewrap inserts a marker mid-quote and the comment goes stale

rather than re-anchoring. Rewrapping ordinary prose is unaffected.

── more in #developer-tools 4 stories · sorted by recency
── more on @vscode 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/show-hn-vscode-inlin…] indexed:0 read:2min 2026-07-15 ·