Yellhorn offers MCP tools to generate detailed workplans with Gemini 2.5 Pro and to review diffs against them using your entire codebase as context.
Project description
Yellhorn MCP
A Model Context Protocol (MCP) server that exposes Gemini 2.5 Pro capabilities to Claude Code for software development tasks using your entire codebase in the prompt. This pattern is highly useful for defining work to be done by code assistants like Claude Code or other MCP compatible coding agents, and reviewing the results ensuring they meet the exactly specified original requirements.
Features
- Create Workplans: Creates detailed implementation plans based on a prompt and taking into consideration your entire codebase, posting them as GitHub issues and exposing them as MCP resources for your coding agent
- Judge Code Diffs: Provides a tool to evaluate git diffs against the original workplan with full codebase context and provides detailed feedback, ensuring the implementation does not deviate from the original requirements and providing guidance on what to change to do so
- Isolated Development Environments: Creates Git worktrees and linked branches for streamlined, isolated development workflow (can be done separately from workplan generation), allowing parallel development with multiple agents
- Seamless GitHub Integration: Automatically creates labeled issues with proper branch linking in the GitHub UI, posts judgement sub-issues with references to original workplan issues.
- Context Control: Use
.yellhornignorefiles to exclude specific files and directories from the AI context, similar to.gitignore - MCP Resources: Exposes workplans as standard MCP resources for easy listing and retrieval
Installation
# Install from PyPI
pip install yellhorn-mcp
# Install from source
git clone https://github.com/msnidal/yellhorn-mcp.git
cd yellhorn-mcp
pip install -e .
Configuration
The server requires the following environment variables:
GEMINI_API_KEY: Your Gemini API key (required)REPO_PATH: Path to your repository (defaults to current directory)YELLHORN_MCP_MODEL: Gemini model to use (defaults to "gemini-2.5-pro-preview-03-25"). You can also use "gemini-2.5-flash-preview-04-17" for lower latency.
The server also requires the GitHub CLI (gh) to be installed and authenticated.
Usage
Running the server
# As a standalone server
yellhorn-mcp --repo-path /path/to/repo --host 127.0.0.1 --port 8000
# Using the MCP CLI
mcp dev yellhorn_mcp.server
# Install as a permanent MCP server for Claude Desktop
mcp install yellhorn_mcp.server
# Set environment variables during installation
mcp install yellhorn_mcp.server -v GEMINI_API_KEY=your_key_here -v REPO_PATH=/path/to/repo
Integration with Claude Code
When working with Claude Code, you can use the Yellhorn MCP tools by:
-
Starting a project task:
Please generate a workplan with title "[Your Title]" and detailed description "[Your detailed requirements]" -
Create a worktree for the workplan (optional):
Please create a worktree for issue #123 -
Navigate to the created worktree directory:
cd [worktree_path] # The path is returned in the response -
View the workplan if needed:
# You can run this from anywhere Please get the workplan for issue #123 -
Make your changes, create a PR, and request a review:
# First create a PR using your preferred method (Git CLI, GitHub CLI, or web UI) git add . git commit -m "Implement feature" git push origin HEAD gh pr create --title "[PR Title]" --body "[PR Description]" # You can run this from anywhere Please judge the PR comparing "main" and "feature-branch" against the workplan in issue #123
Tools
create_workplan
Creates a GitHub issue with a detailed workplan based on the title and detailed description.
Input:
title: Title for the GitHub issue (will be used as issue title and header)detailed_description: Detailed description for the workplan
Output:
- JSON string containing:
issue_url: URL to the created GitHub issueissue_number: The GitHub issue number
create_worktree
Creates a git worktree with a linked branch for isolated development from an existing workplan issue.
Input:
issue_number: The GitHub issue number for the workplan
Output:
- JSON string containing:
worktree_path: Path to the created Git worktree directorybranch_name: Name of the branch created for the worktreeissue_url: URL to the associated GitHub issue
get_workplan
Retrieves the workplan content (GitHub issue body) associated with a workplan.
Input:
issue_number: The GitHub issue number for the workplan.
Output:
- The content of the workplan issue as a string
judge_workplan
Triggers an asynchronous code judgement comparing two git refs (branches or commits) against a workplan described in a GitHub issue. Creates a GitHub sub-issue with the judgement asynchronously after running (in the background).
Input:
issue_number: The GitHub issue number for the workplan.base_ref: Base Git ref (commit SHA, branch name, tag) for comparison. Defaults to 'main'.head_ref: Head Git ref (commit SHA, branch name, tag) for comparison. Defaults to 'HEAD'.
Output:
- A confirmation message that the judgement task has been initiated
Resource Access
Yellhorn MCP also implements the standard MCP resource API to provide access to workplans:
list-resources: Lists all workplans (GitHub issues with the yellhorn-mcp label)get-resource: Retrieves the content of a specific workplan by issue number
These can be accessed via the standard MCP CLI commands:
# List all workplans
mcp list-resources yellhorn-mcp
# Get a specific workplan by issue number
mcp get-resource yellhorn-mcp 123
Development
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest
CI/CD
The project uses GitHub Actions for continuous integration and deployment:
-
Testing: Runs automatically on pull requests and pushes to the main branch
- Linting with flake8
- Format checking with black
- Testing with pytest
-
Publishing: Automatically publishes to PyPI when a version tag is pushed
- Tag must match the version in pyproject.toml (e.g., v0.2.2)
- Requires a PyPI API token stored as a GitHub repository secret (PYPI_API_TOKEN)
To release a new version:
- Update version in pyproject.toml and yellhorn_mcp/init.py
- Update CHANGELOG.md with the new changes
- Commit changes:
git commit -am "Bump version to X.Y.Z" - Tag the commit:
git tag vX.Y.Z - Push changes and tag:
git push && git push --tags
For a history of changes, see the Changelog.
For more detailed instructions, see the Usage Guide.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yellhorn_mcp-0.2.6.tar.gz.
File metadata
- Download URL: yellhorn_mcp-0.2.6.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
926c884c337287665cd41d9aed6ad6858e484b5b03590e06e412e6e1608832e2
|
|
| MD5 |
78062e2ccde8e7d5a0d893d05603adec
|
|
| BLAKE2b-256 |
7356a4820c9337697c71f43d2bd913c977335697d9bab5f7e2692ceda09f81c1
|
File details
Details for the file yellhorn_mcp-0.2.6-py3-none-any.whl.
File metadata
- Download URL: yellhorn_mcp-0.2.6-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
93adefeca36077c40f160814adcb13e46d174b98177cd8ed794be3d13510d1f9
|
|
| MD5 |
6fde851e33a302cd1d57e73a758e97d6
|
|
| BLAKE2b-256 |
ed45ec238491807d6c1c6b34390716000c6e9dbabc299eb373ed985df50aea7c
|