kosa8 mcp add
Add an MCP server from the catalog, or any server by its command, to run behind the gateway
Usage#
kosa8 mcp add ID | add NAME -- CMD [ARGS...]
kosa8 mcp add ID adds a server from the catalog (kosa8 mcp search) in one
step: it runs the publisher's package at a pinned version in a sandbox of its
own (mcp-ID) whose egress is only the hosts that server needs, or reaches the
publisher's remote endpoint through the gateway. Secrets it needs are asked for
without echo and kept in kosa8's owner-only secret store, not in the registry
file. Its tool definitions are pinned the first time kosa8 mcp serve starts it.
kosa8 mcp add NAME -- CMD registers any other server by its command. It runs
as a container inside a dedicated sandbox (mcp-NAME) when kosa8 mcp serve
starts. Its tools appear namespaced as NAME_tool, filtered by --allow-tool,
and the sandbox's egress policy bounds what it can reach.
Either way, an installed org policy is checked first: a server it does not approve is refused.
Options#
| Flag | Type | What it does | Default |
|---|---|---|---|
--allow-tool | stringArray | only expose this tool (repeatable; default all) | [] |
--dir | string | catalog: the directory a file-serving server (filesystem, git) may see, shared read-only | — |
--egress | string | sandbox network policy: any or deny (default: the org policy's default_egress when it sets one, else any) | — |
--egress-allow | stringArray | permit outbound traffic only to these hosts or *.domain wildcards (repeatable) | [] |
-e, --env | stringArray | KEY=VALUE for the server process (repeatable; use for secrets) | [] |
--image | string | container image the server runs in | alpine |
--name | string | catalog: register under this name instead of the id | — |
--secrets-from-env | bool | catalog: take each secret from the variable of the same name in this shell instead of asking | — |
--writable | bool | catalog: share --dir read-write | — |
Example#
kosa8 mcp add github kosa8 mcp add filesystem --dir ~/code/project kosa8 mcp add playwright kosa8 mcp add mytool --image node:22-alpine -- npx -y some-mcp-server@1.2.3