Track-It Process Monitor
Enables Claude to monitor and inspect running processes through a lightweight wrapper that captures stdout/stderr logs and stores process metadata in SQLite. Users can track any command execution and query process status, logs, and history through natural language.
README
track-it: MCP Process Wrapper
A lightweight process tracker that enables Claude to monitor and inspect running processes through the Model Context Protocol (MCP).
Features
- 🚀 Simple CLI wrapper - Just prepend
track-itto any command - 🔍 Environment variable support - Pass env vars to tracked processes
- 📝 Separate stdout/stderr logs - Independent capture of output streams
- 💾 Persistent SQLite storage - Survives restarts, queryable history
- 🔒 Read-only MCP interface - Claude can observe but not execute
- 📊 Real-time monitoring - Tail logs of running processes
- 🛡️ Signal handling - Clean shutdown with Ctrl+C
Quick Start
Installation
- Clone the repository:
git clone https://github.com/scottmsilver/mcp-track-it.git
cd mcp-track-it
- Install MCP dependency:
pip install mcp
- Run the installer:
./install-and-test.sh
This will:
- Check Python installation
- Test the track-it wrapper
- Configure Claude's MCP settings
- Run a test process to verify everything works
Basic Usage
# Simple command
./track-it echo "Hello World"
# With custom ID
./track-it --id myapp python server.py
# With environment variables
./track-it PORT=8080 DEBUG=true -- python app.py
# Multiple env vars and options
./track-it --id webserver PORT=3000 HOST=0.0.0.0 -- npm start
Environment Variable Support
The new syntax supports passing environment variables to tracked processes:
# Format: track-it [options] [ENV=value ...] [--] command [args]
# Examples:
./track-it DATABASE_URL=postgres://localhost/mydb -- python manage.py runserver
./track-it --id worker REDIS_HOST=localhost WORKERS=4 -- python worker.py
Use -- to separate environment variables from the command when needed.
Claude Integration
Once installed, Claude can monitor your processes using these phrases:
- "List all my tracked processes"
- "Show me the logs for [process-id]"
- "Check if my server is still running"
- "Find any errors in the process logs"
What Claude Sees
When you run:
./track-it --id myserver PORT=8080 -- python server.py
Claude will see:
- Process ID:
myserver - Status:
runningorcompleted - Full command with arguments
- Environment variables that were set
- Complete stdout/stderr logs
- Exit code when completed
File Structure
mcp-track-it/
├── track-it # Main CLI wrapper
├── mcp_server.py # MCP server for Claude
├── process_registry.py # SQLite database interface
├── install-and-test.sh # Main installer
├── process_logs/ # Log files (auto-created)
│ ├── [process-id].log # Combined stdout+stderr
│ ├── [process-id].stdout.log
│ └── [process-id].stderr.log
└── process_registry.db # SQLite database (auto-created)
How It Works
- track-it wrapper captures your process output
- SQLite database stores process metadata
- Log files preserve stdout/stderr streams
- MCP server provides read-only access to Claude
User runs: track-it python app.py
↓
Creates 3 log files + DB entry
↓
Process runs with real-time output
↓
Claude can query via MCP server
Advanced Configuration
Custom Log Directory
Set the environment variable:
export MCP_PROCESS_WRAPPER_LOG_DIR=/path/to/logs
./track-it python app.py
Manual MCP Configuration
If you need to manually configure Claude's MCP settings, add to ~/.claude/mcp.json:
{
"mcpServers": {
"process-wrapper": {
"command": "python3",
"args": ["/path/to/mcp-track-it/mcp_server.py"],
"env": {
"MCP_PROCESS_WRAPPER_LOG_DIR": "/path/to/logs",
"MCP_PROCESS_REGISTRY_DB": "/path/to/process_registry.db"
}
}
}
}
Troubleshooting
Permission denied when running track-it:
chmod +x track-it
Claude can't see processes:
- Restart Claude Code after installation
- Verify MCP server is listed: Ask Claude to run
/mcpcommand
Process gets stuck when hitting Ctrl+C:
- Update to the latest version (this bug was fixed)
Logs not appearing:
- Check write permissions in the log directory
- Verify disk space is available
Recent Improvements
- ✅ Environment variable support - Pass env vars to tracked processes
- ✅ Absolute path storage - Reliable log file access across directories
- ✅ Fixed signal handling - Clean shutdown without infinite loops
- ✅ Better path resolution - MCP server correctly finds logs from any working directory
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
License
MIT License - See LICENSE file for details.
Author
Created as a lightweight alternative to complex process managers, specifically designed for Claude MCP integration.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。