npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

xcodeerrormcp

v0.1.0

Published

An MCP server that runs xcodebuild and returns only build errors (no warnings).

Downloads

15

Readme

XcodeErrorMCP

一个轻量的 Model Context Protocol(MCP)服务器:运行 xcodebuild,并只返回 build errors(不包含 warnings),方便在 AI/自动化流程里快速定位编译失败原因。

Features(功能)

  • 通过 stdio JSON-RPC 提供 MCP 工具:xcode_build_errorsxcode_last_errors
  • 自动从 .xcactivitylog 提取诊断信息;如果找不到日志则回退解析 xcodebuild 输出。
  • 支持指定/自动发现 workspaceproject(当前目录仅有一个时可自动发现)。

Requirements(环境要求)

  • macOS 13+
  • Xcode(需要 /usr/bin/xcodebuild 可用)
  • Swift toolchain(随 Xcode 提供)

Install(NPM 安装)

仅支持 macOS。安装时会通过 swift build -c release 从源码编译二进制(需要已安装 Xcode)。

  • 如果该包已发布到 npm:npm i -g xcodeerrormcp
  • 如果你看到 E404 Not Found(说明尚未发布到 npm),可以用下面任意一种方式安装:
    • 从源码目录安装:npm i -g /path/to/XcodeErrorMCP
    • 从本地 tarball 安装:npm i -g /path/to/xcodeerrormcp-0.1.0.tgz(可用 npm pack 生成)
    • 从 GitHub 安装:npm i -g git+https://github.com/Johnnydaszhu/XcodeErrorMCP.git
  • 验证:xcodeerrormcp(或 xcode-error-mcp;启动 MCP server,等待 stdin 的 JSON-RPC 消息)

Install(Homebrew 安装)

brew install --HEAD --formula https://raw.githubusercontent.com/Johnnydaszhu/XcodeErrorMCP/main/Formula/xcode-error-mcp.rb

MCP Client Config(在客户端里配置)

示例(Claude Desktop / Cursor 等类似配置结构):

{
  "mcpServers": {
    "xcode-error-mcp": {
      "command": "xcodeerrormcp",
      "args": []
    }
  }
}

Tools(可用工具)

xcode_build_errors

运行 xcodebuild build 并返回错误摘要(无 warning)。常用参数:

  • scheme(必填:参数或环境变量 XCODE_SCHEME
  • workspace / project(二选一;不填时会尝试自动发现)
  • configuration(默认 Debug
  • destinationsdkderivedDataPathresultBundlePathclonedSourcePackagesDirPath
  • extraArgsxcodebuild 额外参数数组,追加在 build action 前)
  • workingDirectory(用于自动发现工程/相对路径)
  • codeSigningAllowed(默认 false,会设置 CODE_SIGNING_ALLOWED=NO

也支持通过环境变量传参(参数优先生效),常用:XCODE_SCHEMEXCODE_WORKSPACE/XCODE_PROJECTXCODE_DESTINATIONXCODE_DERIVED_DATA_PATH

xcode_last_errors

从最新的 .xcactivitylog 中提取错误(无 warning)。参数:

  • derivedDataPath(可选;未提供时默认使用 ~/Library/Developer/Xcode/DerivedData
  • sinceSeconds(可选;只考虑最近 N 秒内修改的日志)

Security Note(安全提示)

该服务器会执行 xcodebuild,而 xcodebuild 可能触发项目里的脚本/构建步骤。只在你信任的代码仓库上使用。

License

MIT