MemtraceDOCS

Transports & ports

stdio is the default MCP transport; streamable-http multiplexes many agent sessions for orchestrators. The default ports, and why the UI stays loopback-only.

Transports#

memtrace mcp serves MCP tools over one transport per process, chosen by MEMTRACE_TRANSPORT. stdio is the default — the shape every coding agent (Claude Code, Cursor, Codex, and the rest) is registered to use out of the box.

MEMTRACE_TRANSPORT valueResolves toNotes
(unset) / stdiostdioDefault. One agent process per server instance, launched by the client.
streamable-httpstreamable-HTTPOne server multiplexes many concurrent agent sessions — for orchestrators and dashboards.
httpstreamable-HTTPAlias for streamable-http.
ssestreamable-HTTPDeprecated MCP-spec name, still accepted as an alias — prints a one-line stderr deprecation hint.
anything else(refused)Unrecognized values are a hard error: the process exits 2 rather than silently falling back to stdio.

memtrace mcp attaches to an already-running memtrace start daemon for the same workspace instead of spawning a second stack, and stays headless (no UI port) unless you pass --ui or set MEMTRACE_MCP_UI=1.

MCP transport selectionFLOW
unset / stdiostreamable-http / http / sseunknown value
memtrace mcp
MEMTRACE_TRANSPORT?
stdiodefault
streamable-HTTP0.0.0.0:3000
Exit 2
TRIGGERDECISIONSERVICESUPPORTINGREMEDIATION

Ports#

PortServiceEnv overrideDefault bind
3030UI + REST API + MCP-HTTP dashboard serverMEMTRACE_UI_PORT127.0.0.1 (loopback-only)
3000MCP server when MEMTRACE_TRANSPORT is streamable-http/http/sseMEMTRACE_PORT0.0.0.0 (all interfaces)
50051MemDB loopback gRPC — the memcore-server sidecarMEMTRACE_MEMDB_LOOPBACK_PORT127.0.0.1

A bind failure on the MCP HTTP port surfaces a clear message telling you the port may be in use and to set MEMTRACE_PORT to a free one.

terminal
$ MEMTRACE_TRANSPORT=streamable-http MEMTRACE_PORT=3000 memtrace mcp
# [memtrace] MCP streamable-HTTP transport listening on http://0.0.0.0:3000/mcp

Loopback by default#

memtrace start's own dashboard/API server on port 3030 binds 127.0.0.1 by default — nothing is exposed to your LAN unless you explicitly opt in with MEMTRACE_UI_HOST.

VariableDefaultDescription
MEMTRACE_UI_HOST127.0.0.1Overrides the bind address for the UI/REST/MCP-HTTP dashboard server that memtrace start binds on port 3030. Set to 0.0.0.0 to expose it beyond localhost.
MEMTRACE_MCP_UI(unset)Set to 1 to have a headless memtrace mcp also start the browser-facing UI server (same effect as --ui). This UI server binds 0.0.0.0 unconditionally — it does not read MEMTRACE_UI_HOST and is not loopback-only.
MEMTRACE MCP --UI AND THE STREAMABLE-HTTP MCP TRANSPORT BOTH BIND ALL INTERFACES

The MEMTRACE_UI_HOST loopback default above only applies to memtrace start's UI server. When memtrace mcp starts its own UI via --ui or MEMTRACE_MCP_UI=1, that listener binds 0.0.0.0 unconditionally, regardless of MEMTRACE_UI_HOST. Separately, the streamable-HTTP MCP transport on port 3000 also binds 0.0.0.0 — every interface, not just loopback — with no env knob to change that, and there is no authentication in front of the /mcp route at this layer. Treat both as fine only for trusted orchestration hosts on a trusted network, not something to expose directly to the internet.

See also memtrace mcp, memtrace start, and Environment variables for the full list of runtime env overrides.