sxmc
One Rust binary for turning agent-facing interfaces into practical tools: serve skills over MCP, use MCP servers from the terminal, run APIs as CLIs, and generate startup-ready AI surfaces from existing CLIs.
Why It Exists
Without sxmc, the same capability usually gets rebuilt several times:
- a skill adapter for one agent
- a JSON-RPC script for one MCP server
- a thin shell wrapper for one API
- per-host startup docs and config files for AI tools
sxmc collapses that into one installable binary with four core flows:
Skills -> MCP server
MCP server -> CLI
API -> CLI
CLI -> AI startup surfaces
That means less glue code, narrower MCP discovery, fewer retry turns, and much less repeated setup across Claude Code, Cursor, Gemini CLI, Copilot, Codex-style tools, and generic MCP clients.
Install
Other channels:
- GitHub Releases: prebuilt archives with checksums
- npm wrapper:
packaging/npm - Homebrew formula:
packaging/homebrew/sxmc.rb
Quick Start
Serve local skills over MCP:
Inspect and call any MCP server from the terminal:
Use a baked, token-efficient MCP workflow:
Run an API as a CLI:
Turn a CLI into startup-facing AI artifacts:
Recent inspection hardening:
sxmc inspect cli ghnow recovers top-level flags as well as grouped subcommandssxmc inspect cli rustuppreserves global options like--verbose,--quiet,--help, and--versionsxmc inspect cli python3avoids treating environment variables as subcommandssxmc inspect cli node --depth 1keeps theinspectsubcommand while using a cleaner runtime summary
Generate shell completions:
Practical Wins
sxmc stdio "<cmd>" --listreplaces ad hoc JSON-RPC client scripts for MCP discovery.sxmc mcp grep "file"searches across baked MCP servers, which is hard to reproduce cleanly with one-off tooling.sxmc scancatches hidden Unicode, dangerous permissions, and prompt-injection patterns that plaingrepmisses.sxmc inspect cli ...plussxmc init ai ...turns per-host AI setup into generated, reviewable artifacts.
The current validation docs capture the real-world comparison set, token/turn estimates, and hidden retry-cost analysis.
Command Overview
sxmc serve: expose skills as stdio or HTTP MCPsxmc skills: list, inspect, run, and generate skillssxmc stdio/sxmc http: raw MCP bridge and debugging layersxmc mcp: baked daily-use MCP workflowsxmc api/sxmc spec/sxmc graphql: API-to-CLI bridgesxmc scan: security scanning for skills and MCP surfacessxmc inspect/sxmc init/sxmc scaffold: CLI-to-AI inspection and scaffoldingsxmc bake: saved connectionssxmc completions: shell completion generation
Safety and Reliability
- preview-first AI artifact generation
- low-confidence CLI profiles are blocked from startup-doc generation unless explicitly overridden
- managed markdown/TOML blocks instead of wholesale overwrites
- recursive CLI inspection with
sxmc inspect cli --depth 1 - cleanup support with
sxmc init ai --remove - CLI inspection now supplements sparse help output with
manpages without clobbering richer--helpsurfaces - atomic bake persistence
- baked stdio configs can pin a base directory for portable relative paths
- configurable timeouts for networked commands
- HTTP MCP guardrails for max concurrency and request body size
- stateful MCP workflows supported through
sxmc mcp session
Docs
- Usage: install, daily workflows, MCP usage, CLI-to-AI, completions
- Architecture: module map, data flow, and design boundaries
- Demo: short scripted demo path for terminal recordings
- Operations: hosting, release process, branch policy, distribution
- Validation: tests, smoke checks, compatibility, token/turn findings
- Product Contract: explicit support boundary
- CLI Surfaces: CLI-to-AI model, profile contract, write policy
- CLI to AI Compatibility: host-by-host coverage matrix
Development
Use the validation flow before release:
License
MIT