Add /mcp to run and configure the bundled MCP server - #23
Merged
Conversation
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Adds
/mcp— inspect, configure, and run the bundled MCP server without leaving the REPL.This work has been sitting on
feat/mcp-commandunmerged. It is being landed on its own so the flow-mapper branch reviews as one feature rather than two.What it does
/mcp statusmcpversion, whether it can actually run the server, and any running instance's pid, URL, uptime, and mode/mcp config [client]/mcp start/mcp stopTwo decisions worth knowing
startdeliberately refuses stdio. stdio is a pipe pair between a client and the server it spawned — started from the REPL there would be no client on the other end, and the REPL already owns its own stdin and stdout.starttherefore runsstreamable-http(default) orsse, which a client attaches to by URL. Transport flags were added toglean_mcp.pyto support this.--nameexists because of a silent collision. Glean ships its own hosted MCP server, and both would naturally register under the keyglean. Pasting one over the other replaces it with no error — you simply end up with a different toolset than you expected./mcp config --name glean-clikeeps both, and the default form warns when it emits the colliding name.Notes
127.0.0.1by default — a live server holds whatever credentials your config has~/.gleancode/mcp.jsonand stale entries clear themselvesmcp_control.pynever imports themcppackage, so the REPL stays dependency-freetests/test_mcp_control.pydocs/MCP.mdanddocs/COMMANDS.md🤖 Generated with Claude Code