feat: Add MCP server settings tab#89
Merged
Merged
Conversation
Operators can now enable or disable the agent's MCP server from settings and, when it is on, see the endpoint and how external clients connect. The toggle takes effect immediately without restarting the agent.
Code Review SummaryThis PR successfully adds a new settings tab for the Model Context Protocol (MCP) server. It includes the necessary UI components, reactive state management, and API integration to enable/disable the server and view connection details. The implementation correctly respects user permissions and provides immediate feedback through notifications. 🚀 Key Improvements
💡 Minor Suggestions
|
| const savingMcp = ref(false); | ||
|
|
||
| const mcpEndpoint = computed(() => { | ||
| const base = apiClient.defaults.baseURL || "/api"; |
There was a problem hiding this comment.
To avoid potential double slashes in the URL (e.g., //mcp) if apiClient.defaults.baseURL ends with a slash, normalize the base path before appending the endpoint.
Suggested change
| const base = apiClient.defaults.baseURL || "/api"; | |
| const base = (apiClient.defaults.baseURL || "/api").replace(/\/+$/, ""); | |
| try { | |
| return new URL(`${base}/mcp`, window.location.origin).toString(); | |
| } catch { | |
| return `${base}/mcp`; | |
| } |
Deploying flatrun-ui with
|
| Latest commit: |
fea1754
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8d6ddc2c.flatrun-ui.pages.dev |
| Branch Preview URL: | https://feat-mcp-settings.flatrun-ui.pages.dev |
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.
The agent gained an MCP server (flatrun/agent#186); this adds its settings surface. Operators can turn it on or off and, when on, see the endpoint and how external clients connect. The toggle applies live through the config API, so no restart is needed.