A Model Context Protocol (MCP) server that exposes Brew build system functionality to AI assistants like Cursor AI.
This MCP server provides three main tools:
get_brew_tag_info- Get detailed information about a specific Brew taglist_brew_packages- List all unique package names associated with a given taglist_brew_builds- List all builds associated with a given tagget_tag_inheritance_info- Get the tag inheritance information about a specific Brew tag.
Install the required dependencies:
pip install -r requirements.txtBuild the container image:
podman build -t brew-mcp-server .This server supports two transport methods:
- SSE (Server-Sent Events) - HTTP-based transport
- stdio - Standard input/output transport
First, run the container with SSE transport:
podman run -d -p 8050:8050 --env MCP_TRANSPORT=sse --name brew-mcp-server brew-mcp-serverThe stdio transport runs the container on-demand for each request.
Open Cursor AI → Settings (Cmd/Ctrl + ,) → Search for "MCP" → Add the server configuration:
{
"mcpServers": {
"local-brew-mcp-server-sse": {
"transport": "sse",
"url": "http://localhost:8050/sse",
"name": "brew-mcp-server",
"description": "Local Brew MCP Server for Red Hat build system integration (SSE transport via podman)"
},
"local-brew-mcp-server-stdio": {
"transport": "stdio",
"command": "podman",
"args": [
"run",
"--rm",
"-i",
"--env", "MCP_TRANSPORT=stdio",
"brew-mcp-server"
],
"name": "brew-mcp-server",
"description": "Local Brew MCP Server for Red Hat build system integration (stdio transport via podman)"
}
},
"client": {
"name": "cursor-mcp-client",
"version": "1.0.0"
},
"connection": {
"timeout": 30,
"retries": 3
}
}Note: You can use either transport method, but not both simultaneously. Choose one based on your needs:
- Use SSE for persistent connections and better performance
- Use stdio for simpler setup or if you prefer on-demand execution
Once integrated with Cursor AI, you can use natural language to interact with the Brew system:
- "Get information about the RHEL-8.8.0 tag"
- "List all packages under the my-project-tag"
- "Show builds for the latest RHEL tag"
- "What are the parent tags for RHEL-9.3.0?"
# Start the server
podman run -d -p 8050:8050 --env MCP_TRANSPORT=sse --name brew-mcp-server brew-mcp-server
# Check logs
podman logs brew-mcp-server
# Stop the server
podman stop brew-mcp-server
# Remove the container
podman rm brew-mcp-serverThe stdio transport automatically manages container lifecycle - no manual container management needed.
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Cursor AI │───▶│ Podman │───▶│ Brew Client │
│ (Client) │ │ Container │ │ (brew_client.py)│
└─────────────────┘ │ (mcp_server.py) │ └─────────────────┘
└─────────────────┘ │
▼
┌─────────────────┐
│ Brew/Koji Hub │
│ (brewhub.eng... │
└─────────────────┘