-
Notifications
You must be signed in to change notification settings - Fork 468
add default MCP server URL on startup #288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -244,6 +244,10 @@ const App = () => { | |
if (data.defaultArgs) { | ||
setArgs(data.defaultArgs); | ||
} | ||
if (data.defaultMcpServerUrl) { | ||
setSseUrl(data.defaultMcpServerUrl); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If this is to be the full endpoint and not just the location and port of the server, we should look at the path and see if it is |
||
setTransportType("sse"); | ||
} | ||
}) | ||
.catch((error) => | ||
console.error("Error fetching default environment:", error), | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ const defaultEnvironment = { | |
...getDefaultEnvironment(), | ||
...(process.env.MCP_ENV_VARS ? JSON.parse(process.env.MCP_ENV_VARS) : {}), | ||
}; | ||
const defaultMcpServerUrl = process.env.MCP_SERVER_URL; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Probably this environment variable should be |
||
|
||
const { values } = parseArgs({ | ||
args: process.argv.slice(2), | ||
|
@@ -185,6 +186,7 @@ app.get("/config", (req, res) => { | |
defaultEnvironment, | ||
defaultCommand: values.env, | ||
defaultArgs: values.args, | ||
defaultMcpServerUrl, | ||
}); | ||
} catch (error) { | ||
console.error("Error in /config route:", error); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MCP_SERVER_BASE_URL
, and keep the examplehttp://localhost:8080
./sse
to it in the UI before passing it to the sidebar./sse
part will need to become/mcp
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about just changing the example? It's likely that people want to change the endpoint as well for example
my.domain.com/prefix/sse