什么是 Just MCP Server?
通过 MCP 暴露精选的 Justfile recipes,让自动化流程更安全、可预测且具确定性。
README
just-mcp
👋 A way to let LLMs speak Just
A production-ready MCP server that provides seamless integration with Just command runner, enabling AI assistants to discover, execute, and introspect Justfile recipes through the standardized MCP protocol.
🎯 Why Just + MCP = Better Agent Execution
Context-Saving Abstraction
If it isn't immediately obvious, the benefit of having LLMs use Just vs. bash is that running Just commands (via MCP) provides a context-saving abstraction where they don't need to waste context opening/reading bash files, Python scripts, or other build artifacts. The LLM via MCP simply gets the command, parameters, and hints - it's in their memory as "these are commands available to you."
Eliminates the Justfile Learning Curve
No more watching LLMs execute just -l to get command lists, inevitably start reading the justfile, then try to write justfile syntax (like it's a Makefile), corrupt the justfile, and create a bad experience. Just's evolving syntax simply doesn't have a large enough corpus in frontier models today - we need more popular repos with justfiles in the training dataset.
Safer Than Raw Bash Access
Just-mcp is fundamentally safer than bash. If you read HackerNews, there's a story at least once daily about operators whose LLMs start forgetting, hallucinating, and eventually breaking down - deleting files and doing nasty unwanted things. Giving LLMs unsupervised, unrestricted bash access without carefully monitoring context consumption is a recipe for disaster.
Using Justfile fixes that. Even if the LLM modifies its own justfile, the next context is memoized by the justfile (hopefully in an idempotent git repo). This abstraction shields the llm from the command line complexity where hallucinations or attention tracking the current working directory cause it to go over the rails and off the cliff.
Powerful Agent Execution Tool
Just-mcp is perfect for anybody doing agent execution:
- Ultra-low overhead - probably better than every other tool
- Human-friendly - justfiles are easy for humans and low overhead for LLMs
- Quick and dirty - while some prefer full Python FastAPI servers, just-mcp is just easy-as
- sm0l model friendly - works great with self-hostable GPU/CPU open source models with 8k-32k context limits
Built-in Safety Patterns
Just has useful patterns for introducing:
- Transparent logging without distracting the agent
- Secondary model inspection - use sm0l models to scan commands asking "is this harmful?" before execution
- Python decorator-like patterns for command validation
- Idempotent execution backed by git repos
b00t
b00t mcp create just-mcp -- bash just-mcp --stdio "${REPO_ROOT}"
b00t mcp export just-mcp
🚀 Current Status: 67% Complete (8/12 core tasks)
✅ Implemented Features
- 🏗️ Complete MCP Server - Full rmcp 0.3.0 integration with MCP 2024-11-05 protocol
- 📋 Recipe Discovery - Parse and list all available Justfile recipes
- ⚡ Recipe Execution - Execute recipes with parameters and capture structured output
- 🔍 Recipe Introspection - Get detailed recipe information, parameters, and documentation
- ✅ Justfile Validation - Syntax and semantic validation with error reporting
- 🌍 Environment Management - Comprehensive .env file support and variable expansion
- 🧪 Full Test Coverage - 33 passing tests across integration and unit test suites
🎯 MCP Tools Available
list_recipes- List all available recipes in the justfilerun_recipe- Execute a specific recipe with optional argumentsget_recipe_info- Get detailed information about a specific recipevalidate_justfile- Validate the justfile for syntax and semantic errors
🏃 Quick Start
Installation
Choose your preferred installation method:
npm (JavaScript/TypeScript)
# Install globally
npm install -g just-mcp
# Or use with npx (no installation required)
npx just-mcp --stdio
pip (Python)
# Install with pip
pip install just-mcp
# Or use with uvx (recommended)
uvx just-mcp --stdio
Cargo (Rust)
# Install from crates.io
cargo install just-mcp
# Or build from source
git clone https://github.com/promptexecution/just-mcp
cd just-mcp
cargo build --release
pkgx (pkgxdev)
pkgx just-mcp --stdio
pkgx downloads the platform-specific tarball that GitHub releases expose (just-mcp-*-*.tar.gz), extracts the executable into ${PKGX_DIR:-$HOME/.pkgx}/bin, and runs the CLI with the arguments you pass. Add that bin directory to your shell’s PATH if you need just-mcp available long-term. The packaging manifest lives in pkgx/projects/github.com/promptexecution/just-mcp/package.yml and mirrors the pkgxdev/pantry entry.
Using Docker
# Pull the latest image from GitHub Container Registry
docker pull ghcr.io/promptexecution/just-mcp:latest
# Run with Docker
docker run --rm -v $(pwd):/workspace ghcr.io/promptexecution/just-mcp:latest --stdio
# Build locally
docker build -t just-mcp:local .
docker run --rm -v $(pwd):/workspace just-mcp:local --stdio
Available Docker image tags:
latest- Latest stable releaseX.Y.Z- Specific version (e.g.,0.1.0)X.Y- Latest patch version (e.g.,0.1)X- Latest minor version (e.g.,0)
Claude Desktop Integration
Using npm/npx
Add to your Claude Desktop MCP configuration:
Using Binary
{
"mcpServers": {
"just-mcp": {
"command": "npx",
"args": ["-y", "just-mcp", "--stdio"]
}
}
}
Using pip/uvx
{
"mcpServers": {
"just-mcp": {
"command": "uvx",
"args": ["just-mcp", "--stdio"]
}
}
}
Using cargo or manual install
{
"mcpServers": {
"just-mcp": {
"command": "/path/to/just-mcp",
"args": ["--stdio"]
}
}
}
Using Docker
{
"mcpServers": {
"just-mcp": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-v",
"${workspaceFolder}:/workspace",
"ghcr.io/promptexecution/just-mcp:latest",
"--stdio"
]
}
}
}
Usage Examples
# Run as MCP server
just-mcp --stdio
# Run in specific directory
just-mcp --directory /path/to/project --stdio
# Using Docker
docker run --rm -v $(pwd):/workspace ghcr.io/promptexecution/just-mcp:latest --stdio
🧪 Testing
Comprehensive Test Suite
# Run all tests (33 tests)
cargo test
# Run specific test suites
cargo test --test basic_mcp_test # Protocol compliance testing
cargo test --test mcp_integration_working # SDK integration testing
Test Architecture
basic_mcp_test.rs- Direct protocol compliance testing using raw JSON-RPCmcp_integration_working.rs- Type-safe SDK integration testing with rmcp client- Unit tests - 25+ tests covering parser, executor, validator, and environment modules
📚 Architecture
Project Structure
just-mcp/
├── src/main.rs # CLI binary
├── just-mcp-lib/ # Core library
│ ├── parser.rs # Justfile parsing
│ ├── executor.rs # Recipe execution
│ ├── validator.rs # Validation logic
│ ├── environment.rs # Environment management
│ └── mcp_server.rs # MCP protocol implementation
├── tests/ # Integration tests
└── justfile # Demo recipes
Tech Stack
- Rust 1.82+ with async/await support
- rmcp 0.3.0 - Official MCP SDK for Rust
- serde/serde_json - JSON serialization
- snafu - Structured error handling
- tokio - Async runtime
🔄 Development Roadmap
🎯 Next Priority Tasks (Remaining 33%)
- LSP-Style Completion System - Intelligent autocompletion for recipes and parameters
- Enhanced Diagnostics - Advanced syntax error reporting and suggestions
- Virtual File System - Support for stdin, remote sources, and in-memory buffers
- Release Preparation - Documentation, CI/CD, and crate publication
🚀 Future Enhancements
- Plugin system for custom recipe types
- Integration with other build tools
- Performance optimizations for large justfiles
- Advanced dependency visualization
📖 Usage Patterns
Recipe Execution
// List available recipes
await client.callTool("list_recipes", {});
// Execute recipe with parameters
await client.callTool("run_recipe", {
"recipe_name": "build",
"args": "[\"--release\"]"
});
// Get recipe information
await client.callTool("get_recipe_info", {
"recipe_name": "test"
});
Validation
// Validate justfile
await client.callTool("validate_justfile", {
"justfile_path": "./custom.justfile"
});
🤝 Contributing
This project follows the b00t development methodology:
- TDD Approach - Tests first, implementation second
- Feature Branches - Never work directly on main branch
- Structured Errors - Use snafu for error management
- Git Workflow - Clean commits with descriptive messages
Development Commands
just build # Build the project
just test # Run tests
just server # Start MCP server
just clean # Clean build artifacts
📄 License
This project is licensed under LICENSE.
🚀 Release Setup & CI/CD
✅ Completed Setup
Cocogitto & Conventional Commits
- Installed cocogitto for conventional commit enforcement
- Configured
cog.tomlwith proper commit types and changelog settings - Set up git hooks for commit message linting (
commit-msg) and pre-push testing
GitHub Actions CI/CD
- CI Pipeline (
ci.yml): Multi-platform testing (Ubuntu, Windows, macOS), formatting, clippy, commit linting - Release Pipeline (
release.yml): Automated versioning, changelog generation, GitHub releases, and crates.io publishing - Binary Builds (
build-binaries.yml): Cross-platform binary compilation for npm and pip packages - Container Pipeline (
container.yaml): Multi-platform Docker image builds (linux/amd64, linux/arm64) pushed to GitHub Container Registry
Docker Images
- Multi-platform builds for
linux/amd64andlinux/arm64 - Minimal image size using static musl binaries and scratch base image
- Automatic tagging with semantic versioning (major, major.minor, major.minor.patch, latest)
- Published to GitHub Container Registry (ghcr.io)
- Integrated with release workflow for automatic deployment
Crates.io Preparation
- Updated both
Cargo.tomlfiles with complete metadata (description, keywords, categories, license, etc.) - Added proper exclusions for development-only files
- Verified MIT license is in place
Documentation & Structure
- README.md is production-ready with installation and usage instructions
- Created initial
CHANGELOG.mdfor release tracking - Updated
.gitignorewith Rust-specific entries
🚀 Production Deployment
Development Workflow:
- All commits must follow conventional commit format (enforced by git hooks)
- Use
feat:,fix:,docs:, etc. prefixes for automatic versioning - Push to
mainbranch triggers automated releases and crates.io publishing - Library tests pass ✅ (25/25) with comprehensive test coverage
Release Process:
- Automated Versioning: Cocogitto analyzes commit messages for semantic versioning
- GitHub Releases: Automatic changelog generation and GitHub release creation
- Binary Distribution: Pre-built binaries for Linux (x86_64, aarch64), macOS (x86_64, aarch64), and Windows (x86_64)
- Crates.io Publishing: Library crate (
just-mcp-lib) publishes first, then binary crate (just-mcp) - npm Publishing: Wrapper package for easy Node.js/TypeScript integration
- PyPI Publishing: Python wrapper package for pip/uvx installation
- CI/CD Pipeline: Multi-platform testing (Ubuntu, Windows, macOS) with formatting and clippy checks
Installation Methods:
# npm (JavaScript/TypeScript ecosystems)
npm install -g just-mcp
# or
npx just-mcp --stdio
# pip (Python ecosystems)
pip install just-mcp
# or
uvx just-mcp --stdio
# cargo (Rust ecosystem)
cargo install just-mcp
# Download pre-built binaries
wget https://github.com/promptexecution/just-mcp/releases/latest/download/just-mcp-x86_64-unknown-linux-gnu.tar.gz
# Or use Docker
docker pull ghcr.io/promptexecution/just-mcp:latest
# Or download from GitHub releases
wget https://github.com/promptexecution/just-mcp/releases/latest/download/just-mcp
🔗 Related Projects
- Just - The command runner this integrates with
- Model Context Protocol - The protocol specification
- rmcp - Official Rust MCP SDK
Friends of just-mcp
- just-vscode - VSCode extension with LSP integration for enhanced Just authoring
- just-awesome-agents - Collection of patterns and tools for agent execution with Just# Test change to trigger pre-push hook
常见问题
Just MCP Server 是什么?
通过 MCP 暴露精选的 Justfile recipes,让自动化流程更安全、可预测且具确定性。
相关 Skills
Slack动图
by anthropics
面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。
✎ 帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。
MCP构建
by anthropics
聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。
✎ 想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。
接口测试套件
by alirezarezvani
扫描 Next.js、Express、FastAPI、Django REST 的 API 路由,自动生成覆盖鉴权、参数校验、错误码、分页、上传与限流场景的 Vitest 或 Pytest 测试套件。
✎ 帮你把API与集成测试自动化跑顺,减少回归漏测;能力全面,尤其适合复杂接口场景的QA团队。
相关 MCP Server
Slack 消息
编辑精选by Anthropic
Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。
✎ 这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。
by netdata
io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。
✎ 这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。
by d4vinci
Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。
✎ 这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。