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

mcpfix

v0.1.1

Published

MCP Server Conflict Detector & Fixer — detect & repair tool name collisions, measure latency, estimate context window usage across your MCP stack

Readme

mcpfix — MCP Server Conflict Detector & Fixer

npm version npm downloads License: MIT Node.js TypeScript GitHub stars

Detect tool name collisions, profile latency, and audit context window usage across Claude, Cursor, and Cline MCP servers.

npx mcpfix

The Problem

Running multiple MCP servers? You have collisions. Two servers exposing create_issue means the AI picks the wrong one, burns tokens, and fails tasks. You don't know which server is slow. You don't know how much context your tools are eating. mcpfix repairs this.

Architecture

flowchart TD
    A[mcpfix CLI] --> B[Config Loader]
    B -->|reads| C1[Claude Desktop config]
    B -->|reads| C2[Cursor mcp.json]
    B -->|reads| C3[Cline settings]
    B --> D[Server List]
    D --> E[Server Probe<br/>MCP stdio transport]
    E -->|tools/list x3 samples| F[ServerProfile]
    F --> G[Collision Engine<br/>exact + Levenshtein fuzzy]
    F --> H[Context Calculator<br/>token estimation]
    G --> I[DoctorReport]
    H --> I
    I --> J{Output mode}
    J -->|default| K[Terminal Report]
    J -->|--json| L[JSON stdout]
    J -->|--roast| M[Roast Report]
    J -->|--fix| N[Fixer<br/>server-key rename + backup]
    J -->|--dry-run| O[Preview<br/>no writes]

Install & Run

npx mcpfix

Or install globally:

npm install -g mcpfix
mcpfix

Features

  • Conflict Detection — Finds exact and fuzzy tool name collisions across servers (Levenshtein-based)
  • Latency Profiling — Measures cold-start time and steady-state warm RTT separately per server
  • Context Window Estimation — Calculates how much of your token budget tools consume
  • Auto-Fix Mode--fix renames conflicting server keys in config with automatic backup
  • Dry-Run Preview--dry-run shows exactly what --fix would change without touching disk
  • Roast Mode--roast scores your MCP setup and surfaces real issues bluntly
  • Multi-Config Support — Auto-detects Claude Desktop, Cursor, and Cline configs
  • CI/CD Ready — JSON output mode (--json) with exit codes for pipelines

Usage

# Auto-detect all MCP configs
npx mcpfix

# Specify a custom config file
npx mcpfix --config ./my-mcp-config.json

# JSON output for CI/CD
npx mcpfix --json

# Preview fixes without writing
npx mcpfix --dry-run

# Interactively fix conflicts
npx mcpfix --fix

# Roast your setup
npx mcpfix --roast

# Custom token budget
npx mcpfix --budget 128000

Options

| Flag | Description | Default | |------|-------------|---------| | -c, --config <path> | Custom MCP config file path | Auto-detect | | --json | Output as JSON | false | | --fix | Rename conflicting server keys in config (with backup) | false | | --dry-run | Preview fixes without writing (implies --fix) | false | | --roast | Score and roast your MCP setup | false | | --budget <tokens> | Context window token budget | 200000 |

--json cannot be combined with --fix or --dry-run (interactive output would corrupt the JSON stream).

Exit Codes

| Code | Meaning | |------|---------| | 0 | All servers healthy, no conflicts | | 1 | Errors or conflicts detected | | 2 | Fatal error or invalid flag combination |

Config Detection

mcpfix automatically finds configs from:

  • Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%/Claude/ (Windows), ~/.config/Claude/ (Linux)
  • Cursor~/.cursor/mcp.json
  • Cline — VS Code global storage (saoudrizwan.claude-dev)

How Conflict Detection Works

Exact match:   tool_a == tool_a                   -> EXACT collision
Fuzzy match:   levenshtein(tool_a, tool_b) <= 4
               AND similarity >= 0.6              -> SIMILAR collision

The fuzzy pass catches near-identical names (create_issue / create-issue, list_files / listfiles) that cause the same routing ambiguity as exact matches.

How --fix Works

--fix renames the server key in your MCP config file for the secondary server in each exact collision. This makes the host-side entry distinct without breaking the server process.

What it changes: the key name under mcpServers in the JSON config. What it does not change: the tool names the server process advertises over stdio — those must be changed in the server's source code or via a proxy wrapper.

A .mcpfix-backup file is written alongside the config before any modifications. To roll back:

mv claude_desktop_config.json.mcpfix-backup claude_desktop_config.json

Use --dry-run first to preview the exact rename set without writing.

Context Window Estimation

Token usage is estimated per tool as:

tokens = ceil((len(name) + len(description) + len(JSON(inputSchema)) + 40) / 4)

The 40-byte overhead accounts for MCP framing (tool separator, JSON keys, whitespace). Risk thresholds:

| Usage | Risk | | ------- | -------- | | < 15% | LOW | | 15-30% | MODERATE | | 30-50% | HIGH | | > 50% | CRITICAL |

GitHub Action

Add MCP health checks to your CI:

name: MCP Health Check
on: [push, pull_request]
jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 20
      - run: npx --yes mcpfix --json > mcp-report.json
      - name: Fail on collisions
        run: |
          COLLISIONS=$(jq '.collisions | length' mcp-report.json)
          [ "$COLLISIONS" -eq 0 ] || (echo "ERROR: $COLLISIONS collision(s) detected" && exit 1)

Tech Stack

  • TypeScript 5 + Node.js 18+
  • @modelcontextprotocol/sdk — official MCP client over stdio transport
  • fastest-levenshtein — O(n) Levenshtein for fuzzy matching
  • Commander.js, Chalk 5, Ora 8, cli-table3, Boxen 7

Contributing

Bug reports and pull requests are welcome. See CONTRIBUTING.md for guidelines.

License

MIT — see LICENSE

Made by pratikacharya1234