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

@watermelonpm/greennode-code-interpreter-mcp

v0.1.0

Published

MCP server exposing a remote code-interpreter sandbox (execute code, run commands, read/write files) over stdio. One sandbox session per agent session.

Downloads

51

Readme

greennode-code-interpreter-mcp

A stdio MCP server that gives an agent exactly one remote code-execution sandbox session per agent session: execute Python code, run shell commands, and read/write files inside a remote sandbox micro-VM.

The code interpreter (the provisioned micro-VM runtime) is external and shared — it is created and destroyed out-of-band, never by this MCP. The MCP only targets an existing, ACTIVE interpreter (by id or name) and manages disposable sessions inside it.

Singleton model

  • One stdio MCP process = one agent session. The MCP process is the session identity.
  • The MCP holds at most one active sandbox session at a time (enforced in-process — no locking, by construction).
  • The only way to get a new session while one exists is reset_session (atomic delete-then-create; yields a fresh micro-VM). Teardown only ever destroys the session, never the shared interpreter.

Quick start

npm install
# dev (from source):
GREENNODE_CODE_INTERPRETER_TOKEN=... CODE_INTERPRETER_ID=interpreter-... npm run dev
# or compiled:
npm run compile && CODE_INTERPRETER_ID=interpreter-... npm start

Claude Code (.mcp.json)

{
  "mcpServers": {
    "greennode-code-interpreter": {
      "command": "npx",
      "args": ["-y", "@watermelonpm/greennode-code-interpreter-mcp"],
      "env": {
        "GREENNODE_CODE_INTERPRETER_TOKEN": "your-token",
        "CODE_INTERPRETER_ID": "interpreter-abc123"
      }
    }
  }
}

Tools (12)

| Tool | What it does | |---|---| | create_sandbox | Ensure one session is active (idempotent; polls interpreter to ACTIVE if still CREATING). | | reset_session | Atomic teardown + new session (fresh micro-VM). | | teardown_session | Tear down the current session (interpreter kept). | | sandbox_status | Current state + ids. | | list_interpreters | List your interpreters (read-only; for discovery). | | execute_code | Run Python code → {output}. | | execute_command | Run a shell command → {output}. | | write_file | Write one file (content or base64 data). | | read_file | Read one file → base64 resource block + size. | | list_files | List a directory. | | start_command | Start a background shell command (for >30s work) → taskId. | | get_task | Poll a background command → status + output. |

Configuration

See .env.example for all env vars. Key ones:

  • BACKEND_URL — gateway base URL (placeholder prod default; set for dev).
  • GREENNODE_CODE_INTERPRETER_TOKEN / TOKEN_ENV — stdio bearer (pass-through).
  • CODE_INTERPRETER_ID (wins) / CODE_INTERPRETER_NAME — target an existing interpreter.
  • CREATE_TIMEOUT_MS, POLL_INTERVAL_MS — interpreter poll-to-ACTIVE budget.
  • MAX_FILE_BYTES (8 MiB), MAX_OUTPUT_BYTES (1 MiB) — size caps.
  • LOG_LEVEL — stderr-only.

Development

| Script | Purpose | |---|---| | npm run dev | tsx watch src/index.ts | | npm run build | tsc --noEmit (typecheck) | | npm run compile | emit to dist/ | | npm test | vitest run | | npm start | node dist/index.js |