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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-context-manager

v7.5.0

Published

Simple AI Context for Better Code Generation - Persistent context system for AI coding assistants

Downloads

344

Readme

MCP Context Manager

npm version

Version 7.5.0 - Simple AI Context for Better Code Generation

Give your AI coding assistants persistent memory of your project. Works with Claude Code, Cursor, GitHub Copilot, and more.

What It Does

MCP Context Manager solves the "context amnesia" problem of AI coding assistants by creating persistent context files that automatically load in every session.

Before: AI forgets your project structure, patterns, and conventions between chats
After: AI always knows your tech stack, coding standards, and project specifics

Quick Start

# Install globally
npm install -g mcp-context-manager

# Or use directly with npx
npx mcp-context-manager setup_context .

How It Works

1. Creates Smart Context Files

  • AI-CONTEXT.md: Project overview, tech stack, guidelines
  • AI-PATTERNS.md: Code examples and patterns to follow

2. Enables Auto-Loading

  • Cursor: Creates .cursorrules with full context
  • Claude Code: Creates CLAUDE.md with references to context files
  • GitHub Copilot: Creates .github/copilot-instructions.md
  • Continue: Creates .continue/context.md

3. Keeps Context Fresh

  • Git hooks remind you when context is outdated
  • Simple update command refreshes everything
  • File watchers keep all tools in sync

Available Tools (4 Total)

1. setup_context

Creates AI context files with smart defaults for your project.

# In Claude Code or via MCP
Use setup_context for the current directory

# Via CLI
npx mcp-context-manager setup_context .

Features:

  • Auto-detects framework, language, and patterns
  • Creates AI-CONTEXT.md and AI-PATTERNS.md
  • Generates practical templates with real examples

2. update_context

Provides a comprehensive checklist for AI agents to analyze your codebase and update context files.

# Update everything with checklist
Use update_context for the current directory

# Update specific sections
Use update_context with sections: ["tech-stack", "patterns"]

Features:

  • Generates detailed checklists for AI agents to complete
  • Auto-detection mode analyzes entire codebase systematically
  • Section-specific updates for targeted changes
  • Validation steps ensure accuracy and completeness

3. persist_context

Enables automatic context loading in AI tools.

# Auto-detect and setup all tools
Use persist_context for the current directory

# Setup specific tools
Use persist_context with tools: ["cursor", "claude-code", "copilot"]

Features:

  • Creates tool-specific config files
  • For Claude Code: Creates CLAUDE.md with references to context files
  • Sets up file watching for sync
  • Installs git hooks for freshness checks

4. figma_to_code

Converts Figma designs to production-ready code.

# Quick mode (recommended)
Use figma_to_code with mode: "quick"

# Detailed mode for comprehensive guide
Use figma_to_code with mode: "detailed"

Features:

  • Essential Figma MCP integration instructions
  • Framework-specific code generation
  • Accessibility and responsive design guidelines
  • 95%+ visual fidelity methodology

Installation for Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "mcp-context-manager": {
      "command": "npx",
      "args": ["mcp-context-manager"]
    }
  }
}

Common Workflows

New Project Setup

# 1. Create context files
npx mcp-context-manager setup_context .

# 2. Review and customize the generated files

# 3. Enable auto-loading
npx mcp-context-manager persist_context .

After Major Changes

# Update context
npx mcp-context-manager update_context .

# Git will remind you automatically
git commit -m "Add new feature"
# ⚠️ AI Context files are over 7 days old!

Figma to Code Conversion

# Get quick instructions
npx mcp-context-manager figma_to_code --mode quick

# Get detailed guide
npx mcp-context-manager figma_to_code --mode detailed

What Gets Created

your-project/
├── AI-CONTEXT.md          # Main context file
├── AI-PATTERNS.md         # Code patterns and examples
├── CLAUDE.md              # References to context files (by persist_context)
├── .cursorrules           # Cursor config (if enabled)
├── .github/
│   └── copilot-instructions.md  # Copilot config (if enabled)
└── .git/hooks/
    └── pre-commit         # Context freshness check (if enabled)

Benefits

Consistent AI Responses: Every session starts with full context
No More Repetition: Stop explaining your project repeatedly
Better Code Suggestions: AI follows your patterns and conventions
Team Alignment: Everyone's AI uses the same context
Time Saving: No context switching or explanation overhead

FAQ

Q: How is this different from just using a README?
A: It automatically loads in AI tools, maintains consistency across different assistants, and provides structured templates optimized for AI understanding.

Q: Does it work with all AI tools?
A: Yes! It has specific integrations for Claude Code, Cursor, Copilot, and Continue, but the context files can be read by any AI assistant.

Q: How often should I update context?
A: Update when you add major features, change architecture, or modify coding standards. Git hooks will remind you if context gets stale.

Q: Is my code sent anywhere?
A: No. Everything stays local. This tool only creates and manages markdown files in your project.

Example Usage in Claude Code

Once installed, you can use natural language:

"Set up AI context for this project"
"Update the context files with recent changes"
"Make context persist across all my AI tools"
"Help me convert this Figma design to React code"

Requirements

  • Node.js 16+
  • Git (for hooks feature)
  • An AI coding assistant

Contributing

Contributions welcome! Please read our contributing guidelines first.

License

MIT


Making AI assistants actually understand your codebase.