sdods mcp --http exits immediately with HTTP mode needs a bearer token
Example threads. These questions and answers were written by the SDODS team to document real problems and how to fix them. The people named are illustrative, not real users. Questions asked on this site are marked new.
Trying to reach the server from a container on the same box, so stdio is out.
bash
sdods mcp --http --port 4001
text
AUTH_FAILED HTTP mode needs a bearer token.
→ Pass --token <secret> (dev) or set SDODS_MCP_TOKEN. Production deployments use scoped tokens
from `sdods tokens create` via the web server.
Exit code 2. I did not expect auth on localhost. Is there a way to turn it off for a dev box?
There is not, and that is on purpose: the moment the server speaks HTTP it is reachable by anything on the machine, including any page a browser has open. So it refuses to start without something to check.
Worth knowing for the container case: exit code 2 is the configuration-or-usage code, so a supervisor that restarts on non-zero will just spin. Set the variable in the unit or the compose env rather than letting it retry.