Skip to content

Commit 45cf827

Browse files
AzymAzym
authored andcommitted
fix(mcp-server): openai/widgetCSP needs snake_case domain lists
ChatGPT's compatibility key `_meta["openai/widgetCSP"]` was being assigned the same object as the MCP Apps standard `_meta.ui.csp`, which uses camelCase (connectDomains/resourceDomains). OpenAI's key expects connect_domains/resource_domains, so it parsed as an empty allowlist and the plugin-directory tool scan rejected all six widgets with "openai/widgetCSP must contain at least one CSP or redirect domain list". Derive the OpenAI object from the same `csp` source under snake_case names so the two lists cannot drift. `ui.csp` is unchanged, so Claude and every other MCP client see exactly what they saw before. Verified against the built server: resources/list emits both keys on all 6 widgets with identical domains.
1 parent 6b56336 commit 45cf827

3 files changed

Lines changed: 29 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Changelog
22

3+
## 2026-08-16 — Fix `openai/widgetCSP` field names (ChatGPT widget scanning)
4+
5+
### Fixed
6+
7+
- **MCP server (1.14.1)**: the ChatGPT compatibility key
8+
`_meta["openai/widgetCSP"]` was being handed the same camelCase object as
9+
the MCP Apps standard `_meta.ui.csp` (`connectDomains` /
10+
`resourceDomains`). ChatGPT's key expects **snake_case**
11+
(`connect_domains` / `resource_domains`), so it saw no recognized domain
12+
list and the OpenAI plugin directory's tool scan failed with
13+
*"openai/widgetCSP must contain at least one CSP or redirect domain list"*.
14+
The OpenAI key is now derived from the same `csp` object under snake_case
15+
names, so the two cannot drift.
16+
17+
No behavior change for Claude or any other MCP client: `ui.csp` is
18+
untouched, and the domains allowed are identical on both keys.
19+
320
## 2026-08-15 — New platform status `unconfirmed`; opt-in `republish` on retry
421

522
Mirrors webapp commit `bedafa4`.

mcp-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bulkpublish/mcp-server",
3-
"version": "1.14.0",
3+
"version": "1.14.1",
44
"description": "Model Context Protocol server for BulkPublish — lets AI assistants manage social media posts, channels, media, and analytics.",
55
"mcpName": "io.github.azeemkafridi/bulkpublish",
66
"repository": {

mcp-server/src/index.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2085,10 +2085,20 @@ function registerWidget(config: {
20852085
// lives under the OpenAI-namespaced key "openai/widgetDomain" — Claude ignores
20862086
// namespaced keys, ChatGPT ignores plain `ui.*`, so the two clients don't
20872087
// collide.
2088+
// ChatGPT's compatibility key takes the SAME domain lists under snake_case
2089+
// field names (connect_domains / resource_domains); the MCP Apps standard
2090+
// `ui.csp` takes camelCase. Handing ChatGPT the camelCase object leaves it
2091+
// with no recognized list, and directory tool-scanning rejects it with
2092+
// "openai/widgetCSP must contain at least one CSP or redirect domain list".
2093+
// Derive it from `csp` so the two can never drift apart.
2094+
const openaiCsp = {
2095+
connect_domains: csp.connectDomains,
2096+
resource_domains: csp.resourceDomains,
2097+
};
20882098
const meta = {
20892099
ui: { csp },
20902100
"openai/widgetDomain": "bulkpublish.com",
2091-
"openai/widgetCSP": csp,
2101+
"openai/widgetCSP": openaiCsp,
20922102
};
20932103
registerAppResource(
20942104
server,

0 commit comments

Comments
 (0)