Seiro MCP Docs

Seiro MCP server and visionOS tools

View the Project on GitHub karad/seiro-mcp

Runbook: Start/Stop the MCP Server

Purpose and scope

Preparation

  1. Dependency + build chain (fixed order)
    cargo run -p xtask -- preflight
    
    • Manual alternative:
      cargo fetch
      cargo check
      cargo test --all -- --nocapture
      cargo fmt -- --check
      cargo clippy -- -D warnings
      cargo build --release
      
  2. Config: copy config.example.toml to config.toml, or point MCP_CONFIG_PATH to another path.
  3. Token: set MCP_SHARED_TOKEN (16–128 chars) to match [auth].token, or pass via --token.
  4. Refactor validation helpers (optional when working on Spec 008):
    cargo run -p xtask -- loc-guard
    cargo run -p xtask -- refactor-check-docs
    cargo run -p xtask -- api-baseline
    
    • scripts/** still exist as thin wrappers around xtask.

Environment variables

Required when launching from an MCP client

Optional test/mocking helpers

These are intended for local development and tests; do not rely on them for production.

How to launch

Common options

Inspector (stdio mode)

MCP_SHARED_TOKEN=<token> \
MCP_CONFIG_PATH=$PWD/config.toml \
npx @modelcontextprotocol/inspector target/release/seiro-mcp -- --transport=stdio

Inspector (tcp mode)

MCP_SHARED_TOKEN=<token> \
MCP_CONFIG_PATH=$PWD/config.toml \
npx @modelcontextprotocol/inspector mcp connect tcp://127.0.0.1:8787 -- \
  target/release/seiro-mcp --transport=tcp --config=$PWD/config.toml

Codex CLI example

[mcp_servers.operational]
command = "/Users/<user>/sources/repos/seiro-mcp/target/release/seiro-mcp"
args = ["--transport=stdio"]
env.MCP_CONFIG_PATH = "/Users/<user>/sources/repos/seiro-mcp/config.toml"
env.MCP_SHARED_TOKEN = "<token>"
working_directory = "/Users/<user>/sources/repos/seiro-mcp"

Stop flow and exit codes

Troubleshooting

Symptom / code Resolution
CONFIG_MISSING_FIELD / CONFIG_INVALID_FIELD Check required keys in config.toml; ensure MCP_CONFIG_PATH points to the intended file.
AUTH_TOKEN_MISMATCH (42) Align MCP_SHARED_TOKEN or --token with [auth].token; spaces or short values fail.
MCP_TOKEN_REQUIRED (43) Token missing. Provide a 16–128 char ASCII/UTF-8 value.
MCP_CLIENT_REQUIRED (44) You ran cargo run directly. Launch via Inspector / Codex as a child process.
artifact_expired Call fetch_build_output within TTL; raise visionos.artifact_ttl_secs if needed and document the retrieval flow.
TCP connect fail (EADDRINUSE) Resolve port conflicts on server.port and retry.

Logs and telemetry

Manual verification

  1. Run the build chain above (Clippy after TODO is resolved).
  2. In Inspector stdio mode, confirm mcp list shows the visionOS tools.
  3. Restart Codex CLI and confirm mcp describe operational shows all four tools.
  4. In the visionOS mock flow, run validate_sandbox_policybuild_visionos_appfetch_build_output (optionally set MOCK_XCODEBUILD_BEHAVIOR).