Clawmarks
Enables LLM agents to create annotated bookmarks and narrative trails to document code exploration and decision-making. It organizes these bookmarks into a navigable knowledge graph stored in a local JSON file, helping users track the context and reasoning behind code changes.
README
<p align="center"> <img src="logo.png" alt="Clawmarks" width="128" height="128"> </p>
<h1 align="center">Clawmarks</h1>
<p align="center"> Storybook-style annotated bookmarks for code exploration. </p>
<p align="center"> <a href="https://www.npmjs.com/package/clawmarks"><img src="https://img.shields.io/npm/v/clawmarks.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/clawmarks"><img src="https://img.shields.io/npm/dm/clawmarks.svg" alt="npm downloads"></a> <a href="https://github.com/mrilikecoding/clawmarks/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/clawmarks.svg" alt="license"></a> <a href="https://nodejs.org"><img src="https://img.shields.io/node/v/clawmarks.svg" alt="node version"></a> </p>
The Problem
Working with an LLM agent on a complex problem often means iterating across multiple files, considering alternatives, making decisions, and building understanding over time. But when the conversation ends, you're left with a wall of chat history and modified files—no clear trail of where you went and why.
Clawmarks solves this by letting agents drop annotated bookmarks as they work. These clawmarks capture the narrative of your exploration: decision points, open questions, alternatives considered, and how they all connect. The result is a navigable map of your coding session, not just a transcript.
What It Does
Clawmarks is an MCP server that gives LLM agents tools to create annotated bookmarks in your codebase. Clawmarks are organized into trails (narrative journeys), can reference each other (knowledge graph style), and are stored in a simple JSON file that any editor can consume.
Each clawmark captures:
- Where - File, line, column
- What - An annotation explaining why this location matters
- Type - Decision, question, change needed, alternative approach, etc.
- Connections - References to other clawmarks (knowledge graph edges)
- Context - Tags and trail groupings
Quick Start
-
Install globally:
npm install -g clawmarks -
Add
.clawmarks.jsonto your global gitignore (one-time setup):echo ".clawmarks.json" >> ~/.gitignore_global git config --global core.excludesfile ~/.gitignore_global -
Add the MCP server:
Option A: Claude CLI (recommended)
claude mcp add --scope user clawmarks -- clawmarks mcpOption B: Manual configuration
Add to your project's
.mcp.json:{ "mcpServers": { "clawmarks": { "command": "clawmarks", "args": ["mcp"] } } }
The server stores .clawmarks.json in the current working directory. To override the project root:
claude mcp add --scope user clawmarks -- clawmarks mcp --env CLAWMARKS_PROJECT_ROOT=/path/to/project
Or in .mcp.json:
{
"mcpServers": {
"clawmarks": {
"command": "clawmarks",
"args": ["mcp"],
"env": {
"CLAWMARKS_PROJECT_ROOT": "/path/to/project"
}
}
}
}
MCP Tools
Trail Management
| Tool | Description |
|---|---|
create_trail |
Create a new trail to organize related clawmarks |
list_trails |
List all trails (optionally filter by status) |
get_trail |
Get trail details with all its clawmarks |
archive_trail |
Archive a completed trail |
Clawmark Management
| Tool | Description |
|---|---|
add_clawmark |
Add an annotated bookmark at a file location |
update_clawmark |
Update clawmark metadata |
delete_clawmark |
Remove a clawmark |
list_clawmarks |
List clawmarks with optional filters |
Knowledge Graph
| Tool | Description |
|---|---|
link_clawmarks |
Create a reference from one clawmark to another |
unlink_clawmarks |
Remove a reference |
get_references |
Get all clawmarks connected to a clawmark |
list_tags |
List all tags used across clawmarks |
Clawmark Types
decision- A decision point that was madequestion- Open question needing resolutionchange_needed- Code that needs modificationreference- Reference point (existing code to understand)alternative- Alternative approach being considereddependency- Something this depends on
Data Format
Clawmarks stores data in .clawmarks.json:
{
"version": 1,
"trails": [
{
"id": "t_abc123",
"name": "Auth Refactor Options",
"description": "Exploring JWT vs session-based auth",
"status": "active",
"created_at": "2025-12-17T10:30:00Z"
}
],
"clawmarks": [
{
"id": "c_xyz789",
"trail_id": "t_abc123",
"file": "src/auth/handler.ts",
"line": 42,
"column": 8,
"annotation": "Current session logic - could replace with JWT",
"type": "alternative",
"tags": ["#security", "#breaking-change"],
"references": ["c_def456"],
"created_at": "2025-12-17T10:31:00Z"
}
]
}
Editor Integrations
The .clawmarks.json file is designed to be consumed by any editor or tool.
| Editor | Plugin |
|---|---|
| Neovim | clawmarks.nvim |
| VS Code | Coming soon |
| Emacs | Contributions welcome |
Example Usage
In a conversation with your LLM agent:
"Let's explore two approaches to refactoring the auth system. Can you create a trail and mark the key decision points?"
The agent will:
- Create a trail called "Auth Refactor Options"
- Add clawmarks at relevant code locations
- Link related clawmarks together
- Tag clawmarks with relevant concerns
You can then browse these clawmarks in your editor to revisit the exploration's journey through your code.
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。