Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/debugswift/xcodebazelmcp/architecturegit clone --depth 1 https://github.com/DebugSwift/XcodeBazelMCPWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00940 |
| Opus 5 | $0.00000 | $0.00470 |
| Sonnet 5 | $0.00000 | $0.00188 |
| Haiku 4.5 | $0.00000 | $0.00094 |
Grade A, and why
architecture scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Architecture
Overview
Bazel-first MCP server + CLI for iOS, modeled after getsentry/XcodeBuildMCP but swapping xcodebuild for bazel.
Entry Points
src/cli.ts— CLI + MCP viamcpsubcommand (~400 lines, thin dispatcher)src/doctor-cli.ts— standalone health check
Module Layout
Tools
src/tools/bazel-tools.ts— thin orchestrator (~33 lines), aggregates definitions from all handler modules and dispatchescallBazelToolto the matching handler.src/tools/helpers.ts— shared state (log captures, video recordings, device log captures) and utilities (applyDefaults,resolveSimulatorFromArgs,prependWarning,stringOrUndefined,numberOrUndefined).src/tools/streaming.ts— streaming tool logic and post-build actions, separated from main dispatch.src/tools/handlers/— 10 domain-specific files, each exportsdefinitions,canHandle(), andhandle():session.ts,build.ts,simulator.ts,device.ts,lldb.ts,macos.ts,multi-platform.ts,spm.ts,scaffold.ts,ui-automation.ts
CLI
src/cli/parsers.ts— 48 parse functions (~730 lines)src/cli/commands.ts—runUpgrade,runDaemon, etc. (~240 lines)src/cli/help.ts—printHelp(~160 lines)
Core
src/core/bazel.ts— arg builders,runBazel, label validation, query sanitizationsrc/core/simulators.ts— simctl wrapperssrc/core/workspace.ts— workspace validation, BSP
Runtime & Config
src/runtime/config.ts— env varsBAZEL_IOS_WORKSPACE,BAZEL_PATH,BAZEL_IOS_MCP_MAX_OUTPUT, plus.xcodebazelmcp/config.yamlloading (workspace or~/.xcodebazelmcp/).- Custom lightweight YAML parser: handles flat key-value and nested
profiles:blocks without external deps. Cannot handle values containing:(splits on first occurrence).
Process Execution
src/utils/process.ts—spawn(no shell) with timeout + output cap. All Bazel commands go throughrunBazelwhich trackslastCommand.runCommandStreamingis anAsyncGenerator<StreamChunk | CommandResult>— yields{ stream: 'stdout'|'stderr', data }chunks, then the finalCommandResult.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 66 lines · 0 tokens per session scan A 4f48e8336189
architecture is an agent published in the GitHub repository DebugSwift/XcodeBazelMCP (7 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 940 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
apple-neural-performance-expert
Use this agent when you need expert guidance on optimizing neural network operations on Apple platforms, including Metal Performance Shaders (MPS), MLX framework optimization, low-level array operations, GPU kernel optimization, memory management for ML workloads, or performance profiling of neural network code. This…
code-search-ast-grep
Use this agent when you need to search for specific code patterns, syntax structures, or text across files in the current directory. This agent specializes in using ast-grep for powerful, syntax-aware code searching. Examples:\n\n \nContext: An agent needs to find all function definitions that match a certain…
task-agents
The primary agent workflow — inference setup resolution, the automation switch, evidence-first execution, tool policy, and the proposal/confirmation loop.
persistence-and-sync
The agent.sqlite entity and link model, bulk-read chunking, and exactly what leaves the device.
ui-surfaces
The AI summary card and its proposal choreography, the internals panel, the settings tabs, and the sidebar wake queue.
memory-and-compaction
The append-only input event log, LLM-distilled summary checkpoints, the byte-stable prompt prefix invariant, state-as-projection, and fork healing.