BunSAFE
Bun Javascript Runtime MCP Server for AI Agents
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://bun.sh/) [](https://nodejs.org/) [](https://www.npmjs.com/package/mcp-bun)
A comprehensive Model Context Protocol (MCP) server implementation optimized for the Bun JavaScript runtime. This server provides AI assistants with powerful tools to execute, optimize, and manage JavaScript/TypeScript projects using Bun's high-performance runtime.
🔄 Runtime Compatibility: The server requires bun to be installed in the environment the MCP server will run (Windows native, Windows WSL2, etc). See more installation details below.
Features
🚀 Bun-Optimized Execution
- Fast Script Execution: Run JavaScript/TypeScript files with Bun's optimized runtime
- Built-in TypeScript Support: Execute TypeScript directly without compilation
- Memory Optimization: Use
--smolflag for memory-constrained environments - Hot Reloading: Development server with
--hotflag support
🔧 Development Tools
- Package Management: Install dependencies with
bun install - Script Runner: Execute package.json scripts with
bun run - Build System: Optimize projects with
bun buildincluding minification and bundling - Test Runner: Fast testing with
bun testand coverage reporting
📊 Performance Analytics
- Project Analysis: Analyze bundle sizes, dependencies, and runtime performance
- Benchmarking: Compare script performance with different optimization flags
- Optimization Suggestions: Get recommendations for Bun-specific optimizations
🖥️ Server Management
- Background Servers: Start and manage long-running Bun/Node.js servers
- Process Monitoring: Track server status, logs, and performance
- Hot Reloading Servers: Development servers with file watching
8b0b43aaf3e8OBSERVED · 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.
claude mcp add mcp-bun -- npx -y [email protected]
{
"mcpServers": {
"mcp-bun": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (18)
7 read · 11 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
analyze-bun-performance | read | Analyze project performance characteristics with Bun |
benchmark-bun-script | read | Benchmark a script |
get-bun-version | read | Get the version of Bun the scripts will be executed with |
get-server-logs | read | Get the last N lines of logs from a running server |
list-bun-versions | read | Get available Bun versions if using a version manager |
list-servers | read | List all running Node.js servers started via MCP |
run-bun-build | write | Build and optimize JavaScript/TypeScript projects with Bun |
run-bun-eval | write | Execute JavaScript/TypeScript code directly with Bun eval with optimizations |
run-bun-install | write | Execute bun install to install all dependencies or a specific package |
run-bun-script | write | Execute a script from package.json with bun |
run-bun-script-file | write | Execute a JavaScript/TypeScript script file with Bun runtime and optimizations |
run-bun-test | write | Execute tests with Bun |
run-node-eval | write | Execute JavaScript code directly with Node.js eval. Optionally specify a directory to execute in. |
run-node-script | write | Execute a Node.js script file locally |
select-bun-version | read | Select a specific Bun version to use for subsequent script executions |
start-bun-server | write | Start a Bun server that continues running in the background with optimizations |
start-node-server | write | Start a Node.js server that continues running in the background |
stop-server | write | Stop a running Node.js server |
Trust audit
SAFEgrade B · trust 89/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 | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (1)
@modelcontextprotocol/sdk, node-notifier, zod, @types/bun, @types/node, @types/node-notifier, eslint, neostandard
Gates applied: no_behavioural_pass.
8b0b43aaf3e8full audit observations/trust-audit/mcp-server/carlosedp__bun.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 | 8b0b43aaf3e8 | SAFE | B | 89 | first audit |
Questions
What is the Bun MCP server?
Bun Javascript Runtime MCP Server for AI Agents
What tools does Bun expose?
18 in total: 7 read-only, 11 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Bun safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/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 Bun need?
No credential environment variables were found in its source, so it appears to need none.
How does Bun run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-bun at 1.3.0.
How current is this page?
The grade is for one exact copy of the source (8b0b43aaf3e8), read on 2026-10-08. The repository is watched and re-audited when it changes.