From 6574b3c89a42e4a3822120902e03f2c58c558f4b Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Tue, 14 Jul 2026 14:54:47 +1000 Subject: [PATCH] Adding the awesome copilot MCP server to our plugin and showing that in the rendered page --- eng/generate-website-data.mjs | 29 +++++++++++++++++-- .../.github/plugin/plugin.json | 3 +- plugins/awesome-copilot/.mcp.json | 14 +++++++++ .../src/components/pages/IncludedItems.astro | 3 +- 4 files changed, 45 insertions(+), 4 deletions(-) create mode 100644 plugins/awesome-copilot/.mcp.json diff --git a/eng/generate-website-data.mjs b/eng/generate-website-data.mjs index fb138806..1f3659da 100755 --- a/eng/generate-website-data.mjs +++ b/eng/generate-website-data.mjs @@ -500,7 +500,7 @@ function resolvePluginItem(item, resourceIndex) { return { ...item, - title: match?.title || candidateId || item.path, + title: match?.title || item.title || candidateId || item.path, detailUrl: match?.url || null, }; } @@ -614,12 +614,37 @@ function generatePluginsData(gitDates, resourceIndex = {}) { ]; }); - // Build items list from spec fields (agents, commands, skills) + // Parse mcpServers: supports a path to a .mcp.json file or an inline object + const mcpItems = []; + if (data.mcpServers) { + let mcpServersObj = null; + if (typeof data.mcpServers === "string") { + const mcpJsonPath = path.join(pluginDir, data.mcpServers.replace(/^\.\//, "")); + if (fs.existsSync(mcpJsonPath)) { + try { + const mcpJson = JSON.parse(fs.readFileSync(mcpJsonPath, "utf-8")); + mcpServersObj = mcpJson.mcpServers || mcpJson; + } catch { + // ignore parse errors + } + } + } else if (typeof data.mcpServers === "object") { + mcpServersObj = data.mcpServers; + } + if (mcpServersObj) { + for (const serverName of Object.keys(mcpServersObj)) { + mcpItems.push({ kind: "mcp", path: serverName, title: serverName }); + } + } + } + + // Build items list from spec fields (agents, commands, skills, mcpServers) const items = [ ...agentItems, ...(data.commands || []).map((p) => ({ kind: "prompt", path: p })), ...(data.skills || []).map((p) => ({ kind: "skill", path: p })), ...extensionItems, + ...mcpItems, ].map((item) => resolvePluginItem(item, resourceIndex)); const tags = data.keywords || data.tags || []; diff --git a/plugins/awesome-copilot/.github/plugin/plugin.json b/plugins/awesome-copilot/.github/plugin/plugin.json index 87dd1b43..def06d7d 100644 --- a/plugins/awesome-copilot/.github/plugin/plugin.json +++ b/plugins/awesome-copilot/.github/plugin/plugin.json @@ -21,5 +21,6 @@ "./skills/suggest-awesome-github-copilot-agents/", "./skills/suggest-awesome-github-copilot-instructions/", "./skills/suggest-awesome-github-copilot-skills/" - ] + ], + "mcpServers": "./.mcp.json" } diff --git a/plugins/awesome-copilot/.mcp.json b/plugins/awesome-copilot/.mcp.json new file mode 100644 index 00000000..905c6126 --- /dev/null +++ b/plugins/awesome-copilot/.mcp.json @@ -0,0 +1,14 @@ +{ + "mcpServers": { + "awesome-copilot": { + "type": "stdio", + "command": "docker", + "args": [ + "run", + "-i", + "--rm", + "ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:latest" + ] + } + } +} diff --git a/website/src/components/pages/IncludedItems.astro b/website/src/components/pages/IncludedItems.astro index 118d95f1..39be97c8 100644 --- a/website/src/components/pages/IncludedItems.astro +++ b/website/src/components/pages/IncludedItems.astro @@ -21,9 +21,10 @@ const KIND_LABELS: Record = { hook: "Hooks", prompt: "Commands", extension: "Extensions", + mcp: "MCP Servers", }; -const KIND_ORDER = ["agent", "skill", "instruction", "hook", "prompt", "extension"]; +const KIND_ORDER = ["agent", "skill", "instruction", "hook", "prompt", "extension", "mcp"]; function githubHref(itemPath: string): string { const normalized = itemPath.replace(/^\.\/+/, "").replace(/\/+$/, "");