I built the npm audit for MCP servers

typescript dev.to

The MCP (Model Context Protocol) ecosystem has exploded. awesome-mcp-servers lists 200+ servers — but there was no way to know if any of them actually worked.

So I built mcp-probe: a zero-config CLI that validates MCP servers in one command.

The problem

You add a server to Claude Desktop, it silently fails. You look at logs, get "connection closed". You have no idea if it is a network issue, a broken dependency, or the server just does not implement the protocol correctly.

What mcp-probe does

npx @k08200/mcp-probe @modelcontextprotocol/server-memory
Enter fullscreen mode Exit fullscreen mode
mcp-probe  @modelcontextprotocol/server-memory
────────────────────────────────────────────────────
  ✓  MCP protocol handshake  1392ms — memory-server v0.6.3
  ✓  Tools discovery  33ms — Found 9 tools
  ✓  Tool schema validation — All tool schemas are valid
────────────────────────────────────────────────────
  Server   memory-server v0.6.3
  Caps     tools

  Tools
    ▸ create_entities  Create multiple new entities in the knowledge graph
    ▸ read_graph  Read the entire knowledge graph
    ▸ search_nodes  Search for nodes in the knowledge graph
    ▸ ...and 6 more

  ✓  PASS  1455ms total
Enter fullscreen mode Exit fullscreen mode

For a server with resources and prompts too (server-everything):

  ✓  Tools discovery  22ms — Found 14 tools
  ✓  Resources discovery  2ms — Found 7 resources
  ✓  Prompts discovery  5ms — Found 4 prompts
Enter fullscreen mode Exit fullscreen mode

It catches real bugs

@modelcontextprotocol/server-filesystem — one of the most well-known MCP servers — currently has a broken dependency:

  ✗  MCP protocol handshake — Error: Cannot find module 'ajv'
Enter fullscreen mode Exit fullscreen mode

Before mcp-probe, this would show as "connection closed" with no indication of why.

CI integration

Exit code 1 on failure means it works as a CI gate:

- name: Validate MCP server
  run: npx @k08200/mcp-probe @your-org/your-mcp-server
  timeout-minutes: 2
Enter fullscreen mode Exit fullscreen mode

JSON output for scripting:

npx @k08200/mcp-probe @scope/server --output json
Enter fullscreen mode Exit fullscreen mode

How it works

Under the hood it uses the official @modelcontextprotocol/sdk to run the actual protocol handshake. It pipes stderr from the spawned process so when a server crashes on startup, you see the real error.

const transport = new StdioClientTransport({
  command: 'npx',
  args: ['--yes', target],
  stderr: 'pipe',  // capture crash output
});

const client = new Client(
  { name: 'mcp-probe', version: '0.1.0' },
  { capabilities: { roots: { listChanged: false } } }
);

await client.connect(transport);
const tools = await client.listTools();
// also listResources() and listPrompts() if server advertises them
Enter fullscreen mode Exit fullscreen mode

Get it

npx @k08200/mcp-probe @modelcontextprotocol/server-memory
Enter fullscreen mode Exit fullscreen mode

GitHub: k08200/mcp-probe
npm: @k08200/mcp-probe

Would love to hear what servers you try it on — especially if you find one where the output is confusing or wrong.

Source: dev.to

arrow_back Back to Tutorials