actx add
actx add
Section titled “actx add”Register an MCP backend server that agents can use for tool discovery and execution.
actx add <server> [options]Arguments
Section titled “Arguments”| Argument | Required | Description |
|---|---|---|
server | ✅ | Unique identifier for the backend (e.g., github, filesystem) |
Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
--command <cmd> | — | Command to spawn the MCP server process |
--roles <roles> | "default" | Comma-separated role tags for tool scoping |
--transport <type> | "stdio" | Transport type: stdio, sse, or http |
What It Does
Section titled “What It Does”- Reads
.context/actx.yaml - Adds or updates the backend entry in the
backendsarray - Writes the updated config back to
actx.yaml
Examples
Section titled “Examples”Register a GitHub backend
Section titled “Register a GitHub backend”actx add github \ --command "npx -y @modelcontextprotocol/server-github" \ --roles "code,issues"Register a filesystem backend
Section titled “Register a filesystem backend”actx add filesystem \ --command "npx -y @modelcontextprotocol/server-filesystem /workspace" \ --roles "files"Register with SSE transport
Section titled “Register with SSE transport”actx add remote-api \ --command "node api-server.js" \ --transport sse \ --roles "api"Config Output
Section titled “Config Output”After actx add github --command "npx -y @modelcontextprotocol/server-github" --roles "code,issues":
backends: - id: github cmd: "npx -y @modelcontextprotocol/server-github" roles: - code - issues transport: stdio- If a backend with the same ID already exists, it’s replaced (upsert behavior)
- Backends are lazy-spawned — the process starts on the first tool query, not at gateway boot
- Tools are namespaced under the backend ID:
github.issues.create,filesystem.read_file
See Also
Section titled “See Also”- actx start — boot the gateway with registered backends
- Adding MCP Backends — detailed guide