Skip to content

feat: add LANGFLOW_MCP_BASE_URL config for MCP server URL override - #12523

Merged
ogabrielluiz merged 2 commits into
release-1.9.0from
feat/config-base-url
Apr 6, 2026
Merged

feat: add LANGFLOW_MCP_BASE_URL config for MCP server URL override#12523
ogabrielluiz merged 2 commits into
release-1.9.0from
feat/config-base-url

Conversation

@ogabrielluiz

Copy link
Copy Markdown
Contributor

Summary

  • Adds LANGFLOW_MCP_BASE_URL setting so deployments behind reverse proxies can specify the correct external URL for MCP server configuration in the UI
  • The frontend uses it as the highest-priority fallback when building MCP server URLs: mcp_base_url > api.defaults.baseURL > window.location.origin
  • Trailing slashes are stripped to prevent double-slash URL construction
  • Defaults to empty string (existing behavior unchanged)

Add LANGFLOW_MCP_BASE_URL setting that the frontend uses as a fallback
when building MCP server URLs in the UI configuration JSON. This allows
deployments behind reverse proxies to specify the correct external URL.

Priority chain: mcp_base_url > api.defaults.baseURL > window.location.origin
@ogabrielluiz
ogabrielluiz requested a review from erichare April 6, 2026 18:12
@coderabbitai

coderabbitai Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 36c22e2b-f80c-4a4e-ab10-59df8c191970

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/config-base-url

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the community Pull Request from an external contributor label Apr 6, 2026
@ogabrielluiz
ogabrielluiz requested a review from Cristhianzl April 6, 2026 18:13
@ogabrielluiz ogabrielluiz removed the community Pull Request from an external contributor label Apr 6, 2026
@github-actions github-actions Bot added the enhancement New feature or request label Apr 6, 2026
@codecov

codecov Bot commented Apr 6, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 87.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 50.08%. Comparing base (acf2ae0) to head (737fdb7).
⚠️ Report is 2 commits behind head on release-1.9.0.

Files with missing lines Patch % Lines
src/frontend/src/types/zustand/utility/index.ts 0.00% 2 Missing ⚠️

❌ Your project status has failed because the head coverage (49.07%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                @@
##           release-1.9.0   #12523      +/-   ##
=================================================
+ Coverage          49.84%   50.08%   +0.24%     
=================================================
  Files               1930     1930              
  Lines             171890   172606     +716     
  Branches           25287    26539    +1252     
=================================================
+ Hits               85671    86456     +785     
+ Misses             85173    85105      -68     
+ Partials            1046     1045       -1     
Flag Coverage Δ
backend 55.86% <ø> (-0.02%) ⬇️
frontend 48.99% <85.71%> (+0.37%) ⬆️
lfx 49.07% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...c/controllers/API/queries/config/use-get-config.ts 67.39% <100.00%> (+1.46%) ⬆️
...frontend/src/customization/utils/custom-mcp-url.ts 85.00% <100.00%> (+79.11%) ⬆️
src/frontend/src/stores/utilityStore.ts 100.00% <100.00%> (ø)
src/lfx/src/lfx/services/settings/base.py 74.00% <100.00%> (+0.11%) ⬆️
src/frontend/src/types/zustand/utility/index.ts 0.00% <0.00%> (ø)

... and 89 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erichare erichare left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @ogabrielluiz

@github-actions

github-actions Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Frontend Unit Test Coverage Report

Coverage Summary

Lines Statements Branches Functions
Coverage: 29%
29.72% (31355/105494) 63.74% (3985/6251) 31.06% (732/2356)

Unit Test Results

Tests Skipped Failures Errors Time
3112 0 💤 0 ❌ 0 🔥 5m 11s ⏱️

@github-actions github-actions Bot added the lgtm This PR has been approved by a maintainer label Apr 6, 2026
@ogabrielluiz
ogabrielluiz added this pull request to the merge queue Apr 6, 2026
Merged via the queue into release-1.9.0 with commit cabaa2e Apr 6, 2026
101 of 102 checks passed
@ogabrielluiz
ogabrielluiz deleted the feat/config-base-url branch April 6, 2026 19:19
Adam-Aghili pushed a commit that referenced this pull request Apr 15, 2026
…12523)

* feat: add mcp_base_url to config endpoint for MCP server URL override

Add LANGFLOW_MCP_BASE_URL setting that the frontend uses as a fallback
when building MCP server URLs in the UI configuration JSON. This allows
deployments behind reverse proxies to specify the correct external URL.

Priority chain: mcp_base_url > api.defaults.baseURL > window.location.origin

* test: add tests for mcp_base_url config and URL fallback priority
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants