git-maestro
Inspects the state of local git repositories (whether git is initialized, what files and remotes exist) and executes git operations such as git init on the user's behalf; also installs as a git maestro plugin.
Configures GitHub as the remote origin of a repository and, with the --github flag, exposes tools that query GitHub Actions through the GitHub API.
Provides tools to list recent workflow runs, inspect the job structure of a run, poll job status, and download logs of failing jobs so an AI assistant can debug CI failures and iterate until the pipeline passes.
Can set up GitLab as the remote origin of a repository and expose GitLab tools when started with the --gitlab flag.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
πΌ Git Maestro
A convenient TUI for managing git repositories with interactive menus.
π Read the full documentation
Git Maestro observes the current state of your git repository, both local and remote, and presents you with context-aware actions to help you quickly set up and manage your projects. No more typing countless git commands and switching in and out of the browser - just select from a beautiful menu and let Git Maestro handle the rest!
Features
π― Context-Aware Actions: Only shows actions that are relevant to your current repository state
π¨ Beautiful CLI Interface: Built with Rich and Prompt Toolkit for a polished user experience
π§ Modular Design: Easy to extend with new actions
β‘ Fast Setup: Quickly initialize repos, add READMEs, .gitignore files, and remote repositories
π Works as Git Plugin: Can be called as
git maestroafter installationπ MCP Integration: Seamlessly works with Model Context Protocol for AI-powered workflows
Related MCP server: Git MCP Server
Installation
From PyPI (Recommended)
pip install git-maestroFrom Source (Development)
# Clone the repository
git clone https://github.com/benhuckvale/git-maestro.git
cd git-maestro
# Install with PDM
pdm install
# Run in development mode
pdm run git-maestroAfter installation, you can run git-maestro from anywhere, or use it as a git plugin with git maestro.
π Installation Guide
Usage
Simply navigate to any directory and run:
git-maestroOr use it as a git plugin:
git maestroGit Maestro will:
Detect the current state of the directory
Show you what's configured and what's missing
Present a menu of applicable actions
Execute your selected action
Refresh and show updated options
π Quick Start Guide
Current Actions
Initialize Git Repository π¬: Run
git initin a non-git directoryAdd README.md π: Create a README with basic project structure
Add .gitignore π«: Add a .gitignore file with templates for Python, Node.js, or Generic projects
Setup Remote Repository π: Configure GitHub or GitLab as your remote origin
MCP Server for AI Assistants
Git Maestro runs as a Model Context Protocol (MCP) stdio server, enabling AI assistants (like Claude) to access git and GitHub Actions data outside their sandboxes.
What This Enables
AI assistants can now autonomously:
Monitor CI/CD: Check GitHub Actions job status without downloading full logs
Debug Failures: Fetch job logs and analyze test failures
Create Closed Loops: Make code fixes, push commits, and monitor new CI runs until tests pass
Understand Pipeline Complexity: See job dependencies and understand which failures are root causes vs cascading
Example Workflow
# Start the MCP server
git-maestro mcpAn AI assistant can then:
Make code changes and push them
Poll
check_github_actions_job_status()to wait for CI to completeFetch failing job logs with
download_github_actions_job_logs()Analyze failures and make targeted fixes
Loop until all tests passβwithout any human intervention
Available MCP Tools
list_github_actions_runs(count)- Get recent workflow runsget_github_actions_run_jobs(run_id)- View job structure and detailscheck_github_actions_job_status(run_id, [job_id])- Lightweight polling (fast status checks)download_github_actions_job_logs(run_id, job_id)- Fetch logs for specific jobsdownload_job_traces()- Download all failed job logs from the latest run
Configuration
Add to your Claude Code mcp.json:
{
"mcpServers": {
"git-maestro": {
"command": "git-maestro",
"args": ["mcp", "--github"]
}
}
}Use --github, --azure, or --gitlab flags to enable only the platforms you need. This reduces the number of tools exposed, saving context window tokens. Omit all flags to enable all platforms.
Requirements
Python >= 3.9
Git installed on your system
Dependencies (automatically installed):
rich >= 13.7.0
prompt-toolkit >= 3.0.43
gitpython >= 3.1.40
Development
# Install with dev dependencies
pdm install -d
# Run tests
pdm run pytest
# Run tests with verbose output
pdm run pytest -v
# Run tests with coverage
pdm run pytest --cov=git_maestro
# Format code
pdm run black .
# Lint
pdm run ruff check .Test Suite
Git Maestro has a comprehensive test suite with 28+ tests covering:
Repository state detection
SSH configuration detection
Action applicability logic
CLI functionality
See tests/README.md for more details.
Security Note
Git Maestro stores tokens in ~/.config/git-maestro/tokens.conf (outside the repository). The .gitignore file blocks common sensitive patterns (*.token, .env, credentials.json, etc.). Unit tests use mocks and don't require real tokens.
Extending Git Maestro
To add a new action:
Create a new file in
git_maestro/actions/(e.g.,your_action.py)Inherit from the
Actionbase classImplement
is_applicable()andexecute()methodsAdd your action to
git_maestro/actions/__init__.pyRegister it in
git_maestro/cli.pyin theget_all_actions()function
Example:
from .base import Action
from git_maestro.state import RepoState
class YourAction(Action):
def __init__(self):
super().__init__()
self.name = "Your Action Name"
self.description = "What your action does"
self.emoji = "π―"
def is_applicable(self, state: RepoState) -> bool:
# Return True if this action should be shown
return state.is_git_repo
def execute(self, state: RepoState) -> bool:
# Perform your action
# Return True if successful
return TrueLicense
MIT
Contributing
Contributions are welcome! Please feel free to submit a Pull Request in accordance with the contributing guidelines.
Integrations
Works with GitHub.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analyβ¦
Direct access to Cypress tests results and accessibility reports in your AI workflow.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceConnects AI assistants to GitHub Actions workflows to monitor CI/CD pipelines, view run logs, diagnose failures, and optionally trigger or manage workflows with granular permission controls.101-
- AlicenseBqualityDmaintenanceEnables AI assistants to inspect local Git repositories and interact with the GitHub API for reading commits, diffs, files, issues, comments, pull requests, and project boards.10ISC
- AlicenseAqualityDmaintenanceConnects AI assistants to GitHub repositories, pull requests, issues, commits, and code search while enabling repository visibility controls, CI/CD monitoring, sandboxed local filesystem access, and code quality/security analysis.131MIT
- FlicenseAqualityCmaintenanceEnables AI assistants to securely inspect local Git repositories and perform restricted write operations in isolated worktrees, with sandboxed script execution and limited GitHub repository management.24-