chore(mcp): default notion clients to single-exec mode#60246
Merged
Conversation
Contributor
|
Reviews (1): Last reviewed commit: "chore(mcp): default notion clients to si..." | Re-trigger Greptile |
Contributor
|
Size Change: 0 B Total Size: 80.6 MB ℹ️ View Unchanged
|
| export const VIBE_CODING_OAUTH_CLIENT_NAME_FRAGMENTS = ['lovable', 'replit'] as const | ||
| // Notion is included here because a sizeable share of sessions only carry the | ||
| // OAuth name without the `notion-mcp-client` self-report. | ||
| export const VIBE_CODING_OAUTH_CLIENT_NAME_FRAGMENTS = ['lovable', 'replit', 'notion'] as const |
Member
There was a problem hiding this comment.
This check, in general, is not good enough, right?
I wonder if we should just check the OAuthApplication connected to the token and check against that instead? These 3 clients are using CIMD so we can easily identify who they are.
Contributor
Author
There was a problem hiding this comment.
We already do that here
cvolzer3
approved these changes
May 27, 2026
Notion AI surfaces tool output through an LLM the same way Claude Code and other coding agents do. Match `notion-mcp-client` and the `Notion` OAuth client name so those sessions resolve to CLI mode by default and get the formatted-text rendering instead of raw structuredContent.
7c16d12 to
2d7b578
Compare
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.
Problem
Notion AI is now one of the most active MCP clients hitting our server. Like Claude Code and other coding agents, Notion AI feeds tool output through an LLM rather than rendering
structuredContentin a UI, so it benefits from the same single-exec / CLI mode andformatted_resultstext rendering we already use for those clients.Today Notion sessions fall through to the default multi-tool mode unless the caller explicitly sets
mode=cli.Changes
'notion'toCODING_AGENT_CLIENT_NAME_FRAGMENTSso theclientInfo.name=notion-mcp-clientself-report flipsisCodingAgent()and the structured-content suppression inbuild-tool-result.ts.'notion'toVIBE_CODING_OAUTH_CLIENT_NAME_FRAGMENTSso theNotionOAuthclient_namealso triggers single-exec mode.How did you test this code?
vitest run tests/unit/client-detection.test.ts— extended bothisCodingAgentClientandisVibeCodingClientparameterized suites with Notion fixtures (notion,notion-mcp-client,Notion); 111/111 pass.mcp_session_id, so the existing session-cache fallback inrequest-state-resolver.ts(which restoresmcpClientNamefromsessionCacheon follow-up requests) will keep the CLI-mode decision sticky across a session.Publish to changelog?
no