Token导航 LogoToken导航TokenDH.com
Claude Coder Mac MCP logo
开发工具未说明官方级别未说明来源级核验

Claude Coder Mac MCP

MCP Server

一个允许在iTerm2窗口中生成新的Claude代码实例的MCP服务器工具,适用于开发者在macOS环境下快速启动交互式编码会话。

工具数

2

提示词数

0

GitHub Stars

0

资源数

0
代码生成开发工具TypeScriptClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

pm990320

提供方

pm990320

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

克劳德编码器mac-mcp

一个MCP服务器,允许Claude Desktop在iTerm2窗口中生成新的Claude Code实例。

特性

  • spawn_claude_coder:使用给定的提示符生成一个新的Claude Code实例

- 打开一个新的iTerm2窗口 - 可选择与一起运行 --dangerously-skip-permissions (必须在服务器上启用) - 将提示直接传递给Claude - 终端变得完全互动

  • list_iterm_windows:列出所有iTerm2窗口和会话

需求

安装

通过npm(推荐)

npm install -g claude-coder-mac-mcp

来源

git clone https://github.com/pm990320/claude-coder-mac-mcp.git
cd claude-coder-mac-mcp
npm install
npm run build

验证安装

claude-coder-mac-mcp check

这将运行环境检查,以验证macOS、iTerm2、Claude Code CLI和自动化权限是否都配置正确。

CLI使用情况

CLI有多个命令:

# Show help
claude-coder-mac-mcp --help

# Start the MCP server (used by Claude Desktop)
# By default, spawned Claude instances run in normal mode (user must approve actions)
claude-coder-mac-mcp mcp

# Start the MCP server with --dangerously-skip-permissions enabled
# WARNING: This allows spawned Claude instances to run without user approval
claude-coder-mac-mcp mcp --dangerously-skip-permissions

# Test spawning a Claude Code instance directly (normal mode)
claude-coder-mac-mcp spawn "Help me write a REST API"
claude-coder-mac-mcp spawn "Fix the tests" -d ~/myproject -t "Test Fixer"

# Test spawning with --dangerously-skip-permissions
claude-coder-mac-mcp spawn "Fix the tests" --dangerously-skip-permissions

# List current iTerm2 windows
claude-coder-mac-mcp list

# Check environment is configured correctly
claude-coder-mac-mcp check

Claude桌面配置

添加到您的Claude桌面配置(~/Library/Application Support/Claude/claude_desktop_config.json):

正常模式 (用户必须批准Claude Code操作):

{
  "mcpServers": {
    "claude-coder-mac": {
      "command": "node",
      "args": ["/path/to/claude-coder-mac-mcp/dist/index.js", "mcp"]
    }
  }
}

带有--危险地跳过权限 (Claude Code自主运行):

{
  "mcpServers": {
    "claude-coder-mac": {
      "command": "node",
      "args": ["/path/to/claude-coder-mac-mcp/dist/index.js", "mcp", "--dangerously-skip-permissions"]
    }
  }
}

使用Claude Desktop

配置后,您可以要求Claude Desktop生成新的Claude Code实例:

“启动一个新的Claude编码器,在~/myproject上处理我的项目,任务是:实现用户身份验证”

克劳德将使用 spawn_claude_coder 使用新的Claude Code会话打开iTerm2的工具。

权限

首次使用时,macOS会要求您授予自动化权限。首选

系统设置>隐私和安全>自动化

并确保运行MCP服务器的应用程序(例如Claude Desktop)有权控制iTerm2。

MCP工具参数

spawn_claude_coder

参数必填说明
prompt给Claude Code的任务/提示
workingDirectory运行Claude代码的目录(默认为~)
windowTitleiTerm2窗口的自定义标题

注:是否 --dangerously-skip-permissions 传递给生成的Claude实例的参数由服务器启动标志控制,而不是由工具参数控制。

list_iterm_windows

没有参数。列出所有打开的iTerm2窗口及其会话。

发展

# Install dependencies
npm install

# Build
npm run build

# Run tests
npm test

# Lint
npm run lint

# Fix lint issues
npm run fix

# Type check
npm run typecheck

项目结构

src/
├── index.ts    # CLI entrypoint (uses commander)
├── server.ts   # MCP server setup and tool registration
├── spawn.ts    # Core spawn functionality
├── iterm.ts    # iTerm2 AppleScript utilities
└── check.ts    # Environment verification checks

tests/
├── spawn.test.ts   # Unit tests for spawn functions
└── iterm.test.ts   # Unit tests for iTerm utilities

为了可测试性,这些模块是分开的- spawn.tsiterm.ts 包含可以独立进行单元测试的纯函数。

许可证

麻省理工学院

目录标签

目录标签

代码生成开发工具TypeScriptClaude本地部署终端集成macOS工具自动化编程

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

2

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP