Get the FREE Ultimate OpenClaw Setup Guide →

mcp-bun

Bun Javascript Runtime MCP Server for AI Agents

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio carlosedp-mcp-bun bunx -y mcp-bun@latest \
  --env DISABLE_NOTIFICATIONS="true"

How to use

This MCP server delivers a Bun-optimized environment for running JavaScript/TypeScript code, managing packages, and serving long-running processes with Bun’s high-performance runtime. It exposes a suite of core execution tools that let you run scripts directly with Bun, evaluate code snippets, install dependencies, and run npm-like scripts using Bun’s package manager. It also includes build, test, and performance analysis utilities to help you optimize projects for Bun. You can discover and run available commands through the MCP client configured to point at the mcp-bun package, enabling you to execute scripts, inspect project structure, and manage server processes from a unified interface.

How to install

Prerequisites:

  • Bun installed (v1.0.0 or later)
  • Optional: Node.js v18+ for compatibility, depending on your environment

Step-by-step installation:

  1. Install Bun (follow the Bun website instructions for your OS):
  2. Install the MCP Bun package and build locally:
    git clone https://github.com/carlosedp/mcp-bun.git
    cd mcp-bun
    bun install
    bun run build
    
  3. Configure your MCP client to use the Bun server:
    • Example MCP client config:
      {
        "servers": {
          "bun": {
            "command": "bunx",
            "args": ["-y", "mcp-bun@latest"],
            "env": {
              "DISABLE_NOTIFICATIONS": "true"
            }
          }
        }
      }
      
  4. Optional: run the MCP Inspector for development/testing:
    bun run dev
    
  5. To develop against a local build, you can point the client to the built file (example):
    {
      "servers": {
        "bun-dev": {
          "command": "bun",
          "args": ["/path/to/mcp-bun/dist/mcp-bun.js"],
          "env": {
            "DISABLE_NOTIFICATIONS": "true"
          }
        }
      }
    }
    

Additional notes

Tips and caveats:

  • Ensure Bun is properly installed and accessible in your PATH before configuring MCP. The server relies on Bun for execution, package management, and tooling.
  • The provided configuration enables DISABLE_NOTIFICATIONS to minimize prompts during automated runs; adjust as needed for your environment.
  • If you're using WSL2 or cross-environment setups, consult the README’s Windows/WSL2 guidance to avoid path and execution issues when the MCP client and Bun run in different environments.
  • The MCP Inspector can help you verify that the server is running commands correctly by showing the commands being executed in real time.

Related MCP Servers

Sponsor this space

Reach thousands of developers