Skip to content

🐛 mcp-chat: tools missing depending on plugin startup order #8375

@patrickwyler

Description

@patrickwyler

Workspace

mcp-chat

📜 Description

The MCP Chat backend plugin fails to discover mcp actions registered by plugins after the plugin-mcp-chat-backend was initialized.

Possible solutions

  • Lazy tool discovery: Discover tool list on the first user interaction
  • Periodic rediscovery: Refresh the tool list periodically
  • Manual rediscovery function: provide a mechanism to refresh the tool list

Plugin versions

  • @backstage-community/plugin-mcp-chat: 0.6.0
  • @backstage-community/plugin-mcp-chat-backend: 0.8.0

Could be related to: #8297

👍 Expected behavior

The MCP Chat plugin discovers all registered actions

Image

👎 Actual Behavior with Screenshots

The plugin discovers the actions registered before the own plugin startup

Image

👟 Reproduction steps

Add the plugin-mcp-chat-backend before a plugin which provides mcp actions

backend.add(import('@backstage/plugin-mcp-actions-backend'));  ← registers actions
backend.add(import('@backstage-community/plugin-mcp-chat-backend'));  ← discovers actions
...
backend.add(import('@internal/plugin-xyz-backend'));     ← registers actions LATER AND WILL BE MISSING

index.ts

📃 Provide the context for the Bug.

The mcp-chat-backend discovers tools at startup and never re-discovers them. Plugins which register their actions after the tool discovery has already completed will be missing in the mcp-chat.

👀 Have you spent some time to check if this bug has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Are you willing to submit PR?

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions