Repository navigation
Console MCP setup: generated Codex server key and OAuth login name differ #40346
|
Hello Materialize team, The console generates Codex TOML keys A focused run with the native Vitest runner passes 24/24 candidate tests; the updated tests produce three expected failures on the original source. Targeted strict TypeScript also passes. The final patch also passes the upstream-compatible Prettier check and applies to the main commit checked on 29 October 2026. The sections below state the focused fixture boundaries. BehaviorThe console generator writes The proposed fix preserves Target and current-source checkPinned generator source: Verification performed
The stock Vitest runner exercised the exact final formatted generator and test files. The focused fixture maps Patch scopeThe patch changes the TOML builder and its tests only. It uses LF line endings and the existing project formatter style. The naming behavior was verified without an OAuth server. Generated-configuration OAuth login and app-password endpoint behavior have not been exercised. Patch--- a/console/src/components/connect/connectOptions.ts
+++ b/console/src/components/connect/connectOptions.ts
@@ -264,8 +264,7 @@
const header = token
? `\nhttp_headers = { "Authorization" = "Basic ${token}" }`
: "";
- const tableName = server.serverName.replace(/-/g, "_");
- return `[mcp_servers.${tableName}]\nurl = "${mcpServerUrl(server, baseUrl)}"${header}`;
+ return `[mcp_servers.${server.serverName}]\nurl = "${mcpServerUrl(server, baseUrl)}"${header}`;
};
/** Builds the client-specific MCP config snippet, using
--- a/console/src/components/connect/connectOptions.test.ts
+++ b/console/src/components/connect/connectOptions.test.ts
@@ -185,7 +185,7 @@
});
});
- it("builds TOML with underscored table names for Codex", () => {
+ it("preserves the server name in Codex TOML", () => {
const snippet = buildMcpSnippet({
client: client("codex"),
server: server("agent"),
@@ -193,7 +193,7 @@
token: "dG9rZW4=",
});
expect(snippet).toEqual(
- `[mcp_servers.materialize_agent]\nurl = "${BASE_URL}/api/mcp/agent"\nhttp_headers = { "Authorization" = "Basic dG9rZW4=" }`,
+ `[mcp_servers.materialize-agent]\nurl = "${BASE_URL}/api/mcp/agent"\nhttp_headers = { "Authorization" = "Basic dG9rZW4=" }`,
);
});
});
@@ -306,3 +306,21 @@
);
});
});
+
+// The generated TOML key must match the name used by the next OAuth step.
+for (const mcpServer of MCP_SERVERS) {
+ it(`keeps the Codex registration and login name aligned for ${mcpServer.id}`, () => {
+ const codex = client("codex");
+ const snippet = buildMcpSnippet({
+ client: codex,
+ server: mcpServer,
+ baseUrl: BASE_URL,
+ });
+ expect(snippet.split("\n")[0]).toEqual(
+ `[mcp_servers.${mcpServer.serverName}]`,
+ );
+ expect(codex.authenticateCommand?.(mcpServer.serverName)).toEqual(
+ `codex mcp login ${mcpServer.serverName}`,
+ );
+ });
+}checks-summary.json{
"checked_at_utc": "2026-10-29T07:51:43.204626+00:00",
"versions": {
"vitest": "5.0.2",
"typescript": "6.0.3"
},
"execution": "Native Vitest runner in a focused isolated copy; not the full console yarn test configuration",
"utility_dependency": "~/utils/format mapped to the exact upstream toBase64 function only",
"tests": {
"source": {
"total": 22,
"passed": 22,
"failed": 0,
"failed_names": []
},
"red": {
"total": 24,
"passed": 21,
"failed": 3,
"failed_names": [
"buildMcpSnippet preserves the server name in Codex TOML",
"keeps the Codex registration and login name aligned for developer",
"keeps the Codex registration and login name aligned for agent"
]
},
"candidate": {
"total": 24,
"passed": 24,
"failed": 0,
"failed_names": []
}
},
"typecheck": {
"exit_code": 0,
"strict": true,
"no_emit": true,
"skip_lib_check": true,
"scope": "candidate generator and test file, not full console application"
},
"limits": [
"No generated-config OAuth login or app-password endpoint execution",
"No full console project suite/typecheck",
"No production or other-client compatibility claim"
],
"patch": {
"original_patch_sha256": "89a65d3b692f3e534af0328fa74a0d97aa5f480f9c23a34c3f390fc11807fe6d",
"packaged_patch_sha256": "9f930d63dff40cba179d6612a66b0e146960058fd682cd8f123fca5c83fb69cf",
"difference": "Final patch also formats generator/test changes with upstream-compatible Prettier3.9.9; behavior unchanged.",
"git_apply_check_exit": 0,
"git_apply_exit": 0,
"applied_matches_tested_candidate_after_eol_normalization": true,
"previous_packaged_patch_sha256": "2f4e31754d0c484c4765b4875ba70c3455e71f29056e8f84db41c398a82f999f",
"applies_to_checked_main": "76d959be40de20bbb2296eb5b8ffe2bbcf606c33",
"applied_bytes_match_final_focused_test_candidate": true
},
"readiness_checked_at_utc": "2026-10-29T10:23:06.605911+00:00",
"prettier": {
"version": "3.9.9",
"baseline_source_files_match_defaults": true,
"candidate_files_pass": true,
"scope": "Both changed files; no full console ESLint run"
}
}upstream-check.json{
"checked_at_utc": "2026-10-29T10:28:55.676731+00:00",
"repository": "https://github.com/MaterializeInc/materialize",
"head_commit": "76d959be40de20bbb2296eb5b8ffe2bbcf606c33",
"head_commit_date": "2026-10-29T09:26:02Z",
"comparison_scope": "Fresh source comparison and final focused generator checks. No full console project validation.",
"files": [
{
"path": "console/src/components/connect/connectOptions.ts",
"upstream_url": "https://raw.githubusercontent.com/MaterializeInc/materialize/76d959be40de20bbb2296eb5b8ffe2bbcf606c33/console/src/components/connect/connectOptions.ts",
"sha256": "985550c643e793986ee39d1d93cf73197a2ffbecceb46d58a97113840f25ce21",
"pinned_sha256": "985550c643e793986ee39d1d93cf73197a2ffbecceb46d58a97113840f25ce21",
"byte_equal_to_pin": true,
"bytes": 13445
},
{
"path": "console/src/components/connect/connectOptions.test.ts",
"upstream_url": "https://raw.githubusercontent.com/MaterializeInc/materialize/76d959be40de20bbb2296eb5b8ffe2bbcf606c33/console/src/components/connect/connectOptions.test.ts",
"sha256": "81a38659e3ad8087d3c73a21c1f657f51a72b83449bdbcfe8e9a7d5ce5d50103",
"pinned_sha256": "81a38659e3ad8087d3c73a21c1f657f51a72b83449bdbcfe8e9a7d5ce5d50103",
"byte_equal_to_pin": true,
"bytes": 9252
},
{
"path": "console/src/components/connect/ConnectMcpPanel.tsx",
"upstream_url": "https://raw.githubusercontent.com/MaterializeInc/materialize/76d959be40de20bbb2296eb5b8ffe2bbcf606c33/console/src/components/connect/ConnectMcpPanel.tsx",
"sha256": "df0df1b5b40d0700f292c67560725ccc6808d5dfbd26a320b25361fadd9b70da",
"pinned_sha256": "df0df1b5b40d0700f292c67560725ccc6808d5dfbd26a320b25361fadd9b70da",
"byte_equal_to_pin": true,
"bytes": 12037
},
{
"path": "console/package.json",
"upstream_url": "https://raw.githubusercontent.com/MaterializeInc/materialize/76d959be40de20bbb2296eb5b8ffe2bbcf606c33/console/package.json",
"sha256": "134e911c5acc1cb97029abd5976c8bee6e3b2c7d6fac3f172cbdab8452bdfbc3",
"pinned_sha256": "134e911c5acc1cb97029abd5976c8bee6e3b2c7d6fac3f172cbdab8452bdfbc3",
"byte_equal_to_pin": true,
"bytes": 7298
}
],
"source_files_captured_at_utc": "2026-10-29T10:09:36.364983+00:00",
"head_ref_verified_at_utc": "2026-10-29T10:28:55.676731+00:00",
"tested_source_commit": "ce918fb23af326a23c6ebfb6eef9bfb681c14794"
}Regards, |
Replies: 1 comment 2 replies
|
Yes, it's a mismatch in the console and it's still there on main. Until it's fixed, either keep the generated block and log in with the underscored name: codex mcp login materialize_agent
codex mcp login materialize_developeror rename the table to the hyphenated name, which Codex accepts, and then the console's command works as shown: [mcp_servers.materialize-agent]
url = "<same URL the console generated>"codex mcp login materialize-agentEither way the rule is the same: the I checked this with Codex CLI 0.166.0 and a throwaway |
Yes, it's a mismatch in the console and it's still there on main.
buildTomlSnippetturns the hyphens into underscores for the table name (connectOptions.ts#L263-L269), while the Authenticate step passesserver.serverNameunchanged (ConnectMcpPanel.tsx#L351-L361). Codex looks the server up by the exact[mcp_servers.<name>]key, so the login command it shows can't find it.Until it's fixed, either keep the generated block and log in with the underscored name:
or rename the table to the hyphenated name, which Codex accepts, and then the console's command works as shown: