{"slug": "show-hn-vscode-inline-comments-with-mcp", "title": "Show HN: VSCode Inline Comments with MCP", "summary": "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.", "body_md": "Highlight text and attach comments to it — without modifying the file. Comments live in\n`.comments.json`\n\nat the workspace root. Agents (Claude, via MCP) and you (via the editor\nor CLI) write to the same store, and the editor updates live.\n\nComments anchor to **the text they quote**, not to a line/character offset. Edit above a\ncomment and it follows the prose. Rewrap a paragraph and it still resolves (whitespace is\nnormalized away). Reword the quoted text entirely and the comment degrades to `⚠ stale`\n\n,\npinned at its last known line — it is never silently dropped.\n\n**In the editor:** select text → `⌥C`\n\n, or click the gutter `+`\n\non any line. Reply, edit,\nresolve, and delete from the thread UI.\n\n**From Claude:** the MCP server exposes `add_comment`\n\n, `list_comments`\n\n, `reply_to_comment`\n\n,\n`update_comment`\n\n, `resolve_comment`\n\n, `unresolve_comment`\n\n, `delete_comment`\n\n. Claude's\ncomments show up labelled `Claude`\n\nand appear in an open editor within ~1s.\n\n**From a terminal:**\n\n```\nnode dist/cli.mjs --workspace /path/to/project add \\\n  --file Chapter2.tex --quote \"the exact text\" --body \"your comment\"\nnode dist/cli.mjs --workspace /path/to/project list --all\nphp\nsrc/anchor.ts     quote -> range resolution   (pure Node)\nsrc/store.ts      .comments.json read/write   (pure Node)\nsrc/extension.ts  Comments API, watcher, commands   <- the only file importing 'vscode'\nsrc/mcp.ts        MCP stdio server\nsrc/cli.ts        CLI\n```\n\n`anchor.ts`\n\nand `store.ts`\n\nmust never import `vscode`\n\n— that module only exists inside the\nextension host, and the MCP server and CLI are plain Node processes.\n\n```\nnpm install\nnpm run build       # or: npm run watch\nnpm run typecheck\nnpm run package     # -> inline-comments-0.1.0.vsix\n```\n\n| Setting | Default | |\n|---|---|---|\n`inlineComments.file` |\n`.comments.json` |\nStore path, relative to workspace root |\n`inlineComments.author` |\nOS username | Name recorded on comments you create |\n`inlineComments.showResolved` |\n`false` |\nShow resolved threads in the editor |\n\nReflow re-anchoring collapses whitespace, but not line-comment markers. If you rewrap\ntext that is itself commented out (LaTeX `%`\n\n, `//`\n\n, `#`\n\n), the rewrap inserts a marker\nmid-quote and the comment goes `stale`\n\nrather than re-anchoring. Rewrapping ordinary prose\nis unaffected.", "url": "https://wpnews.pro/news/show-hn-vscode-inline-comments-with-mcp", "canonical_source": "https://github.com/gabi-a/inline-comments", "published_at": "2026-07-15 08:42:02+00:00", "updated_at": "2026-07-15 09:18:05.298155+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["VSCode", "Claude", "MCP"], "alternates": {"html": "https://wpnews.pro/news/show-hn-vscode-inline-comments-with-mcp", "markdown": "https://wpnews.pro/news/show-hn-vscode-inline-comments-with-mcp.md", "text": "https://wpnews.pro/news/show-hn-vscode-inline-comments-with-mcp.txt", "jsonld": "https://wpnews.pro/news/show-hn-vscode-inline-comments-with-mcp.jsonld"}}