Sandbox
@toolprint/just-mcp

MCP server for justfile tasks

just-mcp connects a justfile to an agent through MCP so the agent can list, understand, and run project tasks. It parses recipes, watches for file changes, and publishes them as tools the agent can call.

46 stars1 forksRustUpdated 1y ago
Who it's for

Builders who want their agent to reuse the same justfile tasks across project sessions.

What it delivers

You can ask your agent to run the right project task instead of retyping shell commands or explaining your workflow again.

What it does

Justfile discovery and hot reload

Finds a project justfile, watches it for changes, and refreshes the tool list automatically.

AST-based recipe parsing

Uses Tree-sitter parsing first, with CLI and regex fallbacks, to read task names, parameters, dependencies, and comments.

Dynamic MCP tools

Turns each just recipe into a discoverable MCP tool the agent can call.

Admin tools

Includes `admin_sync` to refresh the registry and `admin_create_task` to help create a new task with backup.

Security checks

Validates inputs, limits resources, and constrains directories to reduce command injection risk.

Optional vector search

Adds offline semantic search for finding similar automation patterns across projects.

How to get it

  1. 11. Install just-mcp
    # Using cargo-binstall (fastest - downloads pre-built binary)
    cargo binstall --git https://github.com/toolprint/just-mcp just-mcp
    
    # Or download latest release
    curl -L https://github.com/toolprint/just-mcp/releases/latest/download/just-mcp-$(uname -m)-$(uname -s).tar.gz | tar xz
    sudo mv just-mcp /usr/local/bin/
  2. 23. Use the Slash Command
    /just:do-it build the project
  3. 3Run
    claude mcp add -s user -t stdio just -- just-mcp
  4. 4Run
    git clone https://github.com/toolprint/just-mcp.git
    cd just-mcp
    just quickstart  # Complete setup + install
  5. 5Or manually
    cargo install --path . --features all  # All features including vector search
  6. 6Run
    just quickstart     # Complete setup for new developers
    just dev-setup      # Comprehensive development environment

README

just-mcp

CI License: MIT Rust MCP Vector Search

Transform justfiles into AI-accessible automation tools through the Model Context Protocol

just-mcp bridges justfiles and Coding Agents by exposing justfile recipes as dynamically discoverable MCP tools.

This enables AI assistants to understand, explore, and execute a project's common development workflows similar to how a human would.

just-mcp

Quick Start

1. Install just-mcp

# Using cargo-binstall (fastest - downloads pre-built binary)
cargo binstall --git https://github.com/toolprint/just-mcp just-mcp

# Or download latest release
curl -L https://github.com/toolprint/just-mcp/releases/latest/download/just-mcp-$(uname -m)-$(uname -s).tar.gz | tar xz
sudo mv just-mcp /usr/local/bin/

2. Configure your Agent (see MCP Client Setup below)

3. Use the Slash Command:

/just:do-it build the project

It will find the appropriate justfile task to run as an MCP Tool.

That's it. Your AI can now use your justfile tasks.

MCP Client Setup

Claude Code
claude mcp add -s user -t stdio just -- just-mcp

Or manually add to ~/.claude.json:

{
  "mcpServers": {
    "just": {
      "type": "stdio", 
      "command": "just-mcp"
    }
  }
}

Verification: Start a new session and check /mcp for 'just' and view details to see how many tools loaded.

Claude Desktop

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "just": {
      "command": "just-mcp", 
      "args": ["--watch-dir", "/Users/username/workspace/your-project-dir"],
    }
  }
}

Verification: Restart Claude Desktop, check the settings button for custom connection tools.

