MCP and the library
MCP in Azhi
Section titled “MCP in Azhi”| Mode | State |
|---|---|
| Local stdio MCP servers called through the gateway, with ledger and policy | Built |
Admin-managed remote Streamable HTTP connections (azhi mcp add, OAuth found automatically from the URL), tool discovery, registration | Built |
| The gateway bridged into harnesses over MCP, so OpenCode and the Claude Agent SDK use governed tools | Built |
| Health, latency and cost metadata per tool | Partly built |
| Workflows exposed as MCP tools | Vision |
npx azhi mcp add --name wiki --url https://mcp.example.com/mcp --auth oauthnpx azhi mcp login <connection> # sign in again (prints the authorization URL)npx azhi mcp discover <connection> # list the tools it exposesnpx azhi mcp register-tool <connection> <tool> # register one; id, description and schema come from the serverConnecting a server that needs sign-in
Section titled “Connecting a server that needs sign-in”Give Azhi the name, the URL and --auth oauth. Azhi reads the server’s published OAuth metadata (RFC 9728 and
RFC 8414), registers itself as a client (RFC 7591, with Azhi’s callback as the redirect URI), sends you to the
server’s sign-in page and finishes the connection when you approve. The CLI waits and then reports how many tools
are available; the web form (Tools, Add MCP server by URL) does the same and lists the tools when it is done.
The Connections page shows each connection’s status with a Reconnect button. The builder chat can propose the
connection too.
Some servers cannot register clients. Then creation fails and the message names the exact redirect URI to register;
register a client by hand and pass --client-id (and --client-secret, --authorization-url, --token-url,
--scopes if the server does not publish them), or use Advanced: use my own OAuth client in the web form.
Anything you enter overrides what the server publishes. Every discovered address goes through the same egress check
as the MCP URL, and Azhi sends the MCP URL as the OAuth resource on sign-in, token exchange and refresh. A sign-in
link expires after 10 minutes.
The Library (portable assets)
Section titled “The Library (portable assets)”The Library stores reusable MCP servers, agents, skills and commands as versioned definitions. Publish a version before attaching it to a workflow; the workflow records the exact published version, so later edits cannot silently change it.
Discover
Section titled “Discover”| Kind | Source |
|---|---|
| MCP servers | The official MCP Registry. Hosted servers become remote definitions; npm, PyPI and Docker packages become local ones |
| Agents, commands, skills | GitHub plugin marketplaces: any repo with .claude-plugin/marketplace.json. Built in: anthropics/skills, anthropics/claude-plugins-official, wshobson/agents. Admins can add others or turn it off |
Preview shows exactly what an import would store, the environment variables it needs, and what was not carried
over. Import as draft re-fetches the item on the server (the browser never supplies the definition) and
records the source URL and a SHA-256 in the definition’s provenance.
Export to harnesses
Section titled “Export to harnesses”Each asset can be exported for OpenCode (opencode.jsonc, .opencode/...) and Claude Code (.mcp.json,
.claude/agents, .claude/skills, .claude/commands). A workflow page can download everything attached to it
as a bundle.