UXC
Universal X-Protocol CLI
English | 简体中文
UXC is a universal X-protocol CLI that lets you discover and invoke OpenAPI, gRPC, GraphQL, MCP, and JSON-RPC interfaces directly from a URL.
It turns remote schema-exposed interfaces into executable command-line operations without SDKs, code generation, or endpoint pre-registration.
What Is UXC
Modern services increasingly expose machine-readable interface metadata. UXC treats those schemas as runtime execution contracts:
- Discover operations from a host
- Inspect operation inputs/outputs
- Execute operations with structured input
- Return deterministic JSON envelopes by default
If a target can describe itself, UXC can usually call it.
Why It Exists
Teams and agents often need to interact with many protocol styles: OpenAPI, GraphQL, gRPC, MCP, and JSON-RPC.
Traditional workflows create repeated overhead:
- language-specific SDK setup
- generated clients that drift from server reality
- one-off wrappers for each endpoint
- large embedded tool schemas in agent prompts
UXC provides one URL-first CLI contract across protocols.
Why UXC Works Well With Skills
UXC is a practical fit for skill-based agents:
- On-demand discovery and invocation, without preloading large MCP tool definitions into prompt context
- Portable by endpoint URL and auth binding, not tied to per-user local MCP server names
- Reusable as one shared calling interface across many skills
Core Capabilities
- URL-first usage: call endpoints directly, no server alias required
- Multi-protocol detection and adapter routing
- Schema-driven operation discovery (
<host> -h,<host> <operation_id> -h) - Structured invocation (positional JSON, key-value args)
- Deterministic JSON envelopes for automation and agents
- Auth model with reusable credentials and endpoint bindings
- Host shortcut commands via
uxc link - Link-level default OpenAPI schema persistence via
uxc link --schema-url - Stdio child-process auth injection via
--inject-env NAME={{secret}}
Supported protocols:
- OpenAPI / Swagger
- gRPC (server reflection)
- GraphQL (introspection)
- MCP (HTTP and stdio)
- JSON-RPC (OpenRPC-based discovery)
Architecture Snapshot
UXC keeps protocol diversity behind one execution contract:
flowchart LR
A[User / Skill / Agent] --> B[UXC CLI]
B --> C[Command Router]
C --> D[Protocol Detector]
D --> E[Adapter Layer]
E --> E1[OpenAPI Adapter]
E --> E2[gRPC Adapter]
E --> E3[GraphQL Adapter]
E --> E4[MCP Adapter]
E --> E5[JSON-RPC Adapter]
C --> F[Auth Resolver]
F --> F1[Credential Sources<br/>literal / env / 1Password]
C --> G[Schema + Response Cache]
C --> H[JSON Envelope Output]
E1 --> R[Remote Endpoints]
E2 --> R
E3 --> R
E5 --> R
E4 --> M1[MCP HTTP Endpoint]
E4 --> M2[MCP stdio via Daemon]
M2 --> D1[Daemon Process Registry]
D1 --> D2[Reused stdio MCP Process]
This design keeps invocation UX stable while allowing protocol-specific internals.
Target Use Cases
- AI agents and skills that need deterministic remote tool execution
- CI/CD and automation jobs that need schema-driven calls without SDK setup
- Cross-protocol integration testing with one command contract
- Controlled runtime environments where JSON envelopes and predictable errors matter
Non-Goals
UXC is not:
- a code generator
- an SDK framework
- an API gateway or reverse proxy
UXC is an execution interface for schema-exposed remote capabilities.
Install
Homebrew (macOS/Linux)
Install Script (macOS/Linux)
|
Review before running:
Install a specific version:
|
Windows note: native Windows is no longer supported; run UXC through WSL.
Cargo
From Source
Quickstart (3 Minutes)
Most HTTP examples omit the scheme for brevity.
For public hosts, UXC infers https:// when omitted.
- Discover operations:
- Inspect operation schema:
- Execute with structured input:
Use only these endpoint forms:
uxc <host> -huxc <host> <operation_id> -huxc <host> <operation_id> key=valueoruxc <host> <operation_id> '{...}'
Protocol Examples (One Each)
Operation ID conventions:
- OpenAPI:
method:/path(example:get:/users/{id}) - gRPC:
Service/Method - GraphQL:
query/viewer,mutation/createUser - MCP: tool name (example:
ask_question) - JSON-RPC: method name (example:
eth_getBalance)
OpenAPI
For schema-separated services, you can override schema source:
gRPC
Note: gRPC unary runtime invocation requires grpcurl on PATH.
GraphQL
# Prefer positional JSON for non-string object arguments
# Optional: control GraphQL return fields via reserved _select argument
MCP
MCP (stdio)
UXC can also invoke MCP servers started as local processes over stdio. For stdio endpoints, the "URL" is a quoted command line.
Playwright MCP (stdio) example:
# One-off discovery
# Create a stable command name for repeated use (recommended)
# Inspect an operation before calling it
# Call operations with key=value args
JSON-RPC
Skills
UXC provides one canonical skill plus scenario-specific official wrappers.
Use uxc skill as the shared execution layer, and add wrappers when they fit your workflow.
| Skill | Purpose | Path |
|---|---|---|
uxc |
Canonical schema discovery and multi-protocol execution layer | skills/uxc/SKILL.md |
deepwiki-mcp-skill |
Query repository documentation and ask codebase questions | skills/deepwiki-mcp-skill/SKILL.md |
context7-mcp-skill |
Query up-to-date library documentation/examples over MCP | skills/context7-mcp-skill/SKILL.md |
okx-mcp-skill |
Query OKX MCP for token, market, wallet, and swap workflows | skills/okx-mcp-skill/SKILL.md |
dune-mcp-skill |
Discover blockchain tables, run SQL, fetch results, and build charts via Dune MCP | skills/dune-mcp-skill/SKILL.md |
thegraph-mcp-skill |
Discover subgraphs, inspect schemas, and execute GraphQL via The Graph Subgraph MCP bridge | skills/thegraph-mcp-skill/SKILL.md |
thegraph-token-mcp-skill |
Query token, wallet, transfer, holder, and market data via The Graph Token API MCP | skills/thegraph-token-mcp-skill/SKILL.md |
etherscan-mcp-skill |
Investigate addresses, token holders, and contracts via Etherscan MCP | skills/etherscan-mcp-skill/SKILL.md |
notion-mcp-skill |
Operate Notion MCP workflows with OAuth-aware guidance | skills/notion-mcp-skill/SKILL.md |
discord-openapi-skill |
Operate Discord REST API via UXC + OpenAPI schema mapping | skills/discord-openapi-skill/SKILL.md |
playwright-mcp-skill |
Run @playwright/mcp over MCP stdio through uxc (browser automation) |
skills/playwright-mcp-skill/SKILL.md |
Install Skills
Install from this repository using npx skills:
# Install canonical base skill for Codex
# Install wrappers as needed
Install published skills from ClawHub:
# Install into ~/.openclaw/skills/<slug>
See docs/skills.md for install methods and maintenance rules.
Output and Help Conventions
UXC is JSON-first by default.
Use --text (or --format text) when you want human-readable CLI output.
Examples:
Note: In endpoint routing, help is treated as a literal operation name, not a help alias.
Success envelope shape:
For MCP tools/call, data may include content, optional structuredContent, and optional isError.
Failure envelope shape:
Auth (Credentials + Bindings)
UXC authentication has two resources:
- Credentials: secret material and auth type
- Bindings: endpoint matching rules that select a credential
Example:
# api_key supports configurable header names and templates
For --secret-op, secret resolution happens at request runtime through daemon execution.
Ensure daemon has usable 1Password auth context (for example OP_SERVICE_ACCOUNT_TOKEN), and restart daemon after env changes.
OAuth for MCP HTTP is supported (device code, client credentials, authorization code + PKCE).
See docs/oauth-mcp-http.md for full workflows.
Docs Map
- Extended quickstart and protocol walkthroughs:
docs/quickstart.md - Public no-key endpoints for protocol checks:
docs/public-endpoints.md - Logging and troubleshooting with
RUST_LOG:docs/logging.md - Auth credential secret sources (
literal/env/op):docs/auth-secret-sources.md - Run daemon with service managers (
systemd/launchd):docs/daemon-service.md - OpenAPI schema mapping and
--schema-url:docs/schema-mapping.md - Skills overview and install/maintenance guidance:
docs/skills.md - Release process:
docs/release.md
Contributing
Contributions are welcome.
- Development workflow and quality bar:
CONTRIBUTING.md - CI and release flows: GitHub Actions
License
MIT License - see LICENSE.