This document explains how to run the Bunnyshell MCP Server using Docker.
The Bunnyshell MCP Server Docker image is based on the official bunnyshell/cli
Alpine Linux image, which provides a lightweight base with the Bunnyshell CLI pre-installed.
Note: The Dockerfile overrides the default entrypoint of the
bunnyshell/cli
image to allow running Node.js commands directly instead of passing them as arguments to thebns
CLI.The server is started in the background and the container is kept alive with a tail process, ensuring the container doesn't exit and the server remains accessible.
- Docker and Docker Compose installed on your system
- Bunnyshell API key
- Bunnyshell organization ID
-
Clone this repository:
git clone https://github.com/yourusername/bns-mcp.git cd bns-mcp
-
Create a
.env
file with your Bunnyshell credentials:echo "BNS_API_KEY=your_api_key_here" > .env echo "BNS_ORGANIZATION=your_organization_id_here" >> .env
-
Build and start the container:
docker-compose up -d
The MCP server needs to be registered with Claude Desktop to work. There are two ways to configure this:
- Open Claude Desktop
- Go to Settings > MCP Servers
- Add a new server with these details:
- Name:
bunnyshell-mcp
- Command:
docker
- Args:
["exec", "-i", "bns-mcp-server", "node", "src/dist/index.js"]
- Name:
The Docker configuration includes a volume that maps to Claude Desktop's configuration directory. After running the container at least once, you can:
- Stop Claude Desktop
- Edit
~/.claude-dev/config.json
to add:{ "mcpServers": { "bunnyshell-mcp": { "command": "docker", "args": ["exec", "-i", "bns-mcp-server", "node", "src/dist/index.js"] } } }
- Restart Claude Desktop
Once configured:
- Open Claude Desktop
- Start a new conversation
- Click the "+" button to add an attachment
- Select "Connect to MCP Server"
- Choose "bunnyshell-mcp" from the list
You should now be able to use all the Bunnyshell capabilities through Claude.
The Docker container is set up as follows:
- The MCP server is started in the background as a child process
- A
tail -f /dev/null
process runs in the foreground to keep the container alive - When Claude needs to communicate with the MCP server, it exec's into the container with a new Node process
This approach ensures the container stays running indefinitely while allowing Claude to interact with the server as needed.
Even though the container runs our Node.js server by default, you can still use the Bunnyshell CLI inside the container:
docker exec -it bns-mcp-server bns --help
If you encounter issues:
- Check container logs:
docker logs bns-mcp-server
- Verify the container is running:
docker ps
- Ensure your API key has the necessary permissions
- Restart the container:
docker-compose restart
If you need to debug the MCP server process itself:
# Check if the Node.js process is running in the container
docker exec bns-mcp-server ps aux | grep node
# Check the server logs directly
docker exec bns-mcp-server tail -f /app/logs/server.log
# Restart the server without restarting the container
docker exec bns-mcp-server pkill node && docker exec -d bns-mcp-server node /app/src/dist/index.js
To use custom Bunnyshell CLI configuration:
- Stop the container:
docker-compose down
- Create a directory for configuration:
mkdir -p bunnyshell-config
- Place your configuration files in this directory
- Update the docker-compose.yml to mount this directory:
volumes: - ./bunnyshell-config:/root/.bunnyshell
- Restart the container:
docker-compose up -d