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

badgr-mcp-doctor

v0.1.0

Published

CLI diagnostics for MCP connection, tools/list, timeouts, SSE parsing, and dry-run tool calls.

Readme

badgr-mcp-doctor

Diagnose MCP server problems — SSE connectivity, malformed events, tools/list failures, timeouts — in one command.

npx badgr-mcp-doctor --url http://localhost:3000/sse

Free. No signup required. Runs entirely on your machine.


The problem it solves

MCP servers fail silently. Your coding agent stops calling tools but gives no useful error. Is the server down? Is SSE broken? Are events malformed? Did tools/list time out? badgr-mcp-doctor runs the full diagnostic sequence and tells you exactly what's wrong.


Quick start

# Diagnose an MCP server
npx badgr-mcp-doctor --url http://localhost:3000/sse

# Machine-readable JSON (for CI or scripts)
npx badgr-mcp-doctor --url http://localhost:3000/sse --json

# Dry-run a specific tool
npx badgr-mcp-doctor --url http://localhost:3000/sse --tool my_tool_name

# Longer timeout for slow servers
npx badgr-mcp-doctor --url http://localhost:3000/sse --timeout-ms 20000

# Show optional hosted monitoring link
npx badgr-mcp-doctor connect

CLI flags

| Flag | Description | |------|-------------| | --url <url> | MCP server SSE endpoint, e.g. http://localhost:3000/sse | | --timeout-ms <n> | Connection timeout in milliseconds (default: 10000) | | --tool <name> | Optional: dry-run a specific tool by name | | --json | Output machine-readable JSON |

Commands:

| Command | Description | |---------|-------------| | connect | Show the optional AI Badgr hosted MCP monitoring link |

Exit codes: 0 = all checks passed or warnings only, 1 = one or more failures, 2 = bad usage


What it checks

Each diagnostic runs in sequence and stops early if a hard failure is found:

| Step | Check | |------|-------| | 1 | HTTP connection — server responds to the SSE endpoint | | 2 | SSE event parsing — events arrive and are valid JSON | | 3 | tools/list — JSON-RPC call returns a list of tool objects | | 4 | Dry-run tool call — invokes the first tool (or --tool) with {dryRun: true} |


Example output

badgr-mcp-doctor — http://localhost:3000/sse

  ✓  HTTP connection: 200 OK
  ✓  SSE events: valid JSON payloads received
  ✗  tools/list: timeout after 10000ms

  The server connected but tools/list never responded.
  Common causes: server still initializing, blocking startup code, wrong endpoint path.
badgr-mcp-doctor — http://localhost:3000/sse

  ✓  HTTP connection: 200 OK
  ✓  SSE events: valid JSON payloads received
  ✓  tools/list: 4 tools found (search, read_file, write_file, run_command)
  ✓  Dry-run tool call: search responded without error

TypeScript API

import { runMcpDoctor } from "badgr-mcp-doctor";

const result = await runMcpDoctor({
  url: "http://localhost:3000/sse",
  timeoutMs: 15_000,
  toolName: "my_tool",  // optional: dry-run a specific tool
});

for (const check of result.checks) {
  console.log(check.status, check.label, check.detail);
}

Types:

interface McpDoctorOptions {
  url: string;
  timeoutMs?: number;   // default: 10000
  toolName?: string;
}

interface McpDoctorResult {
  checks: DiagnosticCheck[];
  report: JsonReport;
}

Requirements

  • Node.js 18+
  • An MCP server running and accessible at the given URL