npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

context-tracker-mcp

v1.0.5

Published

MCP server for tracking context, code changes, and generating documentation

Readme

Context Tracker MCP

एक powerful MCP agent जो आपके development context को कभी नहीं भूलता और automatic documentation generate करता है।

🚀 What's New (v1.0.0)

Concurrency Control - Thread-safe operations with Mutex & ReadWriteLock
Unit Testing - 70+ comprehensive Jest tests
Resource Pooling - Smart caching with TTL management
Error Analysis - Automatic error pattern detection
Project Intelligence - Code metrics and recommendations
Configuration Management - Dynamic config loading/updating
NPM Package Ready - Distribute to any PC


📦 Installation & Deployment

1. Install Dependencies

# MCP Server
cd mcp
npm install

# VSCode Extension
cd vscode-extension
npm install

2. Build the Project

# Build MCP Server
cd mcp
npm run build

# Build VSCode Extension
cd vscode-extension
npm run compile

3. VSCode Extension Setup

  1. VSCode में Ctrl+Shift+P press करें
  2. Extensions: Install from VSIX... select करें
  3. vscode-extension folder में generated .vsix file install करें

4. MCP Server Configuration

अपने MCP client में यह configuration add करें:

{
  "mcpServers": {
    "context-tracker": {
      "command": "node",
      "args": ["path/to/context-tracker-mcp/dist/index.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

🎯 Usage

VSCode Extension Commands

  • Ctrl+Shift+T: Track Current Context
  • Ctrl+Shift+H: Show Context History
  • Ctrl+Shift+D: Generate Documentation
  • Right-click on CSS: Track Styling

Windsurf Workflows

  • /context-track: Start tracking new context
  • /context-update: Update existing context
  • /generate-docs: Generate documentation
  • /context-error: Log an error

MCP Tools

// Track context
await trackContext('start', {
  description: 'Adding user authentication',
  files: ['src/auth.ts', 'components/Login.tsx']
});

// Generate documentation
const docs = await generateDocumentation('complete', 'markdown');

// Log error
await logError('TypeError: Cannot read property', 'Added null check', 'During login');

// Track styling
await trackStyling('.button', { color: 'blue', padding: '10px' }, 'styles.css');

📂 Project Structure

context-tracker-mcp/
├── src/
│   ├── index.ts                    # MCP Server entry point
│   ├── context-tracker.ts          # Core context tracking (Thread-safe)
│   ├── documentation-generator.ts # Auto documentation
│   ├── file-watcher.ts            # File change monitoring
│   ├── error-analyzer.ts          # Error pattern analysis ⭐ NEW
│   ├── project-intelligence.ts    # Code metrics & insights ⭐ NEW
│   ├── config-manager.ts          # Configuration management ⭐ NEW
│   ├── resource-manager.ts        # Smart caching ⭐ NEW
│   └── mutex.ts                   # Concurrency control ⭐ NEW
├── tests/                         # Unit tests ⭐ NEW
│   ├── context-tracker.test.ts
│   ├── config-manager.test.ts
│   ├── resource-manager.test.ts
│   ├── error-analyzer.test.ts
│   └── mutex.test.ts
├── vscode-extension/              # VSCode extension
│   └── context-tracker-vscode-1.0.0.vsix
├── .windsurf/workflows/           # Windsurf workflows
│   ├── co.md                      # Continue workflow ⭐ NEW
│   ├── context-track.md
│   └── generate-docs.md
├── context-data/                  # Local data storage
├── DEPLOYMENT_GUIDE.md            # Deployment instructions ⭐ NEW
└── README.md

🔧 Configuration

VSCode Settings

{
  "contextTracker.autoTrack": true,
  "contextTracker.watchedPaths": ["./src", "./components", "./styles"],
  "contextTracker.dataDirectory": "./context-data"
}

MCP Server Options

// Custom data directory
const tracker = new ContextTracker('./my-context-data');

// Custom watched paths
await fileWatcher.initialize(['./src', './lib', './styles']);

📊 Data Storage

सभी data locally store होता है:

  • context-data/context.json: Complete context history
  • context-data/errors.json: Error log with solutions
  • context-data/styling.json: Styling changes history

🎨 Examples

Starting a New Feature

# VSCode: Ctrl+Shift+T
# Description: Adding user registration system
# Files: src/auth/register.ts, components/RegisterForm.tsx

Logging an Error

# VSCode: Command Palette > Log Error
# Error: Cannot read property 'email' of undefined
# Solution: Added null validation before accessing email
# Context: During user registration validation

Tracking Styling

/* Select this CSS in VSCode and right-click > Track Styling */
.button {
  background: #007bff;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
}

Generate Documentation

# Windsurf: /generate-docs
# Type: complete
# Format: markdown

🚀 Advanced Usage

Custom MCP Integration

import { ContextTracker } from './src/context-tracker.js';

const tracker = new ContextTracker();

// Track complex context
await tracker.trackContext('start', {
  description: 'Building payment gateway',
  files: ['src/payment/', 'components/PaymentForm.tsx'],
  code: 'const payment = new PaymentProcessor();',
  metadata: {
    priority: 'high',
    estimatedHours: 8,
    dependencies: ['user-auth', 'database']
  }
});

Custom Documentation

import { DocumentationGenerator } from './src/documentation-generator.js';

const generator = new DocumentationGenerator(tracker);

// Generate custom documentation
const customDocs = await generator.generate('features', 'json');

� Deployment to Another PC

Method 1: NPM Package (Easiest)

# On your PC (create package)
npm run build
npm pack
# Creates: context-tracker-mcp-1.0.0.tgz

# On other PC (install)
npm install -g context-tracker-mcp-1.0.0.tgz
context-tracker-mcp

Method 2: VS Code Extension

# Package extension
cd vscode-extension
vsce package
# Creates: .vsix file

# Install on other PC via VS Code
# Extensions → Install from VSIX

Method 3: Full Project

# Copy entire project folder
# On other PC:
npm install
npm run build
npm start

�🐛 Troubleshooting

Common Issues

  1. MCP Server Not Starting

    npm run build
    node dist/index.js
  2. VSCode Extension Not Working

    • Restart VSCode
    • Check MCP server is running
    • Verify configuration
  3. File Watching Not Working

    • Check file permissions
    • Verify watched paths exist
    • Check .gitignore doesn't block files

Debug Mode

# Enable debug logging
DEBUG=context-tracker:* npm run dev

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if needed
  5. Submit a pull request

📄 License

MIT License - see LICENSE file for details

🙏 Acknowledgments

  • MCP (Model Context Protocol) team
  • VSCode extension API
  • Windsurf workflow system

Made with ❤️ for developers who never want to lose context!