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

X Code MCP Service

MCP Server

XCodeMCPService是一个保持xcrun mcpbridge在后台运行并通过可流式HTTP转发MCP请求的服务,适用于需要避免重复Xcode授权提示的开发场景。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
Swift开发工具HTTP服务Token认证

安装说明

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

作者 / 组织

ljh740

提供方

ljh740

最后核验

2026/5/17 20:23

快速接入

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

详细介绍

XCodeMCPService

中文文档

MCP Forward Bridge — Keep xcrun mcpbridge running in the background and forward MCP requests via Streamable HTTP.

Every MCP client connection spawns a new xcrun mcpbridge process, triggering an Xcode authorization prompt. This project keeps a single xcrun mcpbridge process alive and aggregates forwarded requests, eliminating repeated authorization.

MCP Client ──HTTP/POST──▶ XCodeMCPService ──stdio──▶ MCP Server (xcrun mcpbridge)
           ◀──JSON-RPC───                  ◀──pipe──

Features

  • Multi-server aggregation — Manage multiple MCP subprocesses and auto-aggregate downstream capabilities; tool names stay original in single-server mode and switch to namespace prefixes (serverName__toolName) only when multiple servers are configured
  • Streamable HTTP Transport — Lightweight HTTP server based on NWListener, providing /mcp endpoint, localhost only
  • Session management — Independent session per client with secure token identification
  • Process lifecycle — Crash detection + exponential backoff auto-restart
  • macOS status bar app — Visual service status, one-click start/stop

Requirements

  • macOS 15.0+
  • Swift 6.0+
  • Xcode 26.3+ (xcrun mcpbridge support)

Installation

git clone git@github.com:ljh740/XCodeMCPService.git
cd XCodeMCPService

# Build .app (recommended)
bash build-app.sh

# Install to Applications
cp -r "build/XCode MCP Service.app" /Applications/

Build output is at build/XCode MCP Service.app, containing:

ComponentPathDescription
Status bar appContents/MacOS/XCodeMCPStatusBarMain entry, visual status bar management
CLI serviceContents/MacOS/XCodeMCPServiceCommand-line service (for background use)

The packaging script also produces:

ArtifactPathDescription
Disk imagebuild/XCodeMCPService.dmgRecommended macOS release package
SHA-256build/XCodeMCPService.dmg.sha256Disk image checksum
Zip archivebuild/XCodeMCPService.app.zipUnsigned distributable package
SHA-256build/XCodeMCPService.app.zip.sha256Archive checksum
You can locate standalone binaries with swift build -c release --show-bin-path.

Quick Start

1. Create config file

mkdir -p ~/Library/Application\ Support/XCodeMCPService
{
  "bridge": {
    "port": 13339,
    "host": "127.0.0.1",
    "timeout": 30000,
    "logLevel": "info"
  },
  "servers": [
    {
      "name": "xcode-tools",
      "command": "xcrun",
      "args": ["mcpbridge"],
      "enabled": true
    }
  ]
}

Save as ~/Library/Application Support/XCodeMCPService/config.json.

Without a config file, the service uses built-in defaults (port 13339, auto-start xcrun mcpbridge). A default config file is created on first launch.

2. Start the service

# Via .app (status bar app)
open "/Applications/XCode MCP Service.app"

# Or via CLI
BIN_DIR="$(swift build -c release --show-bin-path)"
"$BIN_DIR/XCodeMCPService"

# Specify config file
"$BIN_DIR/XCodeMCPService" --config /path/to/config.json

# Via environment variable
CONFIG_PATH=/path/to/config.json "$BIN_DIR/XCodeMCPService"

3. Configure MCP client

Add to your MCP client configuration:

{
  "mcpServers": {
    "local-mcp": {
      "type": "http",
      "url": "http://127.0.0.1:13339/mcp"
    }
  }
}

Configuration Reference

BridgeConfig

FieldTypeDefaultDescription
portInt13339HTTP listen port
hostString"127.0.0.1"Listen address (127.0.0.1 or localhost only)
timeoutInt30000Request timeout (ms)
logLevelString"info"Log level: debug / info / warn / error

ServerConfig

FieldTypeDefaultDescription
nameStringUnique server name
commandStringLaunch command
args[String][]Command arguments
env{String: String}?nilEnvironment variables
enabledBooltrueWhether enabled

Config file lookup order

  1. --config CLI argument
  2. CONFIG_PATH environment variable
  3. ~/Library/Application Support/XCodeMCPService/config.json
  4. Built-in defaults (auto-written to default path on first launch)

Logs

Log files are stored by date in ~/Library/Application Support/XCodeMCPService/logs/ as yyyy-MM-dd.log. Also output to stderr.

Testing

swift test

83 tests covering: HTTP parsing/serialization/routing, session management, ResponseQueue, ID mapping, process lifecycle management, etc.

CI/CD

  • .github/workflows/ci.yml: runs swift build -c release and swift test --parallel on every push and pull request.
  • .github/workflows/release.yml: runs bash build-app.sh on every v* tag push or manual dispatch, then uploads the .app bundle, dmg, zip, and SHA-256 checksum files as workflow artifacts.
  • Tag builds also publish build/XCodeMCPService-.dmg, build/XCodeMCPService-.dmg.sha256, build/XCodeMCPService-.zip, and build/XCodeMCPService-.zip.sha256 to the matching GitHub Release.

License

MIT License

Acknowledgments

目录标签

目录标签

Swift开发工具HTTP服务Token认证本地部署Xcode工具MCP转发开发效率

接入字段

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

未说明

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

token

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

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

0

权限和风险

未说明token部署方式未说明

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

安装前确认

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

仍需确认:installCommand

来源信息

继续浏览同类 MCP