From 09f4072274ad5ca7b37e34ea5a8a232ff685ad1a Mon Sep 17 00:00:00 2001 From: Andre Wanlin Date: Thu, 18 Jun 2026 13:18:39 -0500 Subject: [PATCH] Add AiResource and MCP server API examples Install @backstage/plugin-catalog-backend-module-ai-model and add example entities for the AiResource kind (skills from the Backstage .well-known/skills directory) and an MCP server API (GitHub MCP Server). Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Andre Wanlin --- app-config.yaml | 21 +++++- examples/ai-resources.yaml | 137 ++++++++++++++++++++++++++++++++++ examples/mcp-server-api.yaml | 20 +++++ packages/backend/package.json | 1 + packages/backend/src/index.ts | 1 + yarn.lock | 12 +++ 6 files changed, 191 insertions(+), 1 deletion(-) create mode 100644 examples/ai-resources.yaml create mode 100644 examples/mcp-server-api.yaml diff --git a/app-config.yaml b/app-config.yaml index d893578c1..36ede9db0 100644 --- a/app-config.yaml +++ b/app-config.yaml @@ -125,7 +125,18 @@ auth: catalog: readonly: true rules: - - allow: [Component, API, System, Domain, Resource, Location, User, Group] + - allow: + [ + Component, + API, + System, + Domain, + Resource, + Location, + User, + Group, + AiResource, + ] locations: # Backstage example components - type: url @@ -155,6 +166,14 @@ catalog: - type: url target: https://github.com/backstage/demo/blob/master/catalog-info.yaml + # Backstage AI Resources (skills for AI coding tools) + - type: url + target: https://github.com/backstage/demo/blob/master/examples/ai-resources.yaml + + # Backstage MCP Server API examples + - type: url + target: https://github.com/backstage/demo/blob/master/examples/mcp-server-api.yaml + # The backstage library repository - type: url target: https://github.com/backstage/backstage/blob/master/catalog-info.yaml diff --git a/examples/ai-resources.yaml b/examples/ai-resources.yaml new file mode 100644 index 000000000..bc6472af2 --- /dev/null +++ b/examples/ai-resources.yaml @@ -0,0 +1,137 @@ +apiVersion: backstage.io/v1alpha1 +kind: AiResource +metadata: + name: mui-to-bui-migration + title: MUI to BUI Migration + description: Migrate Backstage plugins from Material-UI (MUI) to Backstage UI (BUI) + annotations: + backstage.io/source-location: url:https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/mui-to-bui-migration + links: + - url: https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/mui-to-bui-migration + title: Skill Source +spec: + type: skill + lifecycle: production + owner: backstage/maintainers + system: backstage + disciplines: + - web + categories: + - migration + agents: + - claude-code +--- +apiVersion: backstage.io/v1alpha1 +kind: AiResource +metadata: + name: app-frontend-system-migration + title: App Frontend System Migration + description: Migrate a Backstage app from the old frontend system to the new one + annotations: + backstage.io/source-location: url:https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/app-frontend-system-migration + links: + - url: https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/app-frontend-system-migration + title: Skill Source +spec: + type: skill + lifecycle: production + owner: backstage/maintainers + system: backstage + disciplines: + - web + categories: + - migration + agents: + - claude-code +--- +apiVersion: backstage.io/v1alpha1 +kind: AiResource +metadata: + name: plugin-new-frontend-system-support + title: Plugin New Frontend System Support + description: Add new frontend system support to an existing Backstage plugin while keeping the old system working + annotations: + backstage.io/source-location: url:https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/plugin-new-frontend-system-support + links: + - url: https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/plugin-new-frontend-system-support + title: Skill Source +spec: + type: skill + lifecycle: production + owner: backstage/maintainers + system: backstage + disciplines: + - web + categories: + - migration + agents: + - claude-code +--- +apiVersion: backstage.io/v1alpha1 +kind: AiResource +metadata: + name: plugin-full-frontend-system-migration + title: Plugin Full Frontend System Migration + description: Fully migrate a Backstage plugin to the new frontend system, dropping all old system support + annotations: + backstage.io/source-location: url:https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/plugin-full-frontend-system-migration + links: + - url: https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/plugin-full-frontend-system-migration + title: Skill Source +spec: + type: skill + lifecycle: production + owner: backstage/maintainers + system: backstage + disciplines: + - web + categories: + - migration + agents: + - claude-code +--- +apiVersion: backstage.io/v1alpha1 +kind: AiResource +metadata: + name: plugin-analytics-instrumentation + title: Plugin Analytics Instrumentation + description: Instrument a Backstage frontend plugin with analytics events using the Backstage Analytics API + annotations: + backstage.io/source-location: url:https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/plugin-analytics-instrumentation + links: + - url: https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/plugin-analytics-instrumentation + title: Skill Source +spec: + type: skill + lifecycle: production + owner: backstage/maintainers + system: backstage + disciplines: + - web + categories: + - observability + agents: + - claude-code +--- +apiVersion: backstage.io/v1alpha1 +kind: AiResource +metadata: + name: onboard-to-openapi-server + title: Onboard to OpenAPI Server + description: Migrate an existing Backstage backend plugin to typed OpenAPI tooling + annotations: + backstage.io/source-location: url:https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/onboard-to-openapi-server + links: + - url: https://github.com/backstage/backstage/tree/master/docs/.well-known/skills/onboard-to-openapi-server + title: Skill Source +spec: + type: skill + lifecycle: production + owner: backstage/maintainers + system: backstage + disciplines: + - web + categories: + - api + agents: + - claude-code diff --git a/examples/mcp-server-api.yaml b/examples/mcp-server-api.yaml new file mode 100644 index 000000000..8d1800e0b --- /dev/null +++ b/examples/mcp-server-api.yaml @@ -0,0 +1,20 @@ +apiVersion: backstage.io/v1alpha1 +kind: API +metadata: + name: github-mcp-server + title: GitHub MCP Server + description: | + GitHub's official MCP server providing tools for repository management, + file operations, issues, pull requests, code search, and more. + links: + - url: https://github.com/github/github-mcp-server + title: GitHub Repository + - url: https://modelcontextprotocol.io + title: MCP Specification +spec: + type: mcp-server + lifecycle: production + owner: backstage/maintainers + remotes: + - type: streamable-http + url: https://api.githubcopilot.com/mcp/ diff --git a/packages/backend/package.json b/packages/backend/package.json index 5fbc58611..2ef072820 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -27,6 +27,7 @@ "@backstage/plugin-auth-backend-module-github-provider": "backstage:^", "@backstage/plugin-auth-backend-module-guest-provider": "backstage:^", "@backstage/plugin-catalog-backend": "backstage:^", + "@backstage/plugin-catalog-backend-module-ai-model": "backstage:^", "@backstage/plugin-catalog-backend-module-backstage-openapi": "backstage:^", "@backstage/plugin-catalog-backend-module-github": "backstage:^", "@backstage/plugin-catalog-backend-module-logs": "backstage:^", diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index 9fde13901..a580a8ce0 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -11,6 +11,7 @@ backend.add(import('@backstage/plugin-catalog-backend')); backend.add( import('@backstage/plugin-catalog-backend-module-backstage-openapi'), ); +backend.add(import('@backstage/plugin-catalog-backend-module-ai-model')); backend.add(import('@backstage/plugin-catalog-backend-module-logs')); backend.add(import('@backstage/plugin-catalog-backend-module-github')); backend.add( diff --git a/yarn.lock b/yarn.lock index efa62955f..5b65cee74 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3824,6 +3824,17 @@ __metadata: languageName: node linkType: hard +"@backstage/plugin-catalog-backend-module-ai-model@backstage:^::backstage=1.52.0&npm=0.1.1, @backstage/plugin-catalog-backend-module-ai-model@npm:^0.1.1": + version: 0.1.1 + resolution: "@backstage/plugin-catalog-backend-module-ai-model@npm:0.1.1" + dependencies: + "@backstage/backend-plugin-api": "npm:^1.9.2" + "@backstage/catalog-model": "npm:^1.9.0" + "@backstage/plugin-catalog-node": "npm:^2.2.2" + checksum: 10/31d5e58767081f538da837f099ac3613eefa7bda450d4c34e76455fcf0270670f73637063e2c032ab5284b585b9c46b74347d89ef004b517ca07e5b1003a8521 + languageName: node + linkType: hard + "@backstage/plugin-catalog-backend-module-backstage-openapi@backstage:^::backstage=1.52.0&npm=0.5.15, @backstage/plugin-catalog-backend-module-backstage-openapi@npm:^0.5.15": version: 0.5.15 resolution: "@backstage/plugin-catalog-backend-module-backstage-openapi@npm:0.5.15" @@ -17620,6 +17631,7 @@ __metadata: "@backstage/plugin-auth-backend-module-github-provider": "backstage:^" "@backstage/plugin-auth-backend-module-guest-provider": "backstage:^" "@backstage/plugin-catalog-backend": "backstage:^" + "@backstage/plugin-catalog-backend-module-ai-model": "backstage:^" "@backstage/plugin-catalog-backend-module-backstage-openapi": "backstage:^" "@backstage/plugin-catalog-backend-module-github": "backstage:^" "@backstage/plugin-catalog-backend-module-logs": "backstage:^"