Anytype-cli REST API — port 31012 never opens, docs appear incorrect

Following the API, Developer Portal & MCP launch, I’ve been trying to run anytype-cli headlessly on a cloud host (Railway) and use the REST API with the official @anyproto/anytype-mcp server. I wanted to share what I found in case others are hitting the same wall, and to get some clarity from the team.

The docs say this is a CLI feature:

“HTTP API — Exposes the full Anytype API at http://127.0.0.1:31012”

After finding port 31012 unresponsive on v0.1.12 (the latest release), I read the source code rather than assume a config error. Here is what it actually shows:

  • --listen-address (defaulting to 127.0.0.1:31012) is stored at startup but only passed to core.Authenticate() during auto-login. It is used as a client connection target, not to bind a server.

  • Server startup opens exactly two ports: gRPC on 31010 and gRPC-Web on 31011.

  • There is no code in anytype-cli or anytype-heart that opens an HTTP server or REST gateway on any port.

The REST gateway behind /v1/... lives in the Electron desktop app as a translation layer over gRPC. It has never been in the CLI in any released version.

This means the MCP server and any REST-based tooling cannot reach a headless CLI instance today. The --listen-address flag looks like a placeholder for a future REST gateway — which would be a great addition — but it is not there yet.

A few questions for the team and anyone who has dug into this:

  1. Is the HTTP API doc entry a mistake, or is this feature in progress and the docs got ahead of the release?

  2. Is the REST gateway planned for the CLI? Is --listen-address the intended hook?

  3. Has anyone found a workable path to REST access from a headless deployment that doesn’t involve running Electron via Xvfb?

Flagging this publicly so the source findings are visible to others trying to use anytype-cli in a server context.

Thank you for your report. It’s been added to our tracker and will be looked into.