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

code-mode-mcp-server

v0.1.0

Published

MCP server for code-mode — execute TypeScript code chains with pre-configured tools in an isolated sandbox

Readme

code-mode-mcp-server

MCP server that exposes code-mode sandbox execution as tools for any MCP-compatible client.

LLMs write TypeScript code that chains tool calls in an isolated sandbox — achieving 96% token savings vs sequential tool calling.

Quickstart

# Install globally
npm install -g code-mode-mcp-server

# Create a config file with your tool sources
cat > tools.json << 'EOF'
{
  "toolSources": [
    {
      "name": "fs",
      "call_template_type": "mcp",
      "config": {
        "mcpServers": {
          "filesystem": {
            "transport": "stdio",
            "command": "node",
            "args": ["/path/to/server-filesystem/dist/index.js", "/allowed/dir"]
          }
        }
      }
    }
  ],
  "timeout": 30000,
  "memoryLimit": 128
}
EOF

# Run the server
code-mode-mcp-server --config ./tools.json

MCP Tools

| Tool | Description | |------|-------------| | execute_code_chain | Execute TypeScript code in the sandbox with pre-configured tools | | list_available_tools | List available sandbox tools with TypeScript interfaces |

The execute_code_chain tool description dynamically includes TypeScript interfaces for all registered tools, so the LLM knows what's available.

CLI Options

--config <path>      Path to config JSON file (required)
--timeout <ms>       Override execution timeout (default: 30000)
--memory-limit <mb>  Override sandbox memory limit (default: 128)
--trace              Enable execution tracing

Config Format

{
  "toolSources": [
    {
      "name": "source-name",
      "call_template_type": "mcp",
      "config": {
        "mcpServers": {
          "server-name": {
            "transport": "stdio",
            "command": "node",
            "args": ["path/to/server.js", "arg1"]
          }
        }
      }
    }
  ],
  "timeout": 30000,
  "memoryLimit": 128,
  "enableTrace": false
}

Client Configuration

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "code-mode": {
      "command": "code-mode-mcp-server",
      "args": ["--config", "/path/to/tools.json"]
    }
  }
}

Claude Code

Add to .mcp.json in your project root:

{
  "mcpServers": {
    "code-mode": {
      "command": "code-mode-mcp-server",
      "args": ["--config", "./tools.json"]
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "code-mode": {
      "command": "code-mode-mcp-server",
      "args": ["--config", "./tools.json"]
    }
  }
}

Requirements

  • Node.js >= 22 (required by isolated-vm)
  • Build toolchain for native modules (node-gyp)

Architecture

MCP Client → stdio → code-mode-mcp-server
                        ├── McpServer (2 tools)
                        ├── CodeModeEngine (persisted)
                        │   └── Tool sources (MCP servers, HTTP APIs)
                        └── isolated-vm sandbox

License

MPL-2.0