fix: allow configuring server name and version - #10
Conversation
During the server discovery/initialization, a server will provide its name and version. Before this change, this was hard-coded in mmmcp. This change does two things: 1. If the mmmcp is fronting a single MCP server, then that server's name and version is used. 2. Otherwise, configuraiton can be provided to set these values. If neither of these is the case, then the default hard-coded values are used. Signed-off-by: Donnie Adams <donnie@obot.ai>
|
@claude review |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 370e0e5e00
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| func newFrontendServer(c *Composite, opts Options) *mcp.Server { | ||
| server := mcp.NewServer(&mcp.Implementation{Name: implementationName, Version: implementationVersion}, &mcp.ServerOptions{ | ||
| implementation := c.implementation |
There was a problem hiding this comment.
Derive identity from the session's effective configuration
When an HTTP request supplies ContextWithConfig, or RunStdio is invoked with a configured context, this always copies c.implementation, which was computed from the configuration passed to New. Consequently, an alternate multi-component configuration advertises the default configuration's name/version, while an alternate single-component configuration advertises the default downstream server's identity, even though feature routing uses the alternate configuration. Create the frontend identity from the effective per-request or per-session configuration and its catalog instead.
Useful? React with 👍 / 👎.
During the server discovery/initialization, a server will provide its name and version. Before this change, this was hard-coded in mmmcp. This change does two things:
If neither of these is the case, then the default hard-coded values are used.