UXC
Universal X-Protocol Call
UXC is a schema-driven, multi-protocol RPC execution runtime.
It turns remote, schema-exposed services into executable command-line capabilities — without SDKs, code generation, or preconfigured server aliases.
If a service exposes a machine-readable interface, UXC can discover it, understand it, and execute it.
Vision
Modern systems increasingly expose machine-readable schemas:
- OpenAPI (
/openapi.json) - gRPC reflection
- MCP (Model Context Protocol)
- GraphQL introspection
- JSON-RPC (OpenRPC discovery)
- WSDL (SOAP)
Yet interacting with them still requires:
- Static client generation
- SDK installation
- Custom configuration files
- Or embedding tool definitions into AI prompts
UXC removes that friction.
It provides a universal execution layer that dynamically transforms remote schema definitions into immediately usable commands.
Schema becomes execution.
Core Principles
1. URL-First, Not Config-First
UXC does not require registering server aliases.
Any compliant endpoint can be called directly.
For common HTTP targets, UXC infers https:// when the scheme is omitted.
This makes UXC safe to use inside:
- Automation scripts
- CI pipelines
- AI skills and agents
- Sandboxed execution environments
2. Schema-Driven Execution
UXC automatically:
- Detects protocol type
- Retrieves remote schema
- Generates contextual help
- Validates arguments
- Executes calls
- Returns structured JSON by default
No manual client definitions required.
3. Multi-Protocol by Design
UXC supports multiple schema-exposing protocols through adapters:
- OpenAPI / Swagger
- gRPC (with reflection)
- MCP
- GraphQL
- JSON-RPC (with OpenRPC)
- Extensible adapter system
The CLI interface remains consistent across protocols.
4. Deterministic Machine Output
uxc ... outputs a stable JSON envelope by default:
Command failures are structured and predictable:
Use --text (or --format text) for human-readable output.
Global discovery commands are also JSON-first:
Use --text when you want CLI-style help text:
If an operation ID conflicts with a CLI keyword (for example help/list), use explicit call:
This makes UXC ideal for:
- Shell pipelines
- Agent runtimes
- Skill systems
- Infrastructure automation
Host Shortcut
Create a local shortcut command bound to a host:
Remove the shortcut by deleting the generated file:
# macOS/Linux
# Windows (PowerShell)
Tip: prefer namespaced shortcuts like acme-petcli to reduce naming conflicts.
On Windows, uxc link creates .cmd launchers and defaults to $HOME\\.uxc\\bin.
Cache Management
# View cache statistics
# Clear cache for specific endpoint
# Clear all cache
# Disable cache for this operation
# Use custom TTL (in seconds)
Debugging and Logging
UXC uses structured logging with the tracing crate. By default, only warnings and errors are displayed.
# Default: warnings and errors only
# Enable info logs (HTTP requests, responses, etc.)
RUST_LOG=info
# Enable debug logs (detailed debugging information)
RUST_LOG=debug
# Enable trace logs (maximum verbosity)
RUST_LOG=trace
# Enable logs for specific modules only
RUST_LOG=uxc::adapters::openapi=debug
Log Levels:
error- Critical failures that prevent operation completionwarn- [Default] Non-critical issues and warningsinfo- Informational messages (HTTP requests, protocol detection, etc.)debug- Detailed debugging informationtrace- Extremely verbose tracing information
Logs are written to stderr to avoid interfering with JSON output on stdout.
Installation
Homebrew (macOS/Linux)
Install Script (macOS/Linux)
|
If you prefer to review before execution:
Install a specific version:
|
Cargo
From Source
Codex Skill (Reusable by Other Skills)
Install the built-in uxc skill from this repository:
After installation, restart Codex to load the skill.
Example Usage
Most HTTP examples omit the scheme for brevity. Add https:// explicitly if you prefer strictness.
Operation ID Conventions
UXC uses protocol-native, machine-friendly operation_id values:
- OpenAPI:
method:/path(e.g.get:/users/{id},post:/pet) - gRPC:
Service/Method - GraphQL:
query/viewer,mutation/addStar,subscription/onEvent - MCP: tool name (e.g.
ask_question) - JSON-RPC: method name (e.g.
eth_getBalance,net_version)
OpenAPI / REST APIs
# List available operations
# Schema-separated service: runtime endpoint and schema URL are different
# Get operation help
# Execute with parameters
# Execute with JSON input
gRPC Services
# List all services via reflection
# Call a unary RPC
Note: gRPC unary invocation uses the grpcurl binary at runtime.
GraphQL APIs
# List available queries/mutations/subscriptions
# Execute a query
# Execute with parameters
MCP (Model Context Protocol)
# HTTP transport (recommended for production)
# If a tool name conflicts with CLI subcommands, use explicit call
# stdio transport (for local development)
JSON-RPC (OpenRPC)
# Discover methods (requires rpc.discover or openrpc.json)
# Describe one method
# Execute a method
Note: JSON-RPC support is OpenRPC-driven for predictable list/describe discovery.
Public Test Endpoints (No API Key)
These endpoints are useful for protocol availability checks without API keys. Verified on 2026-02-25.
OpenAPI
- Endpoint:
https://petstore3.swagger.io/api/v3 - Verify schema:
|
GraphQL
- Endpoint:
https://countries.trevorblades.com/ - Verify introspection:
|
gRPC (Server Reflection)
- Endpoint (plaintext):
grpcb.in:9000 - Endpoint (TLS):
grpcb.in:9001 - Verify reflection:
MCP (HTTP)
- Endpoint:
https://mcp.deepwiki.com/mcp - Verify
initialize(DeepWiki uses streamable HTTP/SSE response):
Note: this endpoint is publicly reachable without an API key for basic calls. Some MCP clients that only expect JSON (not SSE) may need transport updates.
MCP (stdio, local)
- Command:
npx -y @modelcontextprotocol/server-filesystem /tmp - This is useful as a local no-key MCP baseline.
Automatic Protocol Detection
UXC determines the protocol via lightweight probing:
- Attempt MCP stdio/HTTP discovery
- Attempt GraphQL introspection
- Check OpenAPI schema sources:
--schema-urloverride- user/builtin schema mappings
- default well-known OpenAPI endpoints (
/openapi.json,/swagger.json, etc.)
- Attempt JSON-RPC OpenRPC discovery
- Attempt gRPC reflection
- Fallback or fail gracefully
Each protocol is handled by a dedicated adapter.
OpenAPI Schema Mapping
For services where the OpenAPI document is hosted separately from the runtime endpoint
(for example api.github.com), UXC supports:
- Explicit override via
--schema-url - Builtin mappings for known services
- User mappings in
~/.uxc/schema_mappings.json
Example user mapping file:
For tests or custom environments, the mapping file path can be overridden via:
UXC_SCHEMA_MAPPINGS_FILE=/path/to/schema_mappings.json.
Architecture Overview
User / Skill / Agent
↓
UXC CLI
↓
Protocol Detector
↓
Adapter Layer
├── OpenAPI Adapter
├── gRPC Adapter
├── MCP Adapter
├── GraphQL Adapter
├── JSON-RPC Adapter
↓
Remote Endpoint
Optional:
UXCd (local daemon)
- Connection pooling
- Schema caching
- Authentication management
- Rate limiting
The CLI works independently, but can transparently use the daemon for performance and stability.
Target Use Cases
AI Agents & Skills
- Dynamically call remote capabilities
- Avoid injecting large tool schemas into context
- Maintain deterministic execution boundaries
- Reuse the repository skill at
skills/uxcas the shared API execution layer
Infrastructure & DevOps
- Replace SDK generation with runtime discovery
- Interact with heterogeneous services via a unified interface
- Simplify testing across protocols
Execution Sandboxes
- Provide a controlled, auditable capability layer
- Enforce allowlists and rate limits
- Record structured invocation logs
Non-Goals
UXC is not:
- A code generator
- An SDK replacement
- An API gateway
- A reverse proxy
It is an execution interface.
Why Universal X-Protocol Call?
Because infrastructure is no longer protocol-bound.
Because services describe themselves.
Because execution should be dynamic.
UXC makes remote schema executable.
Auth Model
UXC uses two auth resources:
- Credentials: secret material and auth type
- Bindings: endpoint matching rules (
scheme+host+ optionalpath_prefix) pointing to a credential
Examples:
# Create a bearer credential (literal secret)
# Or reference an environment variable
# Bind endpoint to a credential (auto-match at runtime)
OAuth For MCP HTTP
uxc now supports OAuth for MCP HTTP endpoints with login, token persistence, refresh, and retry.
Quick examples:
# Device Code flow
# Client Credentials flow
# Authorization Code + PKCE flow (for providers like Notion MCP)
--client-id is optional for authorization_code. If omitted, uxc will try dynamic client
registration from provider metadata.
Manual management commands:
OAuth runtime errors are emitted as structured codes:
OAUTH_REQUIREDOAUTH_DISCOVERY_FAILEDOAUTH_TOKEN_EXCHANGE_FAILEDOAUTH_REFRESH_FAILEDOAUTH_SCOPE_INSUFFICIENT
See docs/oauth-mcp-http.md for details.
Development Status
Current Version: v0.1.0 (Alpha)
Supported Protocols:
- ✅ OpenAPI 3.x
- ✅ gRPC (with Server Reflection Protocol)
- ✅ GraphQL (with Introspection)
- ✅ MCP (Model Context Protocol) - HTTP & stdio transports
- ✅ JSON-RPC (with OpenRPC discovery)
Platforms:
- ✅ Linux (x86_64)
- ✅ macOS (x86_64, ARM64)
- ✅ Windows (x86_64)
Known Limitations:
- gRPC currently supports unary invocation only
- gRPC runtime calls require
grpcurlto be installed - No connection pooling yet
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.
Development Requirements:
- All code must be formatted with
cargo fmt - No clippy warnings allowed
- Minimum 65% code coverage required
- All tests must pass
See CONTRIBUTING.md for detailed development workflow, testing guidelines, and coverage instructions.
Areas of Interest:
- Connection pooling
- Authentication profiles
- Additional protocol adapters (SOAP/WSDL, Thrift, etc.)
- Performance optimizations
- UXCd daemon
- Capability allowlists
- Audit logging
License
MIT License - see LICENSE file for details