KB-1038
GPT Review — Phase 2C-B1 Nginx Design — 2026-05-13
3 min read Revision 1
gpt-reviewphase2c-b1nginxmcp-readonlypublic-route
GPT Review — Phase 2C-B1 Nginx Design — 2026-05-13
Verdict
Phase 2C-B1 design is accepted with required edits before deployment. Approve preparation of a Phase 2C-B2 deploy prompt, but do not deploy until the prompt includes the constraints below.
Accepted
- Nginx config is host bind-mounted from
/opt/incomex/docker/nginx/conf.d/default.confto/etc/nginx/conf.d/default.conf. - Existing config passes
nginx -t. - AgentData upstream
agent_data_backendis alreadyagent-data:8000. - No existing
/mcpor/gpt-mcppublic route exists. - Existing
$agent_data_api_key_validis boolean only; key injection needs a separate secret mechanism. - Using
/opt/incomex/docker/nginx/secrets/gpt-mcp-route.confas a non-git secret include is acceptable. - Public route should proxy only to
/mcp-readonly. - Public route must not expose
/mcpor/mcp/tools/{tool_name}.
Required changes before Phase 2C-B2
- Do not blindly commit all dirty
/opt/incomexfiles. There are unrelated dirty/untracked files. Before editing nginx, create a timestamped backup and diff snapshot ofdocker/nginx/conf.d/default.conf. Commit only the final nginx include change after tests pass, if appropriate. - The include must be placed inside the correct HTTPS
serverblock forvps.incomexsaigoncorp.vn, not at http context and not in unrelated server blocks. - Support both exact paths if feasible:
/gpt-mcp/<secret>/mcpand/gpt-mcp/<secret>/mcp/, both proxying to/mcp-readonly. If only one is deployed, the final ChatGPT URL must match exactly and the other must 404 by design. - The secret include file must be created before adding/reloading the tracked include; otherwise
nginx -twill fail. - The secrets file must be excluded from git and must not be printed in reports. Report only
<REDACTED_SECRET>and<REDACTED_KEY>. - Key injection may duplicate the current API key only inside the secrets file. Never put the key in tracked
default.conf. - Keep
access_log offacceptable for the secret route, but require public tests and upstream app logs for diagnostics. - Phase 2C-B2 may edit nginx only; it must not modify AgentData code or docker-compose.
Required Phase 2C-B2 tests
nginx -tbefore reload.- Reload nginx only after config test passes.
- Correct secret path initialize returns JSON-RPC response.
- Correct secret path
tools/listreturns exactly five read-only tools. - Correct secret path
tools/call delete_documentis rejected by readonly guard. - Wrong secret path returns 404.
/gpt-mcp/returns 404./gpt-mcp/<secret>/mcp/tools/delete_documentreturns 404.- Public
/mcp/tools/delete_documentis not reachable. - Logs/reports do not contain real secret or API key.
Hold
No ChatGPT Developer Mode connector until Phase 2C-B2 public route tests pass and GPT reviews the report.
Status
Approve Phase 2C-B2 deploy prompt preparation with the constraints above. Do not deploy until the prompt is updated accordingly.