Capsule Bash Server
OfficialMCP-сервер Capsule Bash
MCP-сервер, который дает вашему ИИ-агенту возможность выполнять bash-команды в безопасной, постоянной и изолированной среде.
Как это работает
Каждая сессия выполняется внутри песочницы WebAssembly. Песочница обеспечивает:
Постоянное состояние: текущая рабочая директория (cwd), переменные окружения и изменения в файловой системе сохраняются между командами в рамках одной сессии.
Diff файловой системы: каждый ответ
runвключает в себя diff изменений на диске.Изолированная память: каждая сессия имеет свое собственное адресное пространство, утечка данных между сессиями исключена.
Отсутствие доступа к хосту: песочница не имеет доступа к файловой системе или сети вашего хоста.
Узнайте больше о Capsule Bash.
Related MCP server: anvil
Инструменты
Инструмент | Описание |
| Выполнение bash-команды в изолированной сессии. Возвращает stdout, stderr, код выхода, diff файловой системы и текущее состояние (cwd + env). |
| Сброс файловой системы и состояния (cwd, переменные окружения) сессии до исходных значений. |
| Список всех активных сессий. |
Сессии
Команды внутри одного session_id используют общие cwd, переменные окружения и состояние файловой системы между вызовами.
Пример
Попросите вашего ИИ-агента:
"Напиши скрипт на Python, который вычисляет среднее арифметическое списка чисел."
Агент последовательно вызывает run:
{ "command": "mkdir -p /data && cd /data", "session_id": "custom_session" }
{ "command": "echo 'nums = [x for x in [1, 2, 3, []] if isinstance(x, int)]\nprint(sum(nums) / len(nums))' > avg.py", "session_id": "custom_session" }
{ "command": "python3 avg.py", "session_id": "custom_session" }Каждый вызов возвращает stdout, stderr, exitCode, diff файловой системы и обновленное state для обогащения контекста и отслеживания истории диалога.
Настройка
Добавьте в конфигурацию вашего MCP-клиента (например, Claude Desktop, Cursor):
{
"mcpServers": {
"bash": {
"command": "npx",
"args": ["-y", "@capsule-run/bash-mcp"]
}
}
}Ограничения
Реализованы не все bash-команды и опции. Не стесняйтесь создать issue, если какая-то команда отсутствует или работает некорректно.
Available Tools
3 toolsresetA
Reset a session's filesystem and shell state (cwd, env vars) to their initial values. Useful to start fresh without creating a new session.
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | No | The session to reset. Defaults to 'default'. | default |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It clearly explains that the tool resets filesystem and shell state to initial values, which is specific and transparent about the behavior. No side effects or additional information is provided, but the action is straightforward.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description consists of two sentences, both front-loaded with essential information: the action and scope in the first sentence, usage context in the second. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (one parameter, no output schema), the description provides all necessary information: what it does, what it affects, and when to use it. No gaps remain.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, and the description adds no additional meaning beyond what the schema already provides for the single parameter 'session_id'. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'reset' and the resource 'session's filesystem and shell state', specifying what is reset (cwd, env vars) and distinguishing from siblings 'run' and 'sessions' which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says 'useful to start fresh without creating a new session', giving a clear usage scenario and implying an alternative (creating a new session). However, it does not explicitly state when not to use it or list other alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
runB
Execute a Bash command in the sandboxed environment
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The bash command to execute. | |
| session_id | No | Identifier for the shell session. Commands within the same session share cwd, env, and filesystem state. Defaults to 'default'. | default |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden for behavioral disclosure. It only notes the sandboxed environment but fails to describe side effects (e.g., file system changes, output handling, error behavior) or any permissions needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence with no wasted words. It is appropriately sized for a simple tool and front-loades key information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 parameters, no output schema, no annotations), the description is adequate but not thorough. It lacks information about return values (e.g., stdout/stderr) and potential side effects, which could help an agent understand the tool's full behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with clear explanations for both parameters (command and session_id). The tool description adds no extra parameter information. Baseline of 3 is appropriate as the schema already documents parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Execute a Bash command in the sandboxed environment' clearly states the action (execute) and the resource (Bash command in sandbox). It distinguishes from siblings 'reset' and 'sessions' by implying this tool is for running commands, not managing sessions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like 'reset' or 'sessions'. The description does not mention prerequisites, scenarios, or exclusions, leaving the agent without context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
sessionsA
List all active session IDs and their current state.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Lacking annotations, the description states the tool lists active sessions, conveying a non-destructive, read-only behavior. But it omits details like whether state includes sub-attributes or if sessions are global.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no wasted words. Efficiently captures the core functionality.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, the description could be more complete by hinting at return structure or example use. It covers the basic purpose but lacks actionable output details.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters; schema coverage is 100% by default. The description does not need to add param info. Baseline 4 for 0 parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Describes a specific action (list) and resource (active session IDs and state). Clearly distinguishes from siblings 'reset' and 'run' which imply modification actions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies a read-only listing use case, and with siblings being action-oriented, the context is clear. However, no explicit when-not or alternative guidance is provided.
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.
3 tool updates
v0.1.0- First observed
reset - First observed
run - First observed
sessions
TDQS
Each tool has a unique, clear purpose: reset reverts state, run executes commands, and sessions lists active sessions. No ambiguity or overlap exists.
All tool names are single, imperative verbs (reset, run, sessions) following a consistent, simple pattern.
Three tools is well-scoped for a bash sandbox server, covering essential operations without superfluous or missing tools.
The set covers core actions (run, reset, list sessions) but lacks explicit session creation; likely sessions are created implicitly, leaving a minor gap.
Maintenance
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
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
- mcp-serverOAuthai.cdbx
Build Apps and run code in 30 languages — sandboxed, with persistent sessions for agent loops.
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Hosted runtime for persistent agent teams, durable workflows, memory, schedules, and goals.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides sandboxed code execution for AI agents with support for Python, JavaScript, and shell commands. Includes comprehensive safety features like destructive pattern blocking, timeout protection, and restricted file access for secure production use.22MIT
- AlicenseNot gradedqualityBmaintenanceA throwaway Docker sandbox for agents to run code and shell commands safely.24MIT
- AlicenseAqualityBmaintenanceStateful, structured, safe shell sessions for AI agents, on real infrastructure.67Apache 2.0
- AlicenseAqualityAmaintenanceExposes persistent, stateful remote Bash sessions to AI agents via SSH, enabling command execution with preserved working directory and environment.7521MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/bash'
If you have feedback or need assistance with the MCP directory API, please join our Discord server