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

@mcploom/codexec

v0.3.1

Published

Executor-agnostic MCP code execution core and MCP adapters.

Readme

@mcploom/codexec

Executor-agnostic core for guest JavaScript that can call host tools directly or wrap MCP servers and clients into callable namespaces.

npm version License

What You Get

  • Resolve host tools into deterministic guest namespaces with name sanitization.
  • Validate tool inputs and outputs with JSON Schema, full Zod schemas, or MCP SDK-style raw Zod shapes.
  • Normalize user code before execution and generate namespace typings from resolved schemas.
  • Wrap MCP servers or clients into codexec providers, or expose code-execution tools from an MCP server.

Pair It With an Executor

@mcploom/codexec does not execute code on its own. Pair it with one of the executor packages:

| Package | Best for | | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- | | @mcploom/codexec-quickjs | Easiest setup, no native addon, good default backend | | @mcploom/codexec-remote | Same executor API, but with a caller-supplied remote boundary | | @mcploom/codexec-process | QuickJS execution in a child process with a stronger lifecycle split | | @mcploom/codexec-worker | QuickJS execution on a worker thread with a message boundary | | @mcploom/codexec-isolated-vm | Native isolated-vm backend when you specifically want that runtime |

Examples

Install

npm install @mcploom/codexec @mcploom/codexec-quickjs

Swap in @mcploom/codexec-isolated-vm when you want the native executor instead. Swap in @mcploom/codexec-process when you want the QuickJS runtime to live in a fresh child process. Swap in @mcploom/codexec-remote when you want the same API but a caller-managed remote transport boundary.

Security Posture

  • Codexec gives you fresh execution state, JSON-only tool boundaries, schema validation, timeout handling, memory limits, and bounded logs.
  • Codexec does not give you a hard security boundary for hostile code by itself. The actual boundary depends on which executor you pair it with.
  • Providers are explicit capability grants. Every tool you expose is authority you are handing to guest code.
  • In the default deployment model, provider and MCP tool definitions are controlled by the application, not by the end user.
  • Third-party MCP integrations should be reviewed as dependency-trust decisions, not folded into the primary end-user attacker model.
  • If the code source is hostile, prefer stronger isolation such as @mcploom/codexec-process, @mcploom/codexec-remote, a container, or a VM.

Architecture Docs

Exports

  • @mcploom/codexec
    • ExecutionOptions
    • resolveProvider
    • normalizeCode
    • sanitizeToolName
    • extractProviderManifests
    • createToolCallDispatcher
    • JSON Schema type generation and executor/result types
  • @mcploom/codexec/mcp
    • createMcpToolProvider
    • openMcpToolProvider
    • getMcpToolSourceServerInfo
    • codeMcpServer

Basic Usage

import { resolveProvider } from "@mcploom/codexec";
import { QuickJsExecutor } from "@mcploom/codexec-quickjs";
import * as z from "zod";

const provider = resolveProvider({
  name: "tools",
  tools: {
    add: {
      inputSchema: z.object({
        x: z.number(),
        y: z.number(),
      }),
      execute: async (input) => {
        const { x, y } = input as { x: number; y: number };
        return { sum: x + y };
      },
    },
  },
});

const executor = new QuickJsExecutor();
const result = await executor.execute(
  "await tools.add({ x: 2, y: 5 })",
  [provider],
  { timeoutMs: 250 },
);

MCP Adapters

Use @mcploom/codexec/mcp when you want to wrap an MCP server or client into a tool provider, or expose code-execution tools from an MCP server. Wrapped tools preserve raw MCP CallToolResult envelopes so guest code can inspect structuredContent first and fall back to content.