Skip to main content

Yellhorn offers MCP tools to generate detailed workplans with Gemini 2.5 Pro or OpenAI models and to review diffs against them using your entire codebase as context.

Project description

Yellhorn MCP

Yellhorn Logo

A Model Context Protocol (MCP) server that exposes Gemini 2.5 Pro and OpenAI 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
  • Seamless GitHub Integration: Automatically creates labeled issues, posts judgement sub-issues with references to original workplan issues
  • Context Control: Use .yellhornignore files 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 for Gemini models)
  • OPENAI_API_KEY: Your OpenAI API key (required for OpenAI models)
  • REPO_PATH: Path to your repository (defaults to current directory)
  • YELLHORN_MCP_MODEL: Model to use (defaults to "gemini-2.5-pro-preview-03-25"). Available options:
    • Gemini models: "gemini-2.5-pro-preview-03-25", "gemini-2.5-flash-preview-04-17"
    • OpenAI models: "gpt-4o", "gpt-4o-mini", "o4-mini", "o3"

The server also requires the GitHub CLI (gh) to be installed and authenticated.

Usage

Getting Started

VSCode/Cursor Setup

To configure Yellhorn MCP in VSCode or Cursor, create a .vscode/mcp.json file at the root of your workspace with the following content:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "gemini-api-key",
      "description": "Gemini API Key"
    }
  ],
  "servers": {
    "yellhorn-mcp": {
      "type": "stdio",
      "command": "/Users/msnidal/.pyenv/shims/yellhorn-mcp",
      "args": [],
      "env": {
        "GEMINI_API_KEY": "${input:gemini-api-key}",
        "REPO_PATH": "${workspaceFolder}"
      }
    }
  }
}

Claude Code Setup

To configure Yellhorn MCP with Claude Code directly, add a root-level .mcp.json file in your project with the following content:

{
  "mcpServers": {
    "yellhorn-mcp": {
      "type": "stdio",
      "command": "yellhorn-mcp",
      "args": ["--model", "o3"],
      "env": {}
    }
  }
}

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
  • codebase_reasoning: (optional) Control whether AI enhancement is performed:
    • "full": (default) Use AI to enhance the workplan with codebase context
    • "none": Skip AI enhancement, use the provided description as-is

Output:

  • JSON string containing:
    • issue_url: URL to the created GitHub issue
    • issue_number: The GitHub issue number

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

# Run tests with coverage report
pytest --cov=yellhorn_mcp --cov-report term-missing

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:

  1. Update version in pyproject.toml and yellhorn_mcp/__init__.py
  2. Update CHANGELOG.md with the new changes
  3. Commit changes: git commit -am "Bump version to X.Y.Z"
  4. Tag the commit: git tag vX.Y.Z
  5. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yellhorn_mcp-0.3.3.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yellhorn_mcp-0.3.3-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

Details for the file yellhorn_mcp-0.3.3.tar.gz.

File metadata

  • Download URL: yellhorn_mcp-0.3.3.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

Hashes for yellhorn_mcp-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d32cb7070bfe18c11cf74a614be9b616cffa9254107c58e1969b4547bf1aa132
MD5 aad9866517f605b60867de8d96cc36bf
BLAKE2b-256 0792fe4e55fd95d5fe4863a3b22eb90ebf9c5901d665efba314c067b616ae3f4

See more details on using hashes here.

File details

Details for the file yellhorn_mcp-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: yellhorn_mcp-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 17.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for yellhorn_mcp-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 84ed810a4f9af1011186d4cc4c424fd382f1d79b5ce657f9c5e770bece2eb17e
MD5 2cea73d97480ce432cd66d5a74a760a3
BLAKE2b-256 6b02b62e58895f290d97aa14c7835bd762736be4646b85d09858d1a294e3a6e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page