ozy

module
v0.1.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: Apache-2.0

README

Ozy

Ozy

The local agent tool broker.

My name is Ozy, Thing of Things. Look on my MCP setup, ye Agent, and vibe! — Ozymandias, probably.


License Go CI Beta MCP Evals


What is Ozy?

Ozy is a local agent tool broker. Configure your downstream MCP servers once; Ozy discovers and indexes their tools into a persistent, searchable catalog. Agents connect to Ozy and use a small, stable interface — findTool, describeTool, callTool — to discover and invoke the right downstream tool without loading the entire downstream tool universe into context.

Why?

Connecting an agent to many MCP servers usually means stuffing every tool description into the model's context. That does not scale, and it does not degrade gracefully when a server is offline.

Ozy fixes that by acting as a single, brokered entry point:

  • One stable agent interface — three tools, always, regardless of how many downstream servers you wire up.
  • Persistent catalog — tools are indexed once and queried offline; no live re-discovery on every agent turn.
  • Hybrid search — lexical + optional semantic ranking fused with Reciprocal Rank Fusion. Semantic falls back to lexical gracefully if the embedding sidecar is unavailable.
  • Live-gated invocationcallTool connects to a single downstream server at call time; the catalog is served even when servers are down.

Quick start

  1. Install Ozy:
go install github.com/rokasklive/ozy/cmd/ozy@latest
  1. Scaffold the default config:
ozy init
  1. Add Ozy to your opencode MCP config:
{
  "mcp": {
    "ozy": {
      "type": "local",
      "command": ["ozy", "mcp"]
    }
  }
}
  1. Add your downstream MCP servers to ~/.config/ozy/ozy.jsonc, keeping the same opencode-compatible mcp shape.

  2. Build the catalog:

ozy index
  1. Verify health:
ozy doctor

ozy doctor verifies config, catalog, and embedding-sidecar health. Missing infrastructure such as uvx usually surfaces there with a repair-oriented error.

To remove Ozy, run ozy uninstall (or go run github.com/rokasklive/ozy/cmd/ozy-install@latest uninstall). It is plan-first and conservative — your config and downstream MCP definitions are kept unless you pass --purge.

Usage

ozy init                       # scaffold a starter config
ozy mcp                        # serve to your agent — self-provisions + indexes + embeds
ozy search "search confluence wiki"   # find a tool (provisions on demand)
ozy describe atlassian.confluence_search
ozy call  atlassian.confluence_search --json '{"query":"crm migration","limit":5}'
ozy list                       # list indexed tools
ozy index                      # (optional) force a catalog + embedding refresh
ozy doctor                     # (optional) diagnose config, env, catalog, embedding health
ozy eval run                   # run the eval suite over the committed corpus
ozy uninstall                  # remove Ozy (plan-first; keeps config unless --purge)

For a plan-first bootstrap installer, run go run github.com/rokasklive/ozy/cmd/ozy-install@latest.

Every command accepts a global --format flag: human (default), json (single machine-readable document for agents and evals), or concise.

Configuration

Ozy reads a single JSONC config at one of:

  1. --config <path> or $OZY_CONFIG
  2. $XDG_CONFIG_HOME/ozy/ozy.jsonc (or ~/.config/ozy/ozy.jsonc)
  3. %AppData%\ozy\ozy.jsonc on Windows

Run ozy init to scaffold a fully commented starter at the default path. The shape is opencode-compatible, so existing mcp.json entries can be copied in unchanged.

{
  "mcp": {
    "filesystem": {
      "type": "local",
      "command": ["filesystem-mcp", "--root", "."],
      "environment": { "OZY_ROOT": "{env:OZY_ROOT}" },
      "enabled": true,
      "timeout": 5000,        // discovery/connect budget (ms) used when indexing
      "callTimeout": 60000    // per-callTool budget (ms): connect + execute
    },
    "atlassian": {
      "type": "remote",
      "url": "https://mcp.example.com/v1/mcp",
      "headers": { "Authorization": "Bearer {env:ATLASSIAN_MCP_TOKEN}" },
      "oauth": false,
      "enabled": true
    }
  },
  "search":     { "lexical": { "enabled": true }, "semantic": { "enabled": true } },
  "embedding":  { "provider": "python-local", "vectorBackend": "turbovec" },
  "budgets":    { "findTool": { "maxResults": 5 }, "callTool": { "maxResultBytes": 65536 } },
  "cache":      { "enabled": true, "ttlSeconds": 300, "maxEntries": 1024 }
}

Secrets belong in {env:NAME} references — ozy doctor reports unresolved variables by name and never prints resolved secret values. The catalog is stored at $XDG_STATE_HOME/ozy/catalog.json (override with $OZY_CATALOG for tests).

Semantic search is on by default. The Python embedding sidecar is auto-provisioned on demand via uv (with a python -m venv + pip fallback); if it is unavailable, Ozy falls back to lexical-only findTool and surfaces the degraded mode rather than failing.

The three tools

Ozy exposes exactly three stable MCP tools (see SPEC.md §9):