Cline (VS Code Extension)
  1. Click Cline icon → MCP ServersConfigure MCP Servers
  2. Add configuration:
{
  "mcpServers": {
    "just": {
      "disabled": false,
      "timeout": 60,
      "type": "stdio",
      "command": "just-mcp",
      "args": [
        "-w",
        "/Users/username/your-project-dir"
      ]
    }
}

Verification: Look for MCP server status in Cline's interface.

NOTE: Since cline runs outside of your current project working directory you MUST specify the watch-dir or use the admin tools at runtime to ask Cline to switch the watch-dir for you.

Key Features

🔍 Smart Justfile Discovery

  • Real-time monitoring with hot reloading
  • Defaults to use the current project root directory to look for your justfile
  • Dynamic tool generation from your tasks

📝 Advanced Parsing

  • AST-based parser using Tree-sitter for complete syntax support
  • Parameter documentation from comments: # {{param}}: description
  • Three-tier fallback: AST → CLI → Regex for maximum compatibility

🛡️ Security First

  • Input validation prevents command injection
  • Configurable timeouts and resource limits
  • Directory whitelisting and parameter sanitization

⚙️ Admin Tools

  • admin_sync: Refresh tool registry
  • admin_create_task: AI-assisted task creation with backup

🔍 Vector Search (Optional)

  • Offline semantic search with local embeddings (no API keys)
  • Natural language queries: "deploy to production"
  • Cross-project discovery of similar automation patterns
  • See Vector Search docs

Example Workflow

Given this justfile:

# Deploy the application
deploy env="prod":
  echo "Deploying to {{env}}"
  ./deploy.sh {{env}}

# Run tests with coverage
test coverage="false":
  cargo test {{if coverage == "true" { "--coverage" } else { "" }}}

Your AI assistant can:

  • Discover: "What tasks are available?"
  • Execute: "Deploy to staging" → runs deploy env="staging"
  • Understand: Sees parameters, descriptions, and dependencies

Installation Options

Pre-built Binaries (Recommended)

Download from GitHub Releases:

# Linux x86_64
curl -L https://github.com/toolprint/just-mcp/releases/latest/download/just-mcp-x86_64-unknown-linux-gnu.tar.gz | tar xz

# Linux ARM64  
curl -L https://github.com/toolprint/just-mcp/releases/latest/download/just-mcp-aarch64-unknown-linux-gnu.tar.gz | tar xz

# macOS (Universal - works on Intel and Apple Silicon)
curl -L https://github.com/toolprint/just-mcp/releases/latest/download/just-mcp-universal2-apple-darwin.tar.gz | tar xz

From Source

git clone https://github.com/toolprint/just-mcp.git
cd just-mcp
just quickstart  # Complete setup + install

Or manually:

cargo install --path . --features all  # All features including vector search

Development

Setup

just quickstart     # Complete setup for new developers
just dev-setup      # Comprehensive development environment

Workspace Structure

  • ./ - Main MCP server
  • dev-tools/ - Performance analysis utilities

Common Commands

just build              # Build main server  
just build-dev-tools    # Build development utilities
just test               # Run tests
just check              # Format, lint, test (pre-commit)

Multi-Project Example

Monitor multiple projects with custom names:

just-mcp \
  --watch-dir ~/projects/api:backend \
  --watch-dir ~/projects/web:frontend \
  --watch-dir ~/infrastructure:infra

Tools will be available as:

  • just_deploy@backend
  • just_build@frontend
  • just_apply@infra

Documentation

Architecture

Justfile Watcher → AST Parser → Tool Registry → MCP Server → AI Assistant
     ↓                ↓             ↓            ↓
File Changes → Dynamic Updates → Real-time → Task Execution

Key Design Principles:

  • Async-first: Tokio-based for concurrent operations
  • Security-focused: All inputs validated, resources limited
  • Hot-reload: File changes trigger automatic tool updates
  • Zero-config: Works with existing justfiles

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

Quick steps:

  1. just quickstart - Set up development environment
  2. Make your changes and add tests
  3. just check - Ensure code quality
  4. Submit a Pull Request

License

MIT License - see LICENSE for details.

Acknowledgments


Need help? Check troubleshooting or open an issue on GitHub.

Files in the repo

Repository payload32 top-level entries
  • .claude
  • .dagger
  • .github
  • .serena
  • .taskmaster
  • assets
  • benches
  • demo
  • dev-tools
  • docs
  • just
  • src
  • tests
  • .gitignore
  • .markdownlint.json
  • .mcp.json
  • .prettierignore
  • .prettierrc
  • Brewfile
  • Cargo.toml
  • CHANGELOG.md
  • CLAUDE.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • dagger.json
  • justfile
  • LICENSE
  • README.md
  • rust-toolchain.toml
  • test_config_resource.sh
  • test_justfile
  • test-utilities.just

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

43k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
okf-memory/
okf-agent-memory

Git-native persistent memory for AI coding agents. Implements Google OKF v0.2 with sub-300µs in-memory BM25 search, embedded MCP server, and progressive disclosure. Slashes token bloat by 80% with zero external databases or dependencies. Built in pure Go.

547
tirth8205/
code-review-graph

Local-first code intelligence graph for MCP and CLI. Builds a persistent map of your codebase so AI coding tools read only what matters, with benchmarked context reductions on reviews and large-repo workflows.

31k
2akouwu/
reverify

Stop your AI from making things up — it proposes, deterministic tools decide, every claim checked against ground truth with evidence. Grounded facts and context survive resets. Reverse engineering is the proving ground. MCP server + CLI.

1.1k
t8y2/dbxConnectors

20 MB lightweight cross-platform database client for 90+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 90+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP Server。

19k