Toolsets (MCP Bridge)
A toolset turns an external API or MCP server into tools agents can call. Manage it under Settings → Developer → MCP Bridge. Each publishes a JSON-RPC 2.0 MCP interface at /mcp/:slug, used by agent chat, Zephyr, Legend and the TUI.
flowchart LR
A[OpenAPI spec] --> I[Import]
B[MCP server] --> I
C[Lore] --> I
I --> T["/mcp/:slug - JSON-RPC 2.0"]
T --> D[Agent chat / Zephyr / Legend / TUI]
Access
Every signed-in wallet can import, limited to ten per hour. New toolsets are private; publishing makes them visible to everyone. LLM inference and Platform default require admin access.
Toolset types
| Type | Source | Tools |
|---|---|---|
| OpenAPI | OpenAPI/Swagger URL or well-known spec | Spec operations become REST calls |
MCP server — Remote URL (native_mcp) |
Remote MCP server such as Miro | Uses its tools/list directly |
MCP server — Local command (stdio_mcp) |
.mcp.json command, arguments and environment |
Runs in an isolated platform container |
| Lore | Lore knowledge base | search_lore, list_documents |
Local commands depend on the installation
stdio_mcp requires the operator's stdio runner (STDIO_RUNNER_URL), currently enabled only in development. Allowed commands: npx, uvx, node, python3, python, deno.
Import
- Open Settings → Developer → MCP Bridge and choose OpenAPI spec, MCP server or Lore.
- OpenAPI: enter a spec URL. Import saves immediately without preview. Operations requiring header/cookie parameters are skipped and listed.
- MCP: enter a remote URL, local command, or paste
.mcp.json. Authentication supports none, Bearer/API key or noninteractive OAuth refresh token. A dry-run lists tools before saving without writing anything. - Lore: choose a knowledge base.
- Credentials are stored AES-GCM encrypted and never returned in API responses.
Toolset detail
Click a card to open /settings/toolsets/:slug.
| Item | Description |
|---|---|
| Status | active / degraded / broken, from periodic health checks |
| Callable tools | Inferred tools remain pending until approved |
| Tool access | Toggle an allow-list; no tools selected means all callable |
| Re-sync | Remote MCP only: add new tools, disable vanished tools without deleting. Reimport OpenAPI specs to update. |
| Quota | Daily/monthly credit ceilings (0 = unlimited, UTC day/month) and per-call fee |
| Credentials | Update Bearer, API key or Basic credentials |
| Platform default | Admin-only; publishes and allows all agents without explicit grants |
Call history (GET /api/v1/toolsets/:slug/calls) and /metrics exist in the backend but are not shown in the web detail yet.
Agent tool permissions
AgentToolSetGrant adds a permission layer for calls on behalf of an agent:
- The owner grants entire toolsets or selected tools via agent detail Tools → Add tool / Manage tools or Card Editor.
- Grants only narrow access; they cannot expose another wallet's private toolset.
- Platform defaults need no grant, but an owner can opt an agent out with a disabled grant.
- Calls without an agent identity use visibility rules: published toolsets and the wallet's own toolsets.
/mcp/:slug and billing
- Published
initializeandtools/listare public.tools/callrequires session or API key. Limit: 120 calls per minute. - Remote MCP transport automatically detects streamable HTTP or legacy HTTP+SSE.
- Non-owner calls pay the toolset fee (default 1 ⚡). Owner calls are free and do not consume quota. Quota is checked before charging; exhausted quota prevents upstream calls and charges.
Security
| Measure | Description |
|---|---|
| Credential encryption | AES-GCM; no plaintext storage |
| SSRF guard | Blocks private/internal addresses unless the operator explicitly permits ranges with ALLOWED_TOOL_CIDRS |
| Spend gate | On-chain credit check or local ledger |
| Limits | Upstream response 256 KiB; timeout 30 seconds |
LLM inference and approval
Admins can infer tools from endpoint examples without a spec via POST /api/v1/toolsets/infer. Tools remain pending and cannot run until individually approved.
Next step
For a private API, use Embassy. For wallet-specific service registrations, use Connectors.