Note on scope: This bug is in the VS Code "Hostinger Connector" extension (hostinger-official.hostinger-connector, v1.2.0), not in this MCP server itself. The extension has no public repo, so I'm filing here as the closest Hostinger AI-integration project — please route it to the extension team. Thanks!
Summary
The VS Code Hostinger Connector extension corrupts OpenAI Codex's ~/.codex/config.toml. On every sync to Codex it leaves orphaned text fragments that accumulate until the file is no longer valid TOML, after which Codex fails to load its configuration. JSON-based IDEs (Claude Code, Cursor, etc.) are unaffected — this is specific to the TOML code path used for Codex.
Environment
- Extension:
hostinger-official.hostinger-connector 1.2.0
- Affected target: OpenAI Codex (
ide.format === 'toml', writes ~/.codex/config.toml)
- OS: Windows 11
Symptom
A corrupted config.toml looks like this (one extra orphan set is appended on every sync):
[tui.model_availability_nux]
"gpt-5.5" = 4["--package=hostinger-api-mcp@latest", "hostinger-hosting-mcp"]
enabled = true["--package=hostinger-api-mcp@latest", "hostinger-domains-mcp"]
enabled = true["--package=hostinger-api-mcp@latest", "hostinger-dns-mcp"]
...
= 4[...] / = true[...] are invalid TOML, so the file fails to parse from that point on.
Root cause
In out/extension.js, both mergeTomlConfig() and removeHostingerFromToml() strip existing Hostinger sections with this regex:
content = content.replace(/\n*\[mcp_servers\.hostinger-[^\]]*\][^\[]*/g, '');
The section-body matcher [^\[]* ("consume until the next [") is meant to swallow a whole [mcp_servers.hostinger-*] table. But TOML inline arrays contain [:
args = ["--package=hostinger-api-mcp@latest", "hostinger-hosting-mcp"]
So the strip stops at the [ in args = [, deleting only the header, command, and args = , and leaving the array literal plus enabled = true behind. A subsequent trimEnd() removes the separating newline, gluing the orphan array onto the previous table's last line — producing the invalid lines shown above. One orphan set is added per sync, so the file degrades over time.
Minimal repro (Node.js)
const strip = /\n*\[mcp_servers\.hostinger-[^\]]*\][^\[]*/g;
const section =
`[mcp_servers.hostinger-hosting]
command = "npx.cmd"
args = ["--package=hostinger-api-mcp@latest", "hostinger-hosting-mcp"]
enabled = true`;
console.log(JSON.stringify(section.replace(strip, '')));
// Actual: "\nargs = [\"--package=...\", \"hostinger-hosting-mcp\"]\nenabled = true"
// Expected: "" (the whole section should be removed)
Suggested fix
Terminate the section body at the next line-initial [ (a real table header) instead of any [, so inline-array lines are consumed:
content = content.replace(
/\n*\[mcp_servers\.hostinger-[^\]]*\](?:\n(?![ \t]*\[)[^\n]*)*/g,
''
);
I verified this is idempotent: running the full strip-and-append cycle 4× on a clean config produces 0 orphans and leaves all non-Hostinger tables ([tui.*], [features], …) untouched, whereas the current regex adds 7 orphan lines per cycle. Longer term, replacing the hand-rolled TOML string manipulation with a real TOML parser/serializer would be more robust.
Happy to provide any further detail.
Summary
The VS Code Hostinger Connector extension corrupts OpenAI Codex's
~/.codex/config.toml. On every sync to Codex it leaves orphaned text fragments that accumulate until the file is no longer valid TOML, after which Codex fails to load its configuration. JSON-based IDEs (Claude Code, Cursor, etc.) are unaffected — this is specific to the TOML code path used for Codex.Environment
hostinger-official.hostinger-connector1.2.0ide.format === 'toml', writes~/.codex/config.toml)Symptom
A corrupted
config.tomllooks like this (one extra orphan set is appended on every sync):= 4[...]/= true[...]are invalid TOML, so the file fails to parse from that point on.Root cause
In
out/extension.js, bothmergeTomlConfig()andremoveHostingerFromToml()strip existing Hostinger sections with this regex:The section-body matcher
[^\[]*("consume until the next[") is meant to swallow a whole[mcp_servers.hostinger-*]table. But TOML inline arrays contain[:So the strip stops at the
[inargs = [, deleting only the header,command, andargs =, and leaving the array literal plusenabled = truebehind. A subsequenttrimEnd()removes the separating newline, gluing the orphan array onto the previous table's last line — producing the invalid lines shown above. One orphan set is added per sync, so the file degrades over time.Minimal repro (Node.js)
Suggested fix
Terminate the section body at the next line-initial
[(a real table header) instead of any[, so inline-array lines are consumed:I verified this is idempotent: running the full strip-and-append cycle 4× on a clean config produces 0 orphans and leaves all non-Hostinger tables (
[tui.*],[features], …) untouched, whereas the current regex adds 7 orphan lines per cycle. Longer term, replacing the hand-rolled TOML string manipulation with a real TOML parser/serializer would be more robust.Happy to provide any further detail.