greybeard
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@greybeardreview this diff for production risks"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π§ greybeard
. .
.| |.
|| ||
.+====+.
| .''. |
|/ () \| "Would I be okay getting paged
(_`.__.'_) about this at 3am six months
//| |\\ from now?"
|| | | ||
`--' '--`
~~~~~~~~~~~~~~~~~A CLI-first thinking tool that channels the calm, battle-tested wisdom of a Staff / Principal engineer β helping you review decisions, systems, and tradeoffs before you ship them.
The greybeard has been paged at 3am. They've watched confident decisions become production incidents. They've seen "we'll clean it up later" last five years. They're not here to block you β they're here to make sure you've thought it through.
Philosophy
This is not a linter. It won't yell at your variable names or enforce opinionated formatting.
This is a thinking partner. It models how Staff and Principal engineers reason about systems: failure modes, ownership, long-term cost, and the human impact of decisions. It asks the uncomfortable questions so your reviewer doesn't have to.
Features
Core Reviews
Architecture Decisions β Sanity-check design docs and proposals
Code Diffs β Review changes through a Staff-engineer lens
Tradeoff Analysis β Surface operational risks, ownership gaps, maintenance burden
Mentorship β Learn how experienced engineers think through problems
Communication Coaching β Phrase feedback for specific audiences
Modes
Mode | Purpose |
review | Fast, direct Staff-level assessment (default) |
mentor | Explain reasoning and thought process behind concerns |
coach | Help phrase constructive feedback for a specific audience |
self-check | Review your own thinking before sharing with others |
Interactive Mode
After running an analysis, ask follow-up questions, refine with additional context, and explore alternativesβall in a single conversation.
git diff main | greybeard analyze --interactive
> What happens if this fails in production?
> refine We're doing a 6-month rollout
> explore What if we used event sourcing instead?See the Interactive Mode Guide for workflows, tips, and examples.
Content Packs
10+ built-in perspectives (staff engineer, on-call, security, platform engineering, startup pragmatist, etc.). Write custom YAML packs for your team's values.
IDE & Tool Integration
Runs as an MCP server compatible with Claude Desktop, Cursor, Zed, and any MCP-compatible tool. Bring greybeard into your IDE.
Multi-Backend LLM Support
Works with OpenAI, Anthropic, Ollama, or LM Studio. Configure once, use anywhere.
Quick Start
1. Install
# Using uv (recommended - faster)
uv pip install greybeard
# Or using pip
pip install greybeardWith optional extras:
uv pip install "greybeard[anthropic]" # Add Claude/Anthropic support
uv pip install "greybeard[all]" # Everything2. Configure
greybeard init # Interactive setup wizard
greybeard config show # See what's configuredThis creates ~/.greybeard/config.yaml with your LLM backend choice.
3. Run Your First Review
# Review a code diff
git diff main | greybeard analyze
# Review with a specific mode and pack
git diff main | greybeard analyze --mode mentor --pack oncall-future-you
# Run a self-check on a design decision
greybeard self-check --context "We're migrating auth mid-sprint"
# Get coaching on how to phrase feedback
greybeard coach --audience leadership --context "I think we're moving too fast"4. Try Interactive Mode
# Start an interactive REPL after initial analysis
cat design-doc.md | greybeard analyze --interactive
# Then ask follow-up questions, refine with context, explore alternatives
> What's the biggest operational risk?
> refine We have strong on-call practices with Datadog everywhere
> explore What if we kept the monolith for auth?π Full Documentation β docs and readthedocs
Usage Examples
Review a Git Diff
The simplest way to get feedback:
# Use default mode (review) and default pack from config
git diff main | greybeard analyze
# Or specify both
git diff main | greybeard analyze --mode mentor --pack staff-core
# Save output to a file
git diff main | greybeard analyze --output review.mdInteractive Iteration
Ask follow-up questions and refine your thinking:
cat my-design.md | greybeard analyze --interactive --pack oncall-future-you
Running initial analysis...
[Initial analysis output]
Interactive Review Session. Type 'help' for commands or 'quit' to exit.
> What about failure recovery?
[greybeard responds with recovery implications]
> refine We're rolling out gradually over 6 months
[greybeard adjusts analysis based on timeline]
> explore What if we used event sourcing?
[greybeard compares to original approach]
> quitSelf-Check Before Sharing
Review your own decision privately before presenting:
greybeard self-check --context "We're caching heavily with Redis"
# Returns thoughtful review of your assumptions and risksCoach Mode for Leadership Conversations
Get help phrasing a concern constructively:
greybeard coach --audience leadership --interactive \
--context "I'm worried we're shipping without enough integration testing"
# Initial response frames the concern clearly
# Then ask follow-ups to refine your message
> What if we added a kill switch?
> How do I explain this to non-technical stakeholders?Include Repo Context
For better analysis, give greybeard your project structure:
git diff main | greybeard analyze --repo . --context "microservices migration"
# Greybeard has access to README, git history, structure
# Responses are more grounded in your actual setupReview with a Custom Pack
Create a .yaml file for your team's values and review with it:
cat design-doc.md | greybeard analyze --pack ./my-team-pack.yamlSee Custom Packs below and Pack Schema for format.
Content Packs
Content packs define the perspective, tone, and heuristics used during review. They're plain YAMLβhuman-editable, version-controllable, shareable.
Built-in Packs
Pack | Perspective | Focus |
| Staff Engineer | Ops, ownership, long-term cost |
| On-call engineer, 3am | Failure modes, pager noise, recovery |
| Experienced mentor | Teaching, reasoning, growth |
| Solutions Architect | Entity modeling, boundaries, fit-for-purpose |
| Platform Engineer | DX, abstractions, tool maturity, scaling |
| AppSec Engineer | Auth, injection, secrets, overprivileged access |
| Pragmatic Engineer | Complexity vs stage, reversibility, scope |
| SRE / On-call | Blameless analysis, root cause, action items |
| Platform Engineering | IDP maturity, automation vs process |
| Migration Expert | Lock safety, zero-downtime, rollback, performance |
Testing Packs
Each built-in pack includes an example file to test with:
# Test a pack against its example
cat packs/staff-core/STAFF-CORE-EXAMPLE.md | greybeard analyze --pack staff-core
# Try different modes
cat packs/mentor-mode/MENTOR-MODE-EXAMPLE.md | greybeard analyze --pack mentor-mode --mode mentor
# See all examples
ls packs/*-EXAMPLE.mdCustom Packs
Create a .yaml file with your own perspective:
name: my-team-pack
perspective: "Platform engineer at a Series B startup"
tone: "pragmatic, balancing shipping speed with sustainability"
focus_areas:
- "team capacity vs scope"
- "infrastructure complexity"
- "operational readiness"
heuristics:
- "ask: can we do this in 2 weeks?"
- "what's the blast radius if this breaks?"
- "does the team have context?"
communication_style: "clear, direct, assume good intent"
description: "Reviews for our team's operating philosophy"Then use it:
cat design-doc.md | greybeard analyze --pack ./my-team-pack.yamlInstall External Packs
Share and install packs from GitHub repos:
# Install all packs from a public repo
greybeard pack install github:someone/their-packs
# Install a single pack
greybeard pack install github:owner/repo/packs/my-pack.yaml
# List installed packs
greybeard pack list
# Remove a source
greybeard pack remove owner__repoInstalled packs are cached in ~/.greybeard/packs/ and work exactly like built-ins.
Publishing a Pack
Create a public GitHub repo with a packs/ folder containing .yaml files. Anyone can install it:
greybeard pack install github:your-handle/your-pack-repoSee Packs Guide for detailed pack creation and best practices.
LLM Backends
greybeard works with any LLM backend. Configure once with greybeard init:
Backend | How | What You Need |
| OpenAI API |
|
| Anthropic API |
|
| Local (free) | Ollama running locally |
| Local (free) | LM Studio server running |
Configure Your Backend
# Interactive setup
greybeard init
# Or set directly
greybeard config set llm.backend anthropic
greybeard config set llm.model claude-3-5-sonnet
greybeard config show # VerifyConfig lives at ~/.greybeard/config.yaml.
See Backends Guide for detailed setup for each backend.
IDE & Tool Integration (MCP)
Run greybeard as an MCP server in Claude Desktop, Cursor, Zed, or other MCP-compatible tools.
Claude Desktop
Install greybeard:
uv pip install greybeardGet the greybeard path:
which greybeardEdit Claude config:
macOS:
~/Library/Application\ Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add:
{
"mcpServers": {
"greybeard": {
"command": "/path/to/greybeard",
"args": ["mcp"]
}
}
}Restart Claude Desktop. Now you can:
You: I drafted an architecture decision. Can you review it?
Claude: I'll review this with greybeard.
[calls greybeard review tool]
[returns analysis with risks, tradeoffs, questions]Other Tools
Cursor, Zed, and any MCP-compatible tool work the same way. Point them at greybeard mcp (or use the full path from which greybeard).
See MCP Integration Guide for detailed setup and workflow examples.
GitHub Actions Integration
Automatically review pull requests with greybeard using GitHub Actions. Get Staff-engineer-level feedback on demand β triggered by a label so you control when (and what) it costs.
Quick Start
Add the workflow file to your repo:
mkdir -p .github/workflows
curl -L https://raw.githubusercontent.com/btotharye/greybeard/main/.github/workflows/greybeard-review.yml \
-o .github/workflows/greybeard-review.ymlSet up GitHub Secrets:
ANTHROPIC_API_KEYβ your Anthropic API key (get one at console.anthropic.com)GITHUB_TOKENβ auto-provided by GitHub Actions, no setup needed
Create the
greybeard-reviewlabel in your repo:Go to your repo β Issues β Labels β New label
Name:
greybeard-review, color:#6f42c1(purple) π£
To trigger a review: add the
greybeard-reviewlabel to any PR.
Manual trigger: You can also run it on demand from Actions β Greybeard Code Review β Run workflow.
How It Works
The workflow runs three parallel review perspectives when triggered:
Pack | Focus | Icon |
| Overall engineering quality, architecture, readability | π§ |
| Operational risk, runbooks, alerting, rollback | π |
| Security vulnerabilities, auth, data exposure | π |
Each pack posts its own PR comment. Comments are updated (not duplicated) on re-runs.
Workflow Features
β Label-triggered β only runs when you explicitly ask for it (saves cost)
β Manual dispatch β run from the Actions tab any time
β Three parallel perspectives β staff, oncall, security in one run
β PR comments with findings β updated on re-run, not duplicated
β GitHub Check status for branch protection rules
β Diff truncation β automatically stays within LLM token limits
β Blocking issue detection β marks the check as failed if critical patterns found
Cost Management
The workflow uses Claude Haiku by default β the fastest and cheapest Anthropic model (~$0.05β0.20 per full 3-pack review vs ~$1+ for Sonnet).
Label-based triggering is the main cost control β reviews only run when you add the label. No surprise charges from every commit push.
Model | Cost (input/output per MTok) | Best for |
| $1 / $5 | Most PRs β fast, cheap, solid |
| $3 / $15 | High-stakes PRs needing deeper analysis |
| $5 / $25 | Architecture reviews, complex migrations |
To use a more powerful model for a specific repo, update the workflow step:
- name: Configure Anthropic backend
run: |
greybeard config set llm.backend anthropic
greybeard config set llm.model claude-sonnet-4-6 # or claude-opus-4-6Required Permissions
The workflow requires these permissions (already set in the bundled workflow file):
permissions:
contents: read
pull-requests: write # post PR comments
checks: write # set check status for branch protectionConfiguration
Optional GitHub Variables (set in repo Settings β Variables):
Variable | Default | Description |
|
| Block threshold: |
Troubleshooting
Q: The workflow isn't triggering when I add the label
Confirm the label name is exactly
greybeard-review(case-sensitive)Check that the workflow file is on your default branch (label events only trigger from there)
Q: 404 - model not found error
The Anthropic model name is wrong. Check Anthropic's model docs for current names.
Q: Review comments aren't appearing
Verify
ANTHROPIC_API_KEYis set in repo SecretsCheck the Actions log for API errors
Q: Want to run for every PR automatically?
Change the trigger in the workflow to
types: [opened, synchronize, reopened, ready_for_review]Be aware this will charge your API key on every push to an open PR
See GitHub Actions Integration Guide for more examples and troubleshooting.
Pre-commit Hook Integration
Run greybeard checks before committingβfail on risk gates, require approvals on sensitive changes.
Quick Start
Install pre-commit:
pip install pre-commitAdd to
.pre-commit-config.yaml:
repos:
- repo: https://github.com/btotharye/greybeard
rev: main
hooks:
- id: greybeard
stages: [commit]Install hooks:
pre-commit installRisk Gates
Fail commits on sensitive paths:
# .greybeard-precommit.yaml
enabled: true
default_pack: staff-core
fail_on_concerns: critical
risk_gates:
- name: "infra-changes"
patterns: ["infra/*", "terraform/*"]
fail_on_concerns: critical
required_packs: ["platform-eng"]
skip_if_branch: ["hotfix/*"] # Skip on urgent branches
- name: "auth-changes"
patterns: ["auth/*", "security/*"]
fail_on_concerns: high
required_packs: ["security-reviewer"]Then commit normallyβgreybeard will check before the commit goes through.
See Pre-commit Integration Guide for full configuration and examples.
Advanced Topics
Building Custom Agents
Use the greybeard agent framework to build specialized decision-making tools:
from greybeard.common import BaseAgent
class MyAgent(BaseAgent):
def __init__(self):
super().__init__(name="my-agent", description="...")
def run(self, user_input: str) -> dict:
# Use research, interview, documentation capabilities
context = self.research.gather_file_context("file.txt")
response = self.llm.call(...)
return {"result": response}Available Capabilities:
researchβ Gather context from files, directories, git historyinterviewβ Multi-turn conversations with usersllmβ Unified interface to all LLM backendsdocumentationβ Format output as Markdown, JSON, YAML
See Creating Agents Guide and the template.
Planned Specialized Agents:
Architecture Agent (v1.1) β Document architectural decisions (ADRs)
SLO Agent (v1.2) β Analyze systems and recommend SLOs
Tech Debt Agent (v1.3) β Scan code and prioritize technical debt
Output Formatting
All output is structured Markdown:
## Summary
Your decision summary...
## Key Risks
- Risk 1
- Risk 2
## Tradeoffs
...
## Questions to Answer Before Proceeding
...
## Suggested Communication Language
...
_Assumptions made: ..._Save with --output filename.md. See Output Guide.
Development & Contributing
Quick Dev Setup
git clone https://github.com/btotharye/greybeard.git
cd greybeard
# Using Makefile (easiest)
make install-dev
make test
make help # see all commands
# Or using uv directly
uv pip install -e ".[dev]"
uv run pytestWays to Contribute
Content Packs (easiest, high value)
Create a perspective your team or community needs
See Packs Guide
Custom Agents
Build specialized tools on top of the framework
Bug Reports & Features
Code Contributions
See CONTRIBUTING.md for setup, testing, style
Follow Code of Conduct
Community Packs
Build a pack repo and share it
Open an issue linking to itβwe'll feature it
Design Philosophy
Multi-backend β OpenAI, Anthropic, Ollama, LM Studio. Choose your tool.
CLI-first β No web UI. Pipe in, pipe out. Unix philosophy.
Stateless β No conversation history by default. Add
--contextfor prior context, or use--interactivefor stateful REPL.Pack format β YAML for human editability and version control.
MCP stdio β Simplest, most compatible tool integration.
Minimal dependencies β
click,pyyaml,rich,python-dotenv, optionalopenai/anthropic.
Documentation
Getting Started β Installation, setup, first steps
Guides β Interactive mode, packs, agents, backends, MCP, output
Reference β CLI, config, pack schema
Contributing β How to contribute
Full Docs β Hosted documentation
License
MIT License β Use freely, modify, and distribute.
Questions?
π Check the docs
π¬ GitHub Discussions
π Open an issue
"The greybeard isn't here to block you. They're here to make sure you've thought it through."
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/btotharye/greybeard'
If you have feedback or need assistance with the MCP directory API, please join our Discord server