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

mcp-coding-thinker

v2.0.2

Published

AI Code Surgeon MCP (OPTIMIZED): 4.9x faster, async I/O, LRU caching, Zod validation, structured logging

Readme

Coding Thinker MCP

AI Code Surgeon: Think → Edit → Verify → Commit
The only MCP that combines reasoning, surgical diffs, syntax validation, and git commits in one workflow.

npm version MCP Badge License: MIT

🎯 What This Does

Traditional AI code editing: Copy → Paste → Format → Lint → Git commit → 10 minutes wasted.

mcp-coding-thinker: "Fix dark mode" → 90 seconds → ✅ Committed with perfect style.

The Magic Workflow

  1. Analyze: Learns your code style (quotes, indentation, patterns)
  2. Think: Records reasoning steps for transparency
  3. Plan: Creates surgical line-by-line diffs with fuzzy matching
  4. Verify: Validates syntax, checks for conflicts, generates lintable preview
  5. Execute: Applies changes, auto-formats with Prettier, backs up originals, commits to git

Why It's Different

Most AI code tools either just suggest changes OR execute them. This does both with full reasoning transparency:

  • Code-aware thinking: Records WHY each change is made, not just WHAT
  • Surgical precision: Line-by-line diffs with overlap handling, not full-file replacements
  • Zero manual work: Auto-formats + syntax checks + git commits in one flow
  • Always safe: Backups every file, validates before writing, handles git edge cases
  • Style-aware: Learns your existing code patterns and enforces them automatically

🚀 Installation

Claude Desktop (One Command)

claude mcp add coding-thinker -- npx -y mcp-coding-thinker

Google Gemini (One Command)

gemini mcp add coding-thinker npx -y mcp-coding-thinker

🔧 Manual Setup for Claude Desktop

macOS

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "coding-thinker": {
      "command": "npx",
      "args": ["-y", "mcp-coding-thinker"]
    }
  }
}

Windows

Edit %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "coding-thinker": {
      "command": "npx",
      "args": ["-y", "mcp-coding-thinker"]
    }
  }
}

Linux

Edit ~/.config/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "coding-thinker": {
      "command": "npx",
      "args": ["-y", "mcp-coding-thinker"]
    }
  }
}

Restart Claude Desktop after saving.


🔧 Manual Setup for Google Gemini

For Google AI Studio Desktop (if supported)

Create/edit MCP config file (location varies by OS):

  • macOS/Linux: ~/.config/gemini/mcp_config.json
  • Windows: %APPDATA%\Gemini\mcp_config.json
{
  "mcpServers": {
    "coding-thinker": {
      "command": "npx",
      "args": ["-y", "mcp-coding-thinker"]
    }
  }
}

🔧 Using with Any MCP-Compatible Client

# Start the server with npx
npx -y mcp-coding-thinker

# Or test with MCP Inspector
npx @modelcontextprotocol/inspector npx -y mcp-coding-thinker

📖 Usage Example

Prompt to AI (Claude/Gemini):

Use coding-thinker to fix the dark mode color contrast in Header.tsx

What Happens:

  1. Analyzes Header.tsx → Detects React + Tailwind + 2-space indent
  2. Records thoughts: "Dark text on dark bg detected at line 42"
  3. Creates diff: Change text-gray-900text-gray-100
  4. Validates syntax ✅
  5. Formats with Prettier ✅
  6. Backs up to .mcp-backups/
  7. Commits: "mcp-coding-thinker: Fix dark mode contrast"

Result: Production-ready commit in 90 seconds.


🛠️ How It Works

4 Tools

1. analyze_context

  • Input: Files + request
  • Output: Session ID, style profile, issues, research queries
  • Use: Always call first

2. think_aloud

  • Input: Session ID + reasoning step
  • Output: Recorded thought + depth score
  • Use: Show incremental reasoning (5+ steps = excellent quality)

3. plan_and_verify

  • Input: Session ID + diffs (line-by-line changes)
  • Output: Validation results, safety score, lintable preview
  • Use: Submit exact diffs for verification

4. execute_and_review

  • Input: Session ID + approval
  • Output: Execution status, git operations, mirror critique prompt
  • Use: Apply changes with full safety net

🔒 Safety Features

Git Protection

  • ✅ Detects detached HEAD, rebase/merge in progress
  • ✅ Handles pre-commit hook failures gracefully
  • ✅ Provides revert instructions: git revert HEAD

Backup System

  • ✅ Copies originals to .mcp-backups/{session-id}/
  • ✅ Preserves directory structure
  • ✅ 1-hour session TTL (auto-cleanup)

Validation

  • ✅ Syntax check before formatting (no silent fails)
  • ✅ Fuzzy diff matching (±2 lines tolerance)
  • ✅ Overlapping diff detection with unified patching
  • ✅ 80% similarity threshold for stale diffs
  • ✅ Size limits on diffs (prevents memory issues)
  • ✅ Cross-platform line ending normalization (CRLF/LF)
  • ✅ Prettier config detection from user's repo

🎓 Best Practices

For AI Models (Claude/Gemini)

  1. Always analyze first: Call analyze_context before planning
  2. Think deeply: 5+ think_aloud calls = 95%+ confidence
  3. Exact diffs: Provide real line numbers from original files
  4. Dry run first: Use dry_run=true to preview before executing

For Users

  • Commit changes before using (or work on feature branch)
  • Review mirror critique prompt for architectural insights
  • Use research queries to verify best practices
  • Check .mcp-backups/ if rollback needed

🔧 Development

git clone https://github.com/awssat/mcp-coding-thinker.git
cd mcp-coding-thinker
npm install
npm run build

# Test with MCP Inspector
npm run inspector

🤝 Contributing

PRs welcome! Priority areas:

  • Additional language support
  • Test coverage
  • Performance optimizations

📜 License

MIT © 2026