Tool Purpose
findTool Find the best known tool for a capability query — a decision, not just a list.
describeTool Return the exact schema and usage guidance for one tool (catalog-backed).
callTool Invoke a downstream tool through Ozy with budget-bounded results.

The CLI mirrors these operations through the same in-process broker, so the CLI and MCP paths cannot drift.

Documentation

  • SPEC.md — the living product specification. Start here for the full architecture, contract, and design.
  • evals/BENCHMARKS.md — public discovery / invocation scoreboard over the committed corpus.
  • examples/ozy.jsonc — annotated starter config.
  • CONTRIBUTING.md — build, test, lint, and how to contribute.

Acknowledgments

ContextSpy by RimantasZ — used in the bench harness to intercept and measure model API calls during scenario benchmarking.

License

Apache License 2.0.

Directories

Path Synopsis
cmd
ozy command
Command ozy is the single Ozy binary: a local agent tool broker that discovers downstream MCP tools into a searchable catalog and brokers their invocation through a small, stable agent interface (see SPEC.md).
Command ozy is the single Ozy binary: a local agent tool broker that discovers downstream MCP tools into a searchable catalog and brokers their invocation through a small, stable agent interface (see SPEC.md).
ozy-bench command
Command ozy-bench is the scenario benchmark harness for Ozy.
Command ozy-bench is the scenario benchmark harness for Ozy.
ozy-install command
Command ozy-install is the one-command bootstrap for Ozy.
Command ozy-install is the one-command bootstrap for Ozy.
Package evals embeds the committed eval corpus (the synthetic downstream MCP catalog, the labeled gold/scenario sets, and the gate thresholds) so the eval harness can load it regardless of the process working directory.
Package evals embeds the committed eval corpus (the synthetic downstream MCP catalog, the labeled gold/scenario sets, and the gate thresholds) so the eval harness can load it regardless of the process working directory.
internal
bench
Package bench implements the scenario benchmark harness: a controlled, local-first, reproducible comparison of direct-MCP vs Ozy-brokered agent performance against a frozen incident scenario.
Package bench implements the scenario benchmark harness: a controlled, local-first, reproducible comparison of direct-MCP vs Ozy-brokered agent performance against a frozen incident scenario.
broker
Package broker defines the single in-process seam through which every adapter performs Ozy's findTool, describeTool, and callTool operations.
Package broker defines the single in-process seam through which every adapter performs Ozy's findTool, describeTool, and callTool operations.
catalog
Package catalog defines Ozy's persistent capability catalog seam.
Package catalog defines Ozy's persistent capability catalog seam.
cli
Package cli implements the `ozy` command surface (SPEC.md §15).
Package cli implements the `ozy` command surface (SPEC.md §15).
config
Package config loads, validates, and redacts Ozy's single configuration file (SPEC.md §11).
Package config loads, validates, and redacts Ozy's single configuration file (SPEC.md §11).
contract
Package contract defines Ozy's agent-facing response and error models.
Package contract defines Ozy's agent-facing response and error models.
daemon
Package daemon hosts Ozy's runtime: it owns configuration, the catalog store, and the in-process broker that every adapter shares (SPEC.md §6.1).
Package daemon hosts Ozy's runtime: it owns configuration, the catalog store, and the in-process broker that every adapter shares (SPEC.md §6.1).
downstream
Package downstream connects to configured downstream MCP servers and returns initialized client sessions isolated per server.
Package downstream connects to configured downstream MCP servers and returns initialized client sessions isolated per server.
eval
Package eval is Ozy's evaluation harness.
Package eval is Ozy's evaluation harness.
index
Package index discovers tools from connected downstream servers and persists normalized catalog entries.
Package index discovers tools from connected downstream servers and persists normalized catalog entries.
installer
Package installer drives Ozy's setup and teardown as resumable, idempotent step state machines.
Package installer drives Ozy's setup and teardown as resumable, idempotent step state machines.
mcp
Package mcp adapts Ozy's broker to the agent-facing MCP surface.
Package mcp adapts Ozy's broker to the agent-facing MCP surface.
paths
Package paths resolves every Ozy install location behind one abstraction so the installer and uninstaller never hardcode directories.
Package paths resolves every Ozy install location behind one abstraction so the installer and uninstaller never hardcode directories.
render
Package render writes typed broker results to an io.Writer in the format the caller requested: human-readable (default), a single JSON document for agents and evals, or a terse concise mode (SPEC.md §15).
Package render writes typed broker results to an io.Writer in the format the caller requested: human-readable (default), a single JSON document for agents and evals, or a terse concise mode (SPEC.md §15).
schema
Package schema validates downstream-tool arguments against the subset of JSON Schema Ozy catalogs.
Package schema validates downstream-tool arguments against the subset of JSON Schema Ozy catalogs.
search
Package search ranks cataloged tools for a capability query with a lexical baseline and an optional semantic signal (SPEC.md §10).
Package search ranks cataloged tools for a capability query with a lexical baseline and an optional semantic signal (SPEC.md §10).
sidecar
Package sidecar is the Go client for Ozy's optional Python embedding sidecar.
Package sidecar is the Go client for Ozy's optional Python embedding sidecar.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL