feat(mcp-capabilities): add MCP Capabilities plugins#9732
Conversation
Signed-off-by: Evgeny Shevyakov <jh.sh@me.com>
Signed-off-by: Evgeny Shevyakov <jh.sh@me.com>
Signed-off-by: Evgeny Shevyakov <jh.sh@me.com>
Changed Packages
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new workspaces/mcp-capabilities workspace that adds a three-package plugin suite (frontend, backend, common) to enrich native API / spec.type: mcp-server catalog entities with discovered MCP server capabilities (tools/resources/prompts), exposing both a persisted summary (catalog enrichment) and live details (on-demand backend route + UI tab).
Changes:
- Added backend support to discover MCP server capabilities via streamable-http (JSON-RPC + SSE-aware parsing), including a catalog processor for entity enrichment and a
/api/mcp-capabilities/specroute for live spec retrieval. - Added a new-frontend-system UI (pure Backstage UI / BUI) that renders an overview card plus a “Capabilities” entity tab (tools/resources/prompts).
- Added a shared common package with types + a catalog model layer that additively extends the native
mcp-serverschema viaupdateKind.
Reviewed changes
Copilot reviewed 53 out of 58 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| workspaces/mcp-capabilities/tsconfig.json | Workspace TypeScript configuration for the new MCP capabilities workspace. |
| workspaces/mcp-capabilities/README.md | Workspace-level documentation describing the suite and how it works. |
| workspaces/mcp-capabilities/plugins/README.md | Standard plugins folder README. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/utils/dedent.ts | Frontend utility to dedent docstring-like Markdown safely. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/utils/dedent.test.ts | Unit tests for the dedent behavior. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/setupTests.ts | Frontend test setup. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/plugin.tsx | Frontend plugin registration + entity extensions (card + tab). |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/index.ts | Frontend package exports. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/components/SchemaTable.tsx | Renders JSON schema properties as a BUI table. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/components/MCPToolsContent.tsx | Capabilities entity content tab rendering tools/resources/prompts. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/components/MCPServerOverviewCard.tsx | Overview card rendering persisted capability summary from entity spec. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/components/Markdown.tsx | Markdown renderer using BUI primitives plus dedent. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/src/api.ts | Frontend API client for /api/mcp-capabilities/spec. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/report.api.md | API extractor report for the frontend package. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/README.md | Frontend package README (installation, screenshots, exports). |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/package.json | Frontend package manifest and dependencies. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/dev/index.tsx | Frontend dev app entrypoint. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities/.eslintrc.js | Frontend package ESLint config. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/src/types.ts | Shared type definitions for MCP tools/resources/prompts/spec/enrichment. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/src/setupTests.ts | Common package test setup. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/src/model/mcpServerEnrichmentModelLayer.ts | Catalog model layer extending native mcp-server schema via updateKind. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/src/index.ts | Common package exports + package documentation header. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/report.api.md | API extractor report for the common package. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/README.md | Common package README and registration instructions. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/package.json | Common package manifest and dependencies. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-common/.eslintrc.js | Common package ESLint config. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/setupTests.ts | Backend package test setup. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/service/createRouter.ts | Backend router exposing /spec endpoint for live MCP discovery. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/processor/McpServerCapabilitiesProcessor.ts | Catalog processor that enriches mcp-server entities with a cached summary. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/processor/McpServerCapabilitiesProcessor.test.ts | Unit tests for enrichment behavior and caching/graceful skip. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/plugin.ts | Backend plugin definition mounting the router under /api/mcp-capabilities. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/module.ts | Catalog module registering the enrichment processor. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/lib/MCPClient.ts | MCP streamable-http client (handshake + capability-gated discovery). |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/lib/MCPClient.test.ts | Unit tests for handshake, SSE parsing, and error handling. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/src/index.ts | Backend package exports. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/report.api.md | API extractor report for the backend package. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/README.md | Backend package README and installation/configuration guidance. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/package.json | Backend package manifest and dependencies. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/dev/index.ts | Backend dev setup with mocked auth + mock catalog entity. |
| workspaces/mcp-capabilities/plugins/mcp-capabilities-backend/.eslintrc.js | Backend package ESLint config. |
| workspaces/mcp-capabilities/package.json | Workspace package manifest and repo scripts for local development. |
| workspaces/mcp-capabilities/bcp.json | Workspace Backstage community plugin metadata/settings. |
| workspaces/mcp-capabilities/backstage.json | Workspace Backstage version pin. |
| workspaces/mcp-capabilities/.yarnrc.yml | Workspace Yarn settings. |
| workspaces/mcp-capabilities/.prettierignore | Workspace prettier ignore patterns. |
| workspaces/mcp-capabilities/.gitignore | Workspace gitignore. |
| workspaces/mcp-capabilities/.eslintrc.js | Workspace-level ESLint config. |
| workspaces/mcp-capabilities/.eslintignore | Workspace ESLint ignore patterns. |
| workspaces/mcp-capabilities/.dockerignore | Workspace dockerignore. |
| workspaces/mcp-capabilities/.changeset/README.md | Changesets scaffolding README. |
| workspaces/mcp-capabilities/.changeset/config.json | Changesets configuration for the workspace. |
| workspaces/mcp-capabilities/.changeset/add-mcp-capabilities.md | Changeset describing the new plugin suite release. |
| .github/CODEOWNERS | Adds codeowners entry for the new workspace. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Evgeny Shevyakov <jh.sh@me.com>
Signed-off-by: Evgeny Shevyakov <jh.sh@me.com>
| const mcpToolsContent = EntityContentBlueprint.make({ | ||
| name: 'mcp-tools', | ||
| params: { | ||
| path: '/mcp-capabilities', |
| const { entity } = useEntity(); | ||
| const spec = (entity.spec ?? {}) as EnrichedSpec; | ||
| const caps = spec.capabilities ?? {}; | ||
| const remote = spec.remotes?.[0]; | ||
|
|
| </Text> | ||
| ), | ||
| em: ({ children }) => <Text as="em">{children}</Text>, | ||
| a: ({ href, children }) => <Link href={href ?? '#'}>{children}</Link>, |
| } | ||
|
|
||
| const remote = getRemote(entity); | ||
| logger.info(`Discovering MCP server ${entityRef} at ${remote.url}`); |
awanlin
left a comment
There was a problem hiding this comment.
Hi @jh-sh, thanks for the contribution. Before moving forward with this can you please bring it up during the next Framework SIG as I feel this might be better as part of the core and not a community plugin. 👍
|
Hey, @awanlin! You're quite insightful, contributing to the core is actually a final goal ;) |
|
Hi @jh-sh, I'd much prefer that you didn't and get resolution on the path forward first. There's nothing preventing you from working on this branch in your fork, I'm sure if you check the GitHub docs it's pretty easy to get the CI up and running there. I'd also suggest you convert this to a Draft will you work though the decision process. Just something to consider, very much giving you the benefit of the doubt, but if you knew that having this in core was your intended goal would it not have been a more considerate approach to have logged the issue in the main repo first? |
|
Ok, I'll convert that into a draft until PR is discussed on SIG and we have some grounds to decide next major steps. As for your second question: I owe you a pardon for misleading. |
Signed-off-by: Evgeny Shevyakov <jh.sh@me.com>
Hey, I just made a Pull Request!
Adds a new
workspaces/mcp-capabilitiesworkspace with three plugins that enrichnative MCP server catalog entities (
kind: API,spec.type: mcp-server) withtheir live capabilities fetch — the tools, resources, and prompts each server
exposes. It builds on the upstream native
mcp-serverkind rather thanintroducing a new kind or a separate page.
On UI part, it extends what is available for the user in terms of mcp-discovery:
MCP Server Info card:
Tools, Resources, and Prompts tabs:
What's inside
@backstage-community/plugin-mcp-capabilities-backend— connects to eachserver over the MCP streamable-http transport (JSON-RPC handshake, SSE-aware,
session handling). A catalog processor writes the discovered summary onto
the entity (powering the card + search); an on-demand router,
GET /api/mcp-capabilities/spec?entityRef=…, returns the full livetool/resource/prompt detail. Both read
spec.remotesoff the entity, so theserver URL lives in one place. Unreachable servers are skipped gracefully.
@backstage-community/plugin-mcp-capabilities— frontend for the newfrontend system, built with pure Backstage UI (BUI). Two entity extensions
(shown only for
spec.type: mcp-server): an MCP Server Info overview cardand a Capabilities tab listing tools (with Markdown descriptions +
input-schema tables), resources, and prompts.
@backstage-community/plugin-mcp-capabilities-common— shared types and acatalog model layer that additively extends the native
mcp-serverschemavia
updateKind(deep-merged), so existing entities stay valid. It addsoptional
specfields:capabilities,serverInfo,instructions,tool/resource/prompt counts, and a flat
toolNameslist for catalog search.How it works
Each
mcp-serverAPI entity declares its endpoint inspec.remotes. The backenddiscovers what the server offers; the model layer makes the summary a valid part
of the entity's schema; the frontend renders both the persisted summary (card)
and the live detail (tab).
Credits
Made at EPAM, with love for the community. ❤️
Notes for reviewers
only (matching what
backstage-cli newscaffolds). Legacy-frontend-systemsupport is a planned step. We may go for follow-up PR or upcoming commits within this PR.
the enrichment processor (merge / graceful-skip / caching), and the docstring
dedent. The model-layer deep-merge itself is Backstage behaviour and is covered
by upstream
catalog-modeltests, so it isn't re-tested here.AgentCore Gateway / SigV4) are not yet signed — discovery skips them gracefully
and
/specreturns an error for them. Per-remote auth is a planned enhancement.✔️ Checklist
frontend plugin README
(
docs/): MCP Server Info card + Capabilities tab (tools / resources / prompts).Signed-off-byline in the message.