
Homebrew MCP:用于安装,升级,搜索和维护macOS软件包的综合酿造支持.
概览
一个用于Homebrew软件包管理的模型上下文协议(MCP)服务器,旨在与Claude桌面和其他MCP兼容客户端进行无缝集成. - Python 3.13 - 模式上下文协议 - Homebrew(macOS) - uv - 将Homebrew命令作为MCP工具。 所支持的命令按照函数分组: - 安装, 未安装, 升级, 清理 - 列表, 搜索, 信息, 过时的, deps - 医生, 更新 - tap, untap - pin, unpin - 服务 - 通过子进程运行真实的酿酒命令( 需要homebrew on macOS). - 完全符合MCP谱(stdio,JSON-RPC 2.0,MCP spec 2025-06-18). - 为克洛德桌面和其他LLM客户端设计. - 功能、申报活字(无课)。 - 记录所有请求/结果到 homebrew mcp.log 。 - 包括一个交互式测试脚本(test claude homebrew mcp.py),即: - 从MCP服务器中动态获取可用的工具. - 允许克洛德发出多个工具呼叫,要求单一用户提示.
概述(AI 翻译)
一个用于Homebrew软件包管理的模型上下文协议(MCP)服务器on macOS,旨在与克洛德桌面和其他MCP兼容客户端进行无缝集成.
- 语言: Python 3.13
- ** MCP:** 示范背景协议
- ** 包务经理:** 客舱(大型操作系统)
- ** Venv/扶养管理人:**vv
– – . . .
□ 特性
- 将Homebrew命令作为MCP工具。 所支持的命令按函数分组:
- 包装管理: [[T0]、[[T1]、[T2]、[T3]
- ** 信息与发现:** [[[T4]、[T5]、[T6]、[[T7]、[T8]
- ** 系统健康和最新情况:** [[T9],[T10]]
- 标签和出处管理: [[T11] [T12]]
- ** 车辆管理:** [[T13] [T14]]
- ** 服务管理:**
services - 通过子进程运行真实
brew命令(需要homebrew on macOS). - 完全符合MCP谱(stdio,JSON-RPC 2.0,MCP spec 2025-06-18).
- 为克洛德桌面和其他LLM客户端设计.
- 功能、申报活字(无课)。
- 记录所有请求/结果为
homebrew_mcp.log。 - 包括一个交互式测试脚本([[T18]),该脚本:
- 从 MCP 服务器动态获取可用的工具.
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Homebrew MCP Python Server
A Model Context Protocol (MCP) server for Homebrew package management on macOS, designed for seamless integration with Claude Desktop and other MCP-compatible clients.
- Language: Python 3.13
- MCP: Model Context Protocol
- Package Manager: Homebrew (macOS)
- Venv/Dependency Manager: uv
Features
- Exposes Homebrew commands as MCP tools. The supported commands are grouped by function:
- Package Management:
install,uninstall,upgrade,cleanup - Information & Discovery:
list,search,info,outdated,deps - System Health & Updates:
doctor,update - Tap & Source Management:
tap,untap - Version Management:
pin,unpin - Service Management:
services
- Package Management:
- Runs real
brewcommands via subprocess (requires Homebrew on macOS). - Fully MCP spec-compliant (stdio, JSON-RPC 2.0, MCP spec 2025-06-18).
- Designed for Claude Desktop and other LLM clients.
- Functional, declarative Python (no classes).
- Logs all requests/results to
homebrew_mcp.log. - Includes an interactive test script (
test_claude_homebrew_mcp.py) that:- Dynamically fetches available tools from the MCP server.
- Allows Claude to make multiple tool calls for a single user prompt.
- Demonstrates advanced interaction patterns with the Anthropic API.
Installation
-
Clone this repository:
git clone https://github.com/jeannier/homebrew-mcp cd homebrew-mcp -
Install uv (if not already):
brew install uv -
Create a virtual environment and install dependencies:
uv venv source .venv/bin/activate # Activate the virtual environment uv pip install -r requirements.txt -
Run the MCP Server (for Local Testing): To test the server locally or during development, you can run it directly:
uv run python homebrew_mcp.pyThe server will then start. If successful, there will be no immediate output; it will silently listen for MCP requests over stdio. You can confirm it’s running by checking the
homebrew_mcp.logfile.Note: If you are integrating with Claude Desktop, you do not need to run this command manually. Claude Desktop will start the server automatically based on the configuration provided in the “Claude Desktop Integration” section. This command is for direct testing or development purposes.
Cursor Integration
Prerequisite: Before adding the tool, please complete the steps in the Installation section to set up the project and its dependencies. The “Add to Cursor” button assumes the project is located at ~/Documents/GitHub/homebrew-mcp.
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"homebrew-mcp": {
"command": "uv",
"args": [
"run",
"--directory",
"/path/to/your/project/",
"homebrew_mcp.py"
],
"type": "stdio"
}
}
}