Skip to content

feat: add MCP Hub CLI commands (mcp-servers, mcp-tools, mcp-call) - #25

Merged
macieju-opera merged 1 commit into
mainfrom
feat/mcp-hub
Aug 19, 2026
Merged

feat: add MCP Hub CLI commands (mcp-servers, mcp-tools, mcp-call)#25
macieju-opera merged 1 commit into
mainfrom
feat/mcp-hub

Conversation

@macieju-opera

Copy link
Copy Markdown
Contributor

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 server
  • mcp-call --server <name> --tool <name> [--params '{...}'] — execute a tool on a server

Changes

  • 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 — treat opera_call_mcp_tool as an Opera AI (streamed) tool; map MCP-specific failures to new error codes EXTENSION_NOT_FOUND, NOT_FOUND, SERVER_DISCONNECTED.
  • Exit codes — new ErrorCodes added to EXIT_CODES (per the caller contract) and covered in test/exit-codes.test.ts.
  • Docs — README, SKILL.md, CLAUDE.md updated.

Testing

  • tsc --noEmit clean; npm run build succeeds.
  • Full suite: 455 passing (one test updated for the new exit codes).

Note: applied the provided opera-browser-cli.txt patch (resolved minor context drift) and added the required exit-code plumbing the patch omitted.

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).
@macieju-opera
macieju-opera merged commit 9ec776d into main Aug 19, 2026
2 checks passed
@macieju-opera
macieju-opera deleted the feat/mcp-hub branch August 19, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant