Repository navigation
fix(mcp): serve every route under CHATBOTX_MCP_BASE_PATH - #1777
Merged
Merged
Conversation
Replace CHATBOTX_MCP_SSE_PATH and CHATBOTX_MCP_MESSAGES_PATH with a single CHATBOTX_MCP_BASE_PATH prefix so /mcp/messages, /mcp/sse, /mcp/openai and /mcp/claude resolve behind a proxy that forwards /mcp/* unchanged. The server refuses to start while either removed variable is set.
…out public URL - An empty CHATBOTX_MCP_SSE_PATH / CHATBOTX_MCP_MESSAGES_PATH no longer blocks startup; a non-empty value still does. - Test the prefixed WWW-Authenticate metadata URL derived from the request host when CHATBOTX_MCP_PUBLIC_URL is unset. - Refresh the profileForPath comment and mark CHATBOTX_MCP_BASE_PATH as optional in the README.
3 of 4 tasks
realcodesiman
added a commit
that referenced
this pull request
Nov 25, 2026
OpenAI rejected the ChatGPT connector because tool annotations did not match behavior. Its review rule sets destructiveHint for any tool that overwrites or clears existing data, even when the change can be undone. - conversations.assign replaces or clears the current assignee. - pipelines.moveItem replaces the item's current stage. Both now declare destructiveHint: true in x-mcp, so the default, Claude and OpenAI profiles advertise the same hint. hitlPolicy is derived from the operation id and stays confirm_diff, so the OpenAI input schemas and the approval flow are unchanged. Also fix the mcp-server README profile tables: a backticked env name in the first column was read as a tool name by the README tool-list test, which has failed on main since #1777.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CHATBOTX_MCP_SSE_PATHandCHATBOTX_MCP_MESSAGES_PATHwith a singleCHATBOTX_MCP_BASE_PATHprefix applied to every route (/messages,/sse,/openai,/claude)./mcp/*to the server unchanged, so the profile routes (/mcp/openai,/mcp/claude) previously did not resolve there; withCHATBOTX_MCP_BASE_PATH=/mcpall routes do.CHATBOTX_MCP_BASE_PATHis validated: empty or/segment[/segment], no trailing slash, not under/.well-known.WWW-Authenticatemetadata URLs include the base path; README and.env.exampleupdated.Breaking change
Deployments that set
CHATBOTX_MCP_SSE_PATH/CHATBOTX_MCP_MESSAGES_PATHmust switch toCHATBOTX_MCP_BASE_PATH(production:/mcp).Test plan
pnpm --filter chatbotx-mcp check-types(run by pre-commit hook)pnpm --filter chatbotx-mcp test(new tests: prefixed routes for Claude, OpenAI and default profiles; unprefixed routes 404; removed variables rejected; invalid base paths rejected)CHATBOTX_MCP_BASE_PATH=/mcpin the production deployment before rollout