Skip to main content

arc serve

arc serve starts an AFS server over HTTP or MCP, so other processes (browsers, agents, MCP clients) can talk to your AFS instance over the network instead of the CLI.

arc serve starts an AFS server, over HTTP or MCP, so something other than the CLI itself (a browser, an agent, an MCP client) can talk to your AFS instance over the network.

Usage

bash
arc serve [options]

Global flags (see Overview): --json, --view, --instance / -i (which local ARC instance; omit for default), and --home (instance root; to pick which instance, use --instance).

  • --host <host>: host to bind (default localhost)
  • --port <port>: port to listen on (default 3000)
  • --path <path>: base path for the API (default /afs)
  • --readonly: read-only mode
  • --cors: enable CORS; pass no value for off, * for any origin, or a comma-separated allowlist
  • --transport <http|mcp-stdio|mcp-http>: transport mode (default http). mcp-http is local-dev-only by design, it has no Bearer token support
  • --token <token>: require a Bearer token on every request; overrides serve.token from config
  • --insecure-no-auth: explicitly serve without an auth token when binding to a non-loopback host. Dangerous, anyone who can reach the bound address gets full AFS access

This is different from arc service, which manages named long-running background instances. arc serve is a foreground process for a single session. See arc service.

Example

bash
$ arc serve --port 4000 --cors '*'
AFS HTTP Server starting...
Mounted providers:
  ...

Listening on: http://localhost:4000/afs
Press Ctrl+C to stop