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

@mcpspec/server

v1.2.2

Published

HTTP server and web UI backend for [MCPSpec](https://www.npmjs.com/package/mcpspec) — the reliability platform for MCP servers. Provides a REST API, WebSocket real-time events, and serves the MCPSpec web dashboard.

Downloads

907

Readme

@mcpspec/server

HTTP server and web UI backend for MCPSpec — the reliability platform for MCP servers. Provides a REST API, WebSocket real-time events, and serves the MCPSpec web dashboard.

For CLI usage, install mcpspec instead. This package is for embedding the MCPSpec server in your own applications.

Installation

npm install @mcpspec/server

Usage

import { startServer } from '@mcpspec/server';

const server = await startServer({
  port: 6274,       // default
  host: '127.0.0.1', // localhost-only by default
});

// server.port, server.host, server.app, server.db, server.wsHandler
// server.close() to shut down

Exports

  • startServer(options?) — Start the HTTP server with WebSocket support
  • createApp(options) — Create the Hono app without starting a server (for testing/embedding)
  • Database — sql.js (WASM SQLite) database for storing servers, collections, runs, recordings, and audit results
  • WebSocketHandler — Real-time event broadcasting over WebSocket
  • UI_DIST_PATH — Path to the bundled web UI static files

Types

  • StartServerOptions{ port?, host?, uiDistPath?, dbPath? }
  • ServerInstance{ port, host, app, db, wsHandler, close() }
  • AppOptions — Options for createApp

REST API

| Method | Endpoint | Description | |--------|----------|-------------| | GET | /api/servers | List saved servers | | POST | /api/servers | Save a server connection | | GET | /api/servers/:id | Get server details | | PUT | /api/servers/:id | Update server | | DELETE | /api/servers/:id | Delete server | | GET | /api/collections | List collections | | POST | /api/collections | Save a collection | | GET | /api/collections/:id | Get collection | | PUT | /api/collections/:id | Update collection | | DELETE | /api/collections/:id | Delete collection | | GET | /api/runs | List test runs | | POST | /api/runs | Trigger a test run | | GET | /api/runs/:id | Get run details | | POST | /api/inspect/connect | Start inspect session | | POST | /api/inspect/call | Call a tool in session | | POST | /api/inspect/disconnect | End inspect session | | POST | /api/inspect/save-recording | Save session as recording | | GET | /api/recordings | List recordings | | GET | /api/recordings/:id | Get recording | | POST | /api/recordings | Save a recording | | DELETE | /api/recordings/:id | Delete recording | | POST | /api/recordings/:id/replay | Replay recording against server | | POST | /api/audit | Start security audit | | POST | /api/benchmark | Start benchmark | | POST | /api/docs/generate | Generate documentation | | POST | /api/score/calculate | Calculate MCP Score |

WebSocket

Connect to ws://localhost:6274/ws for real-time events.

// Subscribe to events
ws.send(JSON.stringify({ type: 'subscribe', channel: 'run:<id>' }));

// Receive events
// { type: 'event', channel: 'run:<id>', event: 'test-completed', data: {...} }

Channels: server:<id>, run:<id>, scan:<id>, benchmark:<id>

License

MIT