1mcpSAFE
Embedded sandbox with MCP proxy
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Build tiny sandboxes from MCP tools, TypeScript functions, CLIs, and just-bash.
mcpbash gives you a small shell-first sandbox object. Instead of provisioning a VM or container, you map capabilities into commands and run them through a controlled runtime.
Install
pnpm add mcpbash # or npm install mcpbash
Why use it?
- Map MCP tools to shell commands
- Map TypeScript functions to shell commands
- Wrap existing binaries
- Choose an in-memory, read-only, or read-write filesystem
- Opt into
gitsupport when you need it - Control outbound MCP access with a simple network policy
- Resolve secrets at runtime instead of hardcoding them
Quick start
This example creates one command, slugify, and runs it inside the sandbox.
import { createSandbox, fn } from "mcpbash";
const sandbox = await createSandbox({
filesystem: { mode: "memory" },
commands: {
slugify: fn({
input: { text: "$1" },
handler: ({ text }: { text: string }) =>
text.toLowerCase().replace(/\s+/g, "-"),
}),
},
});
const result = await sandbox.run('slugify "Hello World"');
console.log(result.stdout); // hello-world
console.log(result.exitCode); // 0
await sandbox.dispose();Common patterns
Run a real MCP-backed command
This example is fully runnable. It starts a tiny local HTTP server that behaves like an MCP tool endpoint, maps that tool into the sandbox as repos.search, and calls it like a shell command.
import http from "node:http";
import { createSandbox, mcp } from "mcpbash";
async function startToolServer(): Promise }> {
return new Promise((resolve) => {
const server = http.createServer((req, res) => {
if (req.method !== "POST" || req.url !== "/tools/search_repositories") {
res.statusCode = 404;
res.end("not found");
return;
}
let body = "";
req.on("data", (chunk) => {
body += chunk.toString("utf8"5caef93a3bacOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add shared --env MCPBASH_SECRET=${MCPBASH_SECRET} --env SECRET_NAME=${SECRET_NAME} -- npx -y @onemcp/[email protected]{
"mcpServers": {
"shared": {
"command": "npx",
"args": [
"-y",
"@onemcp/[email protected]"
],
"env": {
"MCPBASH_SECRET": "${MCPBASH_SECRET}",
"SECRET_NAME": "${SECRET_NAME}"
}
}
}
}Exposed tools (4)
2 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
read | read | Read file contents from the workspace. Filesystem policy restricts access to: readonly=[${config.policy.filesystem.readonly.join( |
run_js | write | Execute JavaScript code in a sandboxed QuickJS WASM environment. Has access to upstream MCP servers: ${config.mcps.map(m => m.name).join( |
search | read | Search for files or content within the workspace. Search scope limited to mounted directories: ${config.policy.filesystem.mounts?.map(m => m.target).join( |
write | write | Write content to a file in writable workspace areas. Writable paths: [${config.policy.filesystem.writable.join( |
Trust audit
SAFEgrade B · trust 87/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (2 observation(s))
- Network
- declared (1 observation(s))
- Shell
- declared (1 observation(s))
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (19)
baseUrl: `http://127.0.0.1:${port}`,answer="Yes. Multiple security layers protect against malicious code: (1) Signed Capsules - server cryptographically signs all code, (2) WASM Sandbox - code runs in isolated QuickJS WASM runtime, (3)
import { cn } from "../../lib/utils";import { cn } from "../../lib/utils";import { cn } from "../../lib/utils";import { cn } from "../../lib/utils";import { startServer } from "../../index.js";url: `http://127.0.0.1:${address.port}`,VITE_RELAY_SERVER_URL=http://127.0.0.1:7888
VITE_RELAY_SERVER_URL=http://127.0.0.1:7888
const mcpUrl = "http://127.0.0.1:7888/mcp";
prismjs, react, react-dom, @eslint/js, @types/react, @types/react-dom, @vitejs/plugin-react, eslint
ai, react, react-dom, zod, @playwright/test, @types/react, @types/react-dom, @vitejs/plugin-react
zod, @biomejs/biome, @types/node, husky, tsx, typescript
ai, fflate, zod, @types/node, @types/react, typescript
just-bash, @types/node, typescript
- Server detects: browser session attached via POST /session
POST /session/:id/result → NDJSON backchannel from browser to server with events: stdout, stderr, progress, exit, error
docs/public/demo.gif
Gates applied: no_behavioural_pass.
5caef93a3bacfull audit observations/trust-audit/mcp-server/buremba__1mcp-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | 5caef93a3bac | SAFE | B | 87 | first audit |
Questions
What is the 1mcp MCP server?
Embedded sandbox with MCP proxy
What tools does 1mcp expose?
4 in total: 2 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is 1mcp safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (87/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does 1mcp need?
It reads MCPBASH_SECRET and SECRET_NAME from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (5caef93a3bac), read on 2026-10-08. The repository is watched and re-audited when it changes.