-
Notifications
You must be signed in to change notification settings - Fork 94
feat!: use config file for MCP server #2665
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
Conversation
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: ab10b5ae4f3ff32ed0adf003 |
Tests are failing here with:
|
Whoops, I've made the config optional now. I'll need to update the MCP server to default initialize the config if no file is passed. |
The MCP server has also been updated in the 0.6.0 release branch |
648b313
to
4054d5c
Compare
How can I test this locally? I mean, how can I make my local rover use my local mcp? By default, it looks like my local rover uses mcp v0.5.2. merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'thespacedevs' subgraph
==> Watching /Users/dale.seo/work/apollo-mcp-server/graphql/TheSpaceDevs/api.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
==> Health check exposed at http://127.0.0.1:8088/health
WARN: Connector debugging is enabled, this may expose sensitive information.
==> Your supergraph is running! head to http://localhost:4000 to query your supergraph
ERROR: 2025-07-16T18:17:23.611283Z INFO Apollo MCP Server v0.5.2 // (c) Apollo Graph, Inc. // Licensed under MIT
ERROR: Error: No valid schema was supplied
MCP Server process exited with status code: 1
MCP Server binary exited, stopping `rover dev` processes... |
src/command/dev/mcp.rs
Outdated
#[arg(long = "mcp")] | ||
pub enabled: bool, |
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.
Should users specify both --mcp
and --mcp-config
?
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.
Not necessarily. The config is optional. We could make it so that if a config is specified, then it is defacto enabled, but let me know what you prefer.
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.
Specifying both options seems unnecessary for users, so I would recommend supporting just one to keep the interface simple.
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.
The issue is that the config file is optional since it includes defaults for all options. If we make it so that you always need to have a config to run the MCP server, that might make the quickstart more complicated than it needs to be. I can update this PR to look at if either one is specified before starting the MCP server, if that works
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.
Oh, I didn't consider that. How likely are users to be okay with the default options? Is there any chance we will introduce required options in the future? I still lean towards using a single option to maintain consistency with Router, which doesn't require --router --router-config
, but let me check with other folks. I'll post a poll in the MCP channel.
As for testing locally, that won't happen until we release. I'll kick off an RC release and then you should be able to test it. |
You can test this locally. One way is to just copy a recent build of |
4054d5c
to
c79b8f2
Compare
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.
This change worked for me. I think I ran into some issues while testing on the mcp side, but as far as rover goes this enables the mcp server and applies the configuration as expected.
This commit updates rover dev to pass a config file to the running MCP server when configured to serve it. BREAKING: This commit removes all of the previous `--mcp-*` cli arguments in favor of the config file.
03df8a0
to
7ddd123
Compare
# [0.35.0] - 2025-07-30 ## ❗ BREAKING ❗ - **use config file for MCP server - @nicholascioli PR #2665** ## 🚀 Features - **Update MCP options for rover dev - @DaleSeo PR #2661** - **Add schema name step to Connectors init workflow - @alyssahursh PR #2647** - **Allow running rover dev without --supergraph-config if you have a rover.yaml in the current directory - @dylan-apollo PR #2650** - **Updating output for init & renaming generated "supergraph.yaml" -> "rover.yaml" - @tayrrible PR #2651** - **Adds support for .env file for use with rover dev - @DMallare PR #2646** - **Add graph_ref to and remove federation_version from subgraph.yaml - @alyssahursh PR #2649** - **Hackathon improvements to supergraph.yaml - @dylan-apollo PR #2648** - **Adding link to studio for graph & showing each step in creation process via spinners - @tayrrible PR #2657** - **Generates .env file with rover init - @DMallare PR #2652** - **Remove use case guard clause in schema name prompt - @alyssahursh PR #2655** - **Set APOLLO_GRAPH_REF from rover.yaml's graph_ref - @dylan-apollo PR #2653** - **Adding apollo.config.yaml file for connectors projects - @tayrrible PR #2658** - **add a note about the need for APOLLO_KEY and APOLLO_GRAPH_REF when using router features or connect - @the-gigi-apollo PR #2677** - **Update Studio Client after loading .env in rover dev - @dylan-apollo PR #2654** - **Exposing org selector for all runs of init and changing prompt order - @tayrrible PR #2656** ## 🛠 Maintenance - **upgrade schemars and apollo-federation-types - @DaleSeo PR #2676**
This commit updates rover dev to pass a config file to the running MCP server when configured to serve it.
BREAKING: This commit removes all of the previous
--mcp-*
cli arguments in favor of the config file.