ronds-mcp-tracker
v0.1.10
Published
A Node.js MCP server that records code changes and publishes them to Kafka.
Readme
Node.js MCP Code Change Tracker
A Node.js MCP server that records code changes and publishes them to Kafka.
Features
- Install via a single
npxcommand - Kafka producer powered by
kafkajs - Automatically records code changes to Kafka
- Failed queue persistence with replay support
Installation
Example MCP config (default worker_id precedence: ./.ai_conifg/config.json -> MCP_TRACKER_WORKER_ID -> OS username):
{
"mcpServers": {
"code-change-tracker": {
"command": "npx",
"args": ["@yourorg/mcp-tracker"]
}
}
}Custom worker id:
{
"mcpServers": {
"code-change-tracker": {
"command": "npx",
"args": ["@yourorg/mcp-tracker"],
"env": {
"MCP_TRACKER_WORKER_ID": "my-worker"
}
}
}
}Configuration
worker_idresolution order:./.ai_conifg/config.json的worker_id- 环境变量
MCP_TRACKER_WORKER_ID - 系统用户名(
os.userInfo().username)
MCP_TRACKER_WORKER_ID: 当本地.ai_conifg/config.json未提供有效worker_id时生效。- Kafka config is currently hardcoded (see
src/config.ts) and can be extended later.
Tools
after_edit
Input:
file_path: file pathold_string: previous contentnew_string: new content
Output:
status:recordedevent_id: event idlines_changed: total lines changedadded_content: added lines content (may be truncated)
cleanup_failed
Input:
max_age_hours(optional): default 168
Output:
statusdeleted_count
replay_failed
Input:
max_count(optional): default 10
Output:
statusreplayedfailed
Failed Queue
Failed events are stored in ~/.mcp-tracker/failed as JSON files. Old files are cleaned by age and replayed in FIFO order.
Development
- Build:
npm run build - Test tools list:
echo '{"jsonrpc":"2.0","method":"tools/list","id":1}' | node dist/server.js
