Skip to content

Show MCP server status via ribbon icon (ON/OFF) - #133

Open
laytonluo wants to merge 1 commit into
shuotao:mainfrom
laytonluo:feature/mcp-toggle-icon-status
Open

laytonluo wants to merge 1 commit into
shuotao:mainfrom
laytonluo:feature/mcp-toggle-icon-status

Conversation

@laytonluo

Copy link
Copy Markdown

Summary

  • The MCP toggle button ("MCP 服務 (開/關)") currently has no icon at all — only text — and the running/stopped state is only ever surfaced through a one-off TaskDialog popup, so there's no persistent visual indicator on the ribbon.
  • Adds an ON/OFF icon to the button's LargeImage, kept in sync with Application.SocketService.IsRunning.
  • The tooltip now shows the state plus the configured listening port (ConfigManager.Instance.Settings.Port).

Note on CI

I see check-pr.yml restricts fork PRs to domain/*.md and GEMINI.md only, so this PR (touching MCP/Application.cs, MCP/Commands/MCPCommands.cs, MCP/RevitMCP.csproj, and two new icon resources) is expected to fail that check. Opening it anyway per the repo owner's own request, so it's here for visibility/discretion rather than an auto-mergeable contribution — happy to close it, rework it into an Issue, or adjust however you'd prefer.

Test plan

  • Not build-verified locally — this machine only has the .NET 10 runtime, not the SDK that Nice3point.Revit.Sdk 6.1.0's build task requires (dotnet build -c Release.R24 fails with MSB4062 loading the SDK's own task assembly). The change itself is small (two BitmapImage swaps + a tooltip string), and mirrors the same pattern already applied and manually verified in a sibling project (revit-mcp-plugin).
  • Please build for at least one Revit version and confirm the ribbon button shows the OFF icon on startup, switches to ON on click with the correct port in the tooltip, and switches back on the second click.

🤖 Generated with Claude Code

The MCP toggle button has no icon at all today, only text, and the
running/stopped state is only ever shown in a one-off TaskDialog popup.
This adds an ON/OFF icon to the ribbon button itself, kept in sync with
Application.SocketService.IsRunning, plus a tooltip showing the
listening port from ConfigManager.Instance.Settings.Port.

Not build-verified locally: this machine lacks the .NET 10 SDK that
Nice3point.Revit.Sdk 6.1.0's build task requires; only the runtime is
installed. The change is small and mirrors the same pattern already
shipped in a sibling project (revit-mcp-plugin), but please run CI/
a local build before merging.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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