According to the spec, the name field is supposed to be a human readable name for the MCP server. It doesn't mention any characters that are disallowed in there.
https://agentclientprotocol.com/protocol/session-setup#http-transport
When providing a name with a whitespace in it, Codex fails to connect to the MCP (I only tested http). claude-code-acp works just fine.
I assume this is a Codex limitation, so it might make sense to strip invalid characters before passing the config to Codex.