You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP server config uses unrecognized 'mcpServers' key in altimate-code.json #619
When asking the tool to add an MCP server for GitLab, it creates a file that will prevent altimate from starting up when running a new session. The following error is shown when you run altimate to create a new session.
Error: Configuration is invalid at ~/.config/altimate-code/altimate-code.json
↳ Unrecognized key: "mcpServers"
Output of ~/.config/altimate-code/altimate-code.json:
String `command` + `args` array → merged into `command` array
`env` → `environment`
Remote servers with `url` → `{type: "remote", url, headers}`
Conflict handling: always deletes `mcpServers` from the parsed config before Zod schema validation, regardless of whether `mcp` is also present
Adversarial test coverage
Comprehensive tests at `packages/opencode/test/config/config.test.ts:346-490` covering:
Normal case: `mcpServers` only → aliased to `mcp`
Array `command` format → preserved as-is
Conflict: both `mcp` and `mcpServers` → `mcp` wins, `mcpServers` dropped silently
Remote servers without `type` field → auto-inferred as `"remote"`
Typed entries with external field names → normalized
Empty `mcpServers` object → loads without error
Malformed entries → rejected cleanly
Verifying the fix
# Drop an altimate-code.json with Claude Code's mcpServers format:
{
\"mcpServers\": {
\"gitlab\": {
\"command\": \"npx\",
\"args\": [\"-y\", \"@modelcontextprotocol/server-gitlab\"],
\"env\": { \"GITLAB_PERSONAL_ACCESS_TOKEN\": \"your-token\" }
}
}
}
altimate-code will auto-normalize it on load and log a warning instead of crashing. No config rewrite needed — the transformation happens in-memory before schema validation.
Closing this issue as resolved. Thanks @VJ-yadav for reporting it!
Activity
fix: accept mcpServers as alias for mcp in config
anandgupta42 commentedon Apr 5, 2026
Status: Fixed by #639 (merged April 4, 2026)
The compatibility gap you reported — AI tools writing `mcpServers` instead of `mcp` in `altimate-code.json` — has been fully resolved.
What was shipped
#639 added `normalizeMcpConfig()` in `packages/opencode/src/config/config.ts:1372-1421` which does:
Adversarial test coverage
Comprehensive tests at `packages/opencode/test/config/config.test.ts:346-490` covering:
Verifying the fix
altimate-code will auto-normalize it on load and log a warning instead of crashing. No config rewrite needed — the transformation happens in-memory before schema validation.
Closing this issue as resolved. Thanks @VJ-yadav for reporting it!