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

cvm-server

v0.15.3

Published

Cognitive Virtual Machine (CVM) - A deterministic bytecode VM with AI cognitive operations

Readme

cvm-server

The executable MCP server application for CVM. This is the npm package that users install to run CVM with Claude Desktop.

Overview

This app provides:

  • Executable MCP Server: Ready-to-run server for Claude Desktop
  • Configuration Management: Environment-based configuration
  • Logging: Structured logging for debugging
  • Graceful Shutdown: Proper cleanup on exit
  • Version Management: Automatic version detection

Architecture

Claude Desktop
      ↓ (stdio)
cvm-server (this app)
      ↓
CVMMcpServer (@cvm/mcp-server)
      ↓
VMManager (@cvm/vm)
      ↓
Storage + VM Engine

Installation

For End Users

Add to Claude Desktop's MCP settings:

{
  "mcpServers": {
    "cvm": {
      "command": "npx",
      "args": ["cvm-server@latest"],
      "env": {
        "CVM_STORAGE_TYPE": "file",
        "CVM_DATA_DIR": ".cvm"
      }
    }
  }
}

For Development

# Clone repository
git clone https://github.com/LadislavSopko/cvm.git
cd cvm

# Install dependencies
npm install

# Build all packages
npx nx build cvm-server

# Run locally
node apps/cvm-server/dist/main.js

Configuration

The server uses environment variables for configuration:

Storage Configuration

# File storage (default)
CVM_STORAGE_TYPE=file
CVM_DATA_DIR=.cvm

# MongoDB storage
CVM_STORAGE_TYPE=mongodb
MONGODB_URL=mongodb://localhost:27017/cvm

Logging Configuration

# Log levels: debug, info, warn, error
CVM_LOG_LEVEL=info

# Log format: pretty (default) or json
CVM_LOG_FORMAT=pretty

Environment

# Environment: development, production
NODE_ENV=production

Features

Automatic Storage Setup

  • Creates storage directories if needed
  • Warns about adding data directory to .gitignore
  • Connects to MongoDB if configured

Version Detection

  • Attempts to find package.json in multiple locations
  • Works in development and production builds
  • Falls back to hardcoded version if needed

Graceful Shutdown

  • Handles SIGINT and SIGTERM signals
  • Closes all connections properly
  • Ensures data is saved before exit

Error Handling

  • Comprehensive error logging
  • Graceful degradation
  • Clear error messages for debugging

File Structure

apps/cvm-server/
├── src/
│   ├── main.ts         # Entry point
│   ├── config.ts       # Configuration management
│   └── logger.ts       # Logging setup
├── bin/
│   └── cvm-server.cjs  # Executable wrapper
├── package.json        # Package metadata
└── README.md          # This file

Building and Publishing

Build

# Development build
npx nx build cvm-server --configuration=development

# Production build
npx nx build cvm-server --configuration=production

Publish to npm

# Bump version and publish
npx nx release

# Or manually
cd apps/cvm-server/dist
npm publish --otp=YOUR_OTP

Usage

Once installed, Claude can interact with CVM through MCP tools:

  1. Load a program: mcp__cvm__load
  2. Start execution: mcp__cvm__start
  3. Get tasks: mcp__cvm__getTask
  4. Submit results: mcp__cvm__submitTask

See the main project README for detailed usage examples.

Development Tips

Running Locally

# Set environment variables
export CVM_STORAGE_TYPE=file
export CVM_DATA_DIR=.cvm-dev
export CVM_LOG_LEVEL=debug

# Run the server
node apps/cvm-server/dist/main.js

Testing with Claude Desktop

  1. Build the server: npx nx build cvm-server
  2. Update MCP config to point to local build:
{
  "mcpServers": {
    "cvm": {
      "command": "node",
      "args": ["/path/to/cvm/apps/cvm-server/dist/main.js"]
    }
  }
}

Debugging

Enable debug logging:

export CVM_LOG_LEVEL=debug
export CVM_LOG_FORMAT=pretty

Check logs for:

  • Storage initialization
  • MCP tool calls
  • VM state changes
  • Error traces

Dependencies

Runtime Dependencies

  • @modelcontextprotocol/sdk: MCP protocol implementation
  • dotenv: Environment variable loading
  • mongodb: MongoDB driver (optional)
  • typescript: Type definitions
  • zod: Schema validation

Internal Dependencies

  • @cvm/mcp-server: MCP server implementation
  • @cvm/vm: Core VM engine
  • @cvm/storage: Storage layer
  • @cvm/parser: CVM language parser
  • @cvm/types: Shared types

License

Apache 2.0 - See LICENSE file for details