The Babashka MCP Server allows interaction with the Babashka interpreter via the Model Context Protocol (MCP), enabling code execution and resource management.
Execute Babashka code: Run Clojure scripts and expressions through the server with configurable timeouts.
Timeout configuration: Set execution timeouts between 1-300 seconds (1,000-300,000 milliseconds), with a default of 30 seconds.
Access command history: Retrieve and browse results of recent command executions through MCP resources (e.g.,
babashka://commands/{index}
).Result caching: Automatically cache recent command executions for efficient retrieval.
Custom configuration: Specify the path to the Babashka executable using the
BABASHKA_PATH
environment variable.Development roadmap: Future plans include self-hosting, REPL integration, and performance optimizations.
The MCP server provides integration with Babashka, which is a native Clojure interpreter for scripting. It allows execution of Clojure code through the MCP protocol.
The README mentions GitHub Actions tools for Babashka, including setup-babashka and babashka-docker-action, which are recommended for using Babashka in GitHub Actions workflows.
Babashka MCP Server
A Model Context Protocol server for interacting with Babashka, a native Clojure interpreter for scripting.
Features
Execute Babashka code through MCP tools
Cache recent command results
Access command history through MCP resources
Configurable command timeouts
Prerequisites
Install Babashka
Babashka can be installed in several ways:
macOS
Linux
Windows
For other installation methods, see the official Babashka installation guide.
Verify Installation
After installation, verify Babashka works:
Installation
Configuration
The server can be configured through environment variables:
BABASHKA_PATH
: Path to the Babashka executable (default: "bb")
Tools
execute
Execute Babashka code with optional timeout:
Example:
Resources
The server maintains a cache of recent command executions accessible through:
babashka://commands/{index}
- Access specific command results by index
Babashka Language Features
Tail Call Optimization (TCO)
Babashka supports explicit tail call optimization through the recur
special form, but does not implement automatic TCO. For example:
Useful Resources
Official Resources
Babashka GitHub Repository - The main Babashka project
Babashka Book - Official documentation
Babashka Examples - Collection of example scripts
Community Tools & Libraries
pod-babashka-buddy - Cryptographic API for Babashka
bb-clis - Collection of useful Babashka CLI scripts
bb-scripts - Various utility scripts for Babashka
Development Tools
setup-babashka - GitHub Actions for installing Babashka
babashka-docker-action - Run Babashka scripts in GitHub Actions
Development
This server is designed to eventually become self-hosting, meaning it will be rewritten in Babashka itself. The current TypeScript implementation serves as a reference and starting point.
Roadmap
Self-Hosted Implementation
Rewrite the MCP server in Babashka
Leverage Babashka's native capabilities for better performance
Remove Node.js dependency
Maintain full compatibility with MCP protocol
Support all current features:
Command execution
Resource management
Command history
Timeout handling
Enhanced Features
Add support for Babashka pods
Implement file watching capabilities
Add REPL integration
Support for multiple Babashka instances
Performance Optimizations
Implement caching strategies
Optimize resource usage
Reduce startup time
Testing & Documentation
Comprehensive test suite
API documentation
Usage examples
Performance benchmarks
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
Enables execution and management of Babashka scripts using the Model Context Protocol, offering features like caching, command history access, and configurable timeouts for enhanced scripting workflows.
- Features
- Prerequisites
- Installation
- Configuration
- Tools
- Resources
- Babashka Language Features
- Useful Resources
- Development
- Roadmap
Related Resources
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that allows management and execution of Blender Python scripts, enabling users to create, edit and run scripts in a headless Blender environment through natural language interfaces.Last updated -8
Akash MCP Serverofficial
-securityAlicense-qualityA TypeScript server implementing the Model Context Protocol that enables AI agents to interact with the Akash Network, allowing them to deploy applications, create leases, manage deployments, and access other Akash services through typed tools.Last updated -8Apache 2.0- -securityFlicense-qualityImplements the Model Context Protocol to provide LLMs with tools for interacting with Supabase databases, supporting operations like reading, creating, updating, and deleting records with filtering and pagination capabilities.Last updated -
- AsecurityAlicenseAqualityA Model Context Protocol server that enables running AppleScript code to interact with Mac applications and system features including Notes, Calendar, Contacts, Messages, file management, and more.Last updated -1146360MIT License