Skip to content

feat(mcp): add SSE transport, tools command, and multi-client install support#102

Open
moshloop wants to merge 8 commits intomainfrom
pr/mcp-improvements
Open

feat(mcp): add SSE transport, tools command, and multi-client install support#102
moshloop wants to merge 8 commits intomainfrom
pr/mcp-improvements

Conversation

@moshloop
Copy link
Copy Markdown
Member

@moshloop moshloop commented May 5, 2026

No description provided.

moshloop added 7 commits May 5, 2026 09:02
Add support for including a hidden _id column in table rows for wrapped entities (entityWithID). The _id column is automatically added to the Columns() output and included in Row() and PrettyRow() data, but marked as hidden so it doesn't appear as a visible column in the UI.

This allows the _id metadata to be available in row data while keeping the table display clean. Updates the HTML React formatter to handle cells that exist in row data but not in the column definitions.

Adds comprehensive test coverage for all entity types (TableProvider, PrettyRow, and plain structs) to verify the _id column is properly included in the output data but hidden from the visible columns.

Refs: entity wrapping, table formatting
Introduce comprehensive stack trace support with language-agnostic parsing, styled rendering, and extensible source resolution. Adds StackTrace, StackFrame types and ParseJavaStackTrace parser to api package, with public convenience wrappers in clicky root. Includes support for frame filtering, context lines, and max frame truncation.

Also adds MultiFilter type for comma-separated flag values with include/exclude semantics, and fixes field value assignment to support type conversion in flags package.

Updates cache debug output to use task.GatedStderr() instead of os.Stderr to prevent log lines from breaking interactive renderer frame accounting. Fixes recursive struct handling in OpenAPI schema generation by tracking visited types.

Refs: stack trace rendering, source context, Java exception parsing
…port

Add shiki syntax highlighter and transformers to webapp dependencies for code block rendering. Implement comprehensive stack trace parsing and display with source resolution for Java exceptions. Add new demo showcases for code samples, label badges, documentation links, and parsed stack traces with configurable context and filtering. Update import paths and module resolution to use published clicky-ui distribution. Reorganize webapp navigation with semantic HTML and icon support.

Breaking changes:
- Update TypeScript path aliases to reference dist files instead of src
- Change clicky-ui import to use published api-explorer module
- Update CSS import to use distributed styles.css

Refs: Stack trace rendering feature, syntax highlighting integration
Introduce a Builder pattern for configuring MCP servers with a fluent API (NewMcpServer, WithExclude, WithInclude, AutoExpose, IgnoreParams, WithFormat, Build, Command).

Add a built-in 'discover-tools' MCP tool that returns a formatted catalogue of all registered tools with their parameters, defaults, and constraints. Supports multiple output formats (markdown, ansi, plain) via FormatOptions.

Add IgnoredParamRule and IgnoredParams config to strip parameters from MCP tool schemas (MCP-only, does not affect OpenAPI). Add Format config to apply server-wide format/color overrides to tool execution.

Refactor config path functions to be per-application (GetConfigPathFor, GetPromptsPathFor) so multiple clicky-based MCP servers don't share config files. Maintain backward compatibility with legacy GetConfigPath/GetPromptsPath.

Remove the special 'discover-tools' prompt and its inline handling from prompts.go and command.go, replacing it with the dedicated MCP tool. Remove Verbose flag from CommandOptions (use clicky's existing --loglevel/-v instead).

Includes comprehensive tests for Builder, IgnoredParams application, discover-tools rendering, and registry builtins.
… highlighting

Implement dedicated renderHTML() method for StackTrace to produce semantic HTML blocks with:
- Exception header in red banner
- Individual stack frames with bordered cards for source context
- Line-numbered source code with gutter and focal line highlighting
- Syntax highlighting via Code.HTML() when language is known

Add SourceLineNumbers field to StackFrame to support custom line numbering in source context.

Wrap XML formatter in formatXMLBestEffort() to gracefully handle malformed XML by falling back to original content while preserving syntax highlighting.

Fix flag value serialization in entity.go to properly round-trip slice-valued flags through CSV encoding, preventing bracket wrapping issues.

Refs: improved stack trace presentation and robustness
Add native StackTrace rendering to both HTML and React formatters:

- HTMLFormatter: new wrapHTMLBody() method wraps pre-rendered HTML fragments with Tailwind styling and CSS links
- HTMLFormatter.format(): detect StackTrace inputs and render them with structured HTML before falling back to Pretty interface
- HTMLReactFormatter: new clickyStackFrame struct and convertStackTrace() function to convert StackTrace objects to clicky nodes
- React HTML: add StackTrace component import and rendering logic to handle stacktrace nodes and stacktrace maps
- Update clicky-ui CDN version from @latest to @^0.2.1 for stability
- Add comprehensive test coverage for StackTrace conversion

This enables rich, semantic rendering of stack traces with syntax highlighting and source context instead of plain text output.
… support

Implement Server-Sent Events (SSE) transport alongside stdio for MCP servers, enabling Claude Desktop and other clients to connect via HTTP. Add `mcp tools` subcommand to preview tool catalogue with format options. Expand `mcp install` to support Claude, Codex, Gemini, Copilot, and Cursor clients with per-client config writers (JSON for most, TOML for Codex). Refactor config merging into reusable `loadCommandConfig` and `mergeInitialConfig` helpers to support both serve and tools commands. Remove built-in discover-tools tool in favor of dedicated `mcp tools` command for cleaner separation of concerns. Add comprehensive tests for SSE round-trip, install permutations across clients/transports, and config merging logic.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 5, 2026

Warning

Rate limit exceeded

@moshloop has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 58 minutes and 42 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 95b1f4f0-ebed-42b7-9c9d-8ec5737f6c43

📥 Commits

Reviewing files that changed from the base of the PR and between 8479a4f and 785cfaf.

⛔ Files ignored due to path filters (2)
  • examples/enitity/webapp/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
  • examples/uber_demo/go.sum is excluded by !**/*.sum
📒 Files selected for processing (31)
  • .gitignore
  • api/code.go
  • api/code_test.go
  • api/stacktrace.go
  • entity.go
  • examples/enitity/main.go
  • examples/enitity/webapp/package.json
  • examples/enitity/webapp/pnpm-workspace.yaml
  • examples/enitity/webapp/src/App.tsx
  • examples/enitity/webapp/src/index.css
  • examples/enitity/webapp/src/main.tsx
  • examples/enitity/webapp/tsconfig.json
  • examples/enitity/webapp/vite.config.ts
  • examples/uber_demo/main.go
  • formatters/html_formatter.go
  • formatters/html_react_formatter.go
  • formatters/html_react_formatter_test.go
  • mcp/builder.go
  • mcp/builder_test.go
  • mcp/command.go
  • mcp/command_test.go
  • mcp/config.go
  • mcp/discover_tools.go
  • mcp/discover_tools_test.go
  • mcp/install.go
  • mcp/install_test.go
  • mcp/prompts.go
  • mcp/registry.go
  • mcp/registry_test.go
  • mcp/server.go
  • mcp/sse_test.go
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr/mcp-improvements
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch pr/mcp-improvements

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Remove unused module entries from go.sum that are no longer referenced in the project. This reduces dependency bloat and improves build clarity.

Also add examples/enitity/enitity to .gitignore to exclude the compiled binary from version control.
@socket-security
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​@​shikijs/​transformers@​1.29.21001007392100

View full report

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