feat: add MCP Hub CLI commands (mcp-servers, mcp-tools, mcp-call) - #25
Merged
Conversation
Add CLI commands to list MCP servers, list a server's tools, and call a tool, backed by the opera_list_mcp_servers / opera_list_mcp_tools / opera_call_mcp_tool bridge tools. Treat MCP Hub as a streamed Opera AI tool, map MCP-specific failures to new error codes, and document the commands in README, SKILL, and CLAUDE (exit-code tests updated to cover new ErrorCodes).
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.
Summary
Adds three CLI commands for interacting with the browser's MCP Hub:
mcp-servers— list MCP servers registered in the browser (requires Opera Neon)mcp-tools --server <name>— list tools exposed by a servermcp-call --server <name> --tool <name> [--params '{...}']— execute a tool on a serverChanges
src/cli.ts— new handlers + command registration + help entries; MCP Hub listed as a tool surface requiring Opera Neon.src/bridge.ts/src/client.ts— treatopera_call_mcp_toolas an Opera AI (streamed) tool; map MCP-specific failures to new error codesEXTENSION_NOT_FOUND,NOT_FOUND,SERVER_DISCONNECTED.ErrorCodes added toEXIT_CODES(per the caller contract) and covered intest/exit-codes.test.ts.Testing
tsc --noEmitclean;npm run buildsucceeds.Note: applied the provided
opera-browser-cli.txtpatch (resolved minor context drift) and added the required exit-code plumbing the patch omitted.