iTerm 模型上下文协议服务器
一个在当前 iTerm 会话中执行命令的 Model Context Protocol 服务器,适用于 REPL 和 CLI 辅助。
快速入门
安装
- 确保已安装 Node.js 18 或更高版本,并运行 iTerm2。
- 使用以下命令通过 Smithery 安装: yarn global add @smithery/cli npx -y @smithery/cli install iterm-mcp --client claude
配置 Claude Desktop
在配置文件中添加以下内容:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"iterm-mcp": {
"command": "npx",
"args": ["-y", "iterm-mcp"]
}
}
}
开发
- 克隆仓库并安装依赖: git clone https://github.com/ferrislucas/iterm-mcp.git cd iterm-mcp yarn install
- 构建项目: yarn run build
- 启动开发模式: yarn run watch
调试
使用 MCP Inspector 工具进行调试:
yarn run inspector
yarn debug