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

@chrom-ar/mcp-base

v1.0.0-alpha.2

Published

MCP Framework Library for building MCP servers with Express

Downloads

6

Readme

MCP Framework (@chrom-ar/mcp-base)

A TypeScript framework library for building Model Context Protocol (MCP) servers with Express.js integration.

Features

  • Easy Setup: Initialize MCP servers with minimal boilerplate
  • Express Integration: Built-in Express.js app with MCP endpoints
  • Automatic Router Registration: Registers with MCP router automatically
  • Health Checks: Built-in health check endpoints
  • Extensible: Access to underlying Express app for custom routes
  • TypeScript Support: Full TypeScript definitions included

Installation

npm install @chrom-ar/mcp-base

Quick Start

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { z } from 'zod';
import { randomUUID } from 'crypto';
import { ChromaMCP } from '@chrom-ar/mcp-base';

// Create server info
const serverInfo = {
  id: randomUUID(),
  name: 'my-mcp-server',
  version: '1.0.0',
  description: 'My MCP Server'
};

// Create MCP server instance
const server = new McpServer(serverInfo);

// Add tools
server.tool(
  'say-hello',
  'Say hello with an optional name',
  {
    name: z.string().optional().describe('Name to say hello to')
  },
  async (args) => {
    const name = args.name || 'World';
    return {
      content: [
        {
          type: 'text',
          text: `Hello, ${name}!`
        }
      ]
    };
  }
);

// Create and start the ChromaMCP server
const chromaMcp = new ChromaMCP(server, {
  port: 3001,
  host: '0.0.0.0'
});

// Start the server
async function main() {
  await chromaMcp.start();
  console.log('Server started successfully!');
}

main().catch(console.error);

Configuration

The ChromaMCP class accepts a configuration object with the following options:

interface ChromaMCPConfig {
  port?: number;        // Server port (default: process.env.PORT || 3000)
  host?: string;        // Server host (default: '0.0.0.0')
  routerUrl?: string;   // MCP router URL for registration (default: process.env.MCP_ROUTER_URL)
}

Environment Variables

  • PORT: Server port number
  • MCP_ROUTER_URL: URL of the MCP router for automatic registration

API Reference

ChromaMCP Class

Constructor

constructor(server: McpServer, config?: ChromaMCPConfig)

Methods

  • start(): Promise - Start the server and register with router
  • getApp(): express.Application - Get the underlying Express app
  • getMcpServer(): McpServer - Get the MCP server instance
  • getServerInfo(): ServerInfo - Get server information

Built-in Endpoints

  • POST /mcp - Main MCP protocol endpoint
  • GET /health - Health check endpoint
  • GET /mcp - Returns 405 Method Not Allowed
  • DELETE /mcp - Returns 405 Method Not Allowed

Custom Routes

You can add custom Express routes by accessing the underlying app:

const app = chromaMcp.getApp();

app.get('/custom', (req, res) => {
  res.json({ message: 'Custom endpoint' });
});

app.post('/webhook', (req, res) => {
  // Handle webhook
  res.status(200).send('OK');
});

Examples

See the examples/ directory for more usage examples.

Development

# Build the library
npm run build

# Watch for changes
npm run dev

License

ISC