Skip to main content
Glama

Capsule MCP Server

MCP Server Release

Give your agent the ability to write and run Python and JavaScript code, in a secure sandbox.

Every execution happens inside its own WebAssembly sandbox with strict resource limits. No file system access, no risk to your host system.

Tools

Tool

Description

execute_python

Run Python code in an isolated sandbox

execute_javascript

Run JavaScript code in an isolated sandbox

Example

Ask your agent:

"I have monthly revenue of [12400, 15800, 14200, 18900, 21000, 19500]. What's the average and which month grew the most?"

The agent calls execute_python with:

revenue = [12400, 15800, 14200, 18900, 21000, 19500]

avg = sum(revenue) / len(revenue)
growth = [revenue[i] - revenue[i-1] for i in range(1, len(revenue))]
best_month = growth.index(max(growth)) + 2  # +2 for 1-indexed and offset

{"average": round(avg, 2), "best_growth_month": best_month, "growth": max(growth)}

{"average": 16966.67, "best_growth_month": 4, "growth": 4700}

Related MCP server: e2b-mcp-server

Setup

Add to your MCP client configuration:

{
  "mcpServers": {
    "capsule": {
      "command": "npx",
      "args": ["-y", "@capsule-run/mcp-server"]
    }
  }
}

How It Works

The server ships two pre-compiled WebAssembly modules: one for Python, one for JavaScript. When a tool is called, the code is executed via capsule inside a dedicated Wasm sandbox with:

  • Isolated memory — each execution gets its own address space

  • CPU/Ram limits — fuel-metered execution prevents runaway loops

  • No host access — no filesystem or network unless explicitly allowed

Learn more about Capsule.

Limitations

  • Stateless — each execution starts from a clean sandbox. There is no shared state between calls. To chain results, pass previous outputs as inputs to the next execution.

  • Python HTTP — standard networking libraries are not compatible with the Wasm sandbox.

Available Tools

2 tools
execute_javascriptExecute JavaScriptA

Execute JavaScript code in a secure isolated WebAssembly sandbox. Both standard output (console logs) and the last evaluated expression are returned.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code to execute. Standard output and the final expression are returned.

TDQS

A4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: the code runs in a 'secure isolated WebAssembly sandbox' (implying safety and isolation), and it returns both 'standard output (console logs) and the last evaluated expression.' This covers execution environment and output behavior well, though it lacks details on timeouts, memory limits, or error handling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose and efficiently uses two sentences to cover execution context and return values. Every sentence earns its place with no wasted words, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (executing code in a sandbox), no annotations, and no output schema, the description does a good job of covering the essential context: what it does, the environment, and what it returns. However, it could be more complete by addressing potential limitations like execution time or security constraints.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents the single 'code' parameter. The description adds minimal value by reiterating that 'Standard output and the final expression are returned,' but doesn't provide additional syntax, format, or constraints beyond what the schema states. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Execute JavaScript code') and resource ('in a secure isolated WebAssembly sandbox'), distinguishing it from the sibling tool execute_python by specifying the programming language. It provides a complete picture of what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by mentioning the sandbox environment, but it doesn't explicitly state when to use this tool versus execute_python or other alternatives. No guidance on prerequisites or exclusions is provided, leaving usage decisions to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_pythonExecute PythonA

Execute Python code in a secure isolated WebAssembly sandbox. Both standard output (print statements) and the last evaluated expression are returned. Supports pure Python only (no C extensions like numpy/pandas).

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesPython code to execute. Standard output and the final expression are returned.

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: secure isolated sandbox environment, return of both stdout and last expression, and language limitations (no C extensions). However, it doesn't mention potential execution time limits, memory constraints, or error handling behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences that are front-loaded and efficient. Each sentence adds essential information about execution environment, return values, and limitations without any wasted words or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (code execution in sandbox) with no annotations and no output schema, the description does well by covering execution environment, return values, and language constraints. However, it lacks details about error responses, execution limits, or security implications that would make it fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% with one parameter clearly documented, so the baseline is 3. The description adds minimal value beyond the schema by mentioning that 'Standard output and the final expression are returned,' which slightly elaborates on the output behavior but doesn't provide additional parameter-specific details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Execute Python code') and resource ('in a secure isolated WebAssembly sandbox'), distinguishing it from the sibling execute_javascript tool by specifying Python execution. It provides precise details about the execution environment and language constraints.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implicitly suggests usage for Python code execution with constraints ('pure Python only, no C extensions'), but does not explicitly state when to use this tool versus execute_javascript or other alternatives. It provides clear context about limitations but lacks explicit comparative guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.2
    • First observedexecute_javascript
    • First observedexecute_python

TDQS

A4/5.0
Disambiguation5/5

The two tools have clearly distinct purposes: execute_javascript for JavaScript code execution and execute_python for Python code execution. There is no overlap or ambiguity between them, as each targets a different programming language in a similar sandbox environment.

Naming Consistency5/5

Both tools follow a consistent verb_noun naming pattern (execute_javascript and execute_python), using the same verb 'execute' followed by the language name. This makes the naming predictable and easy to understand across the tool set.

Tool Count2/5

With only 2 tools, the server feels thin for a general-purpose code execution server. While it covers two popular languages, the scope suggests potential for more languages (e.g., Ruby, Go) or related operations (e.g., list_sandboxes, kill_execution), making the current count insufficient for broad utility.

Completeness3/5

The server provides execution capabilities for JavaScript and Python, which are core to its domain of code execution. However, there are notable gaps: no tools for managing sandboxes (e.g., creating, listing, or terminating), handling dependencies, or supporting other common languages, limiting agent workflows to basic execution without lifecycle control.

Maintenance

ActivityStale
ResponsivenessUnresponsive

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    A general-purpose MCP server providing web search, persistent memory storage, and secure code execution capabilities. It enables AI agents to search the web, store and retrieve data, and run Python/JavaScript code in sandboxed environments.
    8
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Production-grade MCP server that enables AI assistants to execute code securely in isolated E2B sandboxes.
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    A self-hosted MCP server that gives AI agents controlled access to a machine: filesystem, shell, background processes, git, web fetching and persistent key-value memory.
    GPL 3.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/capsulerun/capsule'

If you have feedback or need assistance with the MCP directory API, please join our Discord server