feat: in app mcp instructions#7438
Conversation
…ix Cursor/Codex snippets - Prefill Mcp-Flagsmith-Server-Url from Constants.getFlagsmithSDKUrl().origin - Cursor manual config drops "type": "http" to match Cursor's documented schema - Codex self-hosted uses env_http_headers for the auth token - Add VIEW_INTEGRATION event (stable name + integration property) fired from openIntegrationModal and IntegrationList Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Match docs and Gram install page exactly: 'Header:value' not 'Header: value'. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.
Once credits are available, reopen this pull request to trigger a review.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Docker builds report
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
# Conflicts: # frontend/web/components/base/forms/Button.tsx
Zaimwa9
left a comment
There was a problem hiding this comment.
Mostly nits but requesting changes because of the URL stripping that could return a wrong url for self hosted.
Otherwise, the whole documentation is about to change but I'd lean towards going forward with this one and update as soon as we have released the new mcp
| </Highlight> | ||
| <div className='flex-column hljs-docs'> | ||
| <Button | ||
| onClick={() => navigator.clipboard.writeText(code)} |
There was a problem hiding this comment.
We could add just a notification on copy success
| <div className='flex-row'> | ||
| <div | ||
| className='flex flex-1' | ||
| style={isMobile ? { overflowX: 'scroll' } : {}} |
There was a problem hiding this comment.
We lost this one in the process, is it intentional?
|
|
||
| const getSelfHostedServerUrl = () => { | ||
| try { | ||
| return new URL(Constants.getFlagsmithSDKUrl()).origin |
There was a problem hiding this comment.
For context, the mcp will live in https://flagsmith.com/flagsmith/api/v1/ so if the self-hosted keeps the same pattern they might have the wrong base url, without the api/v1 or any other subpath.
| const claudeCodeSnippet = (selfHosted: boolean, serverUrl: string) => | ||
| selfHosted | ||
| ? `claude mcp add --transport http "flagsmith" \\ | ||
| "${MCP_URL}" \\ | ||
| --header 'Mcp-Flagsmith-Token-Auth:\${MCP_FLAGSMITH_TOKEN_AUTH}' \\ | ||
| --header 'Mcp-Flagsmith-Server-Url:${serverUrl}'` | ||
| : `claude mcp add --transport http "flagsmith" \\ | ||
| "${MCP_URL}"` | ||
|
|
||
| const cursorJsonConfig = (selfHosted: boolean, serverUrl: string) => { |
There was a problem hiding this comment.
Leaving this to you to decide but we could extract the snippet builders in their own component so it's properly isolated and easy to find.
Overall this component could be broken up a bit I believe
|
Drafting considering this is pending |
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Features page cta
Organisation page cta
Self-hosted example
How did you test this code?
Claude Code
SaaS
Self-hosted
Claude Desktop (
claude_desktop_config.json)SaaS
{ "mcpServers": { "flagsmith": { "command": "npx", "args": [ "mcp-remote@0.1.25", "https://app.getgram.ai/mcp/flagsmith-mcp" ] } } }Self-hosted
{ "mcpServers": { "flagsmith": { "command": "npx", "args": [ "mcp-remote@0.1.25", "https://app.getgram.ai/mcp/flagsmith-mcp", "--header", "Mcp-Flagsmith-Token-Auth:${MCP_FLAGSMITH_TOKEN_AUTH}", "--header", "Mcp-Flagsmith-Server-Url:https://flagsmith.example.com" ], "env": { "MCP_FLAGSMITH_TOKEN_AUTH": "Api-Key YOUR_API_KEY_HERE" } } } }Codex CLI (
~/.codex/config.toml)SaaS
Self-hosted
Cursor
Deep link
SaaS
config payload:
{"url":"https://app.getgram.ai/mcp/flagsmith-mcp"}Self-hosted
config payload:
{"url":"https://app.getgram.ai/mcp/flagsmith-mcp","headers":{"Mcp-Flagsmith-Server-Url":"https://flagsmith.example.com","Mcp-Flagsmith-Token-Auth":"{{MCP-F LAGSMITH-TOKEN-AUTH}}"}}Manual config (
~/.cursor/mcp.json)SaaS
{ "mcpServers": { "flagsmith": { "url": "https://app.getgram.ai/mcp/flagsmith-mcp" } } }Self-hosted
{ "mcpServers": { "flagsmith": { "url": "https://app.getgram.ai/mcp/flagsmith-mcp", "headers": { "Mcp-Flagsmith-Token-Auth": "${MCP_FLAGSMITH_TOKEN_AUTH}", "Mcp-Flagsmith-Server-Url": "https://flagsmith.example.com" } } } }Gemini CLI
SaaS
Self-hosted
VS Code
Deep link
SaaS
config payload:
{"name":"flagsmith","type":"http","url":"https://app.getgram.ai/mcp/flagsmith-mcp"}Self-hosted
config payload:
{"name":"flagsmith","type":"http","url":"https://app.getgram.ai/mcp/flagsmith-mcp","headers":{"Mcp-Flagsmith-Server-Url":"https://flagsmith.example.com","M cp-Flagsmith-Token-Auth":"Api-Key YOUR_API_KEY_HERE"}}CLI fallback
SaaS
code --add-mcp '{"name":"flagsmith","type":"http","url":"https://app.getgram.ai/mcp/flagsmith-mcp"}'Self-hosted