|
| 1 | +# MCP Server: Awesome Copilot |
| 2 | + |
| 3 | +This is an MCP server that retrieves GitHub Copilot customizations from the [awesome-copilot](https://github.com/github/awesome-copilot) repository. |
| 4 | + |
| 5 | +## Install |
| 6 | + |
| 7 | +[](https://aka.ms/awesome-copilot/mcp/vscode) [](https://aka.ms/awesome-copilot/mcp/vscode-insiders) |
| 8 | + |
| 9 | +## Prerequisites |
| 10 | + |
| 11 | +- [.NET 10 SDK](https://dotnet.microsoft.com/download/dotnet/10.0) |
| 12 | +- Aspire CLI nightly: `iex "& { $(irm https://aspire.dev/install.ps1) } -Quality dev"` |
| 13 | +- [Visual Studio Code](https://code.visualstudio.com/) with |
| 14 | + - [C# Dev Kit](https://marketplace.visualstudio.com/items/?itemName=ms-dotnettools.csdevkit) extension |
| 15 | +- [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/install-azd) |
| 16 | +- [Docker Desktop](https://docs.docker.com/get-started/get-docker/) |
| 17 | + |
| 18 | +## What's Included |
| 19 | + |
| 20 | +Awesome Copilot MCP server includes: |
| 21 | + |
| 22 | +| Building Block | Name | Description | Usage | |
| 23 | +| -------------- | --------------------- | --------------------------------------------------------------------- | ---------------------------------------- | |
| 24 | +| Tools | `search_instructions` | Searches custom instructions based on keywords in their descriptions. | `#search_instructions` | |
| 25 | +| Tools | `load_instruction` | Loads a custom instruction from the repository. | `#load_instruction` | |
| 26 | +| Prompts | `get_search_prompt` | Get a prompt for searching copilot instructions. | `/mcp.awesome-copilot.get_search_prompt` | |
| 27 | + |
| 28 | +## Getting Started |
| 29 | + |
| 30 | +- [Getting repository root](#getting-repository-root) |
| 31 | +- [Running MCP server](#running-mcp-server) |
| 32 | + - [On a local machine](#on-a-local-machine) |
| 33 | + - [In a container](#in-a-container) |
| 34 | + - [On Azure](#on-azure) |
| 35 | +- [Connect MCP server to an MCP host/client](#connect-mcp-server-to-an-mcp-hostclient) |
| 36 | + - [VS Code + Agent Mode + Local MCP server](#vs-code--agent-mode--local-mcp-server) |
| 37 | + |
| 38 | +### Running MCP server |
| 39 | + |
| 40 | +#### On a local machine |
| 41 | + |
| 42 | +1. Run the MCP server app using Aspire. |
| 43 | + |
| 44 | + ```bash |
| 45 | + aspire run |
| 46 | + ``` |
| 47 | + |
| 48 | +Once running, the Aspire dashboard will be loaded in your default web browser, or you can click the URL provided in the terminal. From here, you'll have access to the MCP server endpoint, logs and metrics. |
| 49 | + |
| 50 | +#### In a container |
| 51 | + |
| 52 | +1. Build the MCP server app as a container image. |
| 53 | + |
| 54 | + ```bash |
| 55 | + cd mcp-server |
| 56 | + docker build -f Dockerfile -t awesome-copilot:latest . |
| 57 | + ``` |
| 58 | + |
| 59 | +1. Run the MCP server app in a container. |
| 60 | + |
| 61 | + ```bash |
| 62 | + docker run -i --rm -p 8080:8080 awesome-copilot:latest |
| 63 | + ``` |
| 64 | + |
| 65 | + Alternatively, use the container image from the container registry. |
| 66 | + |
| 67 | + ```bash |
| 68 | + docker run -i --rm -p 8080:8080 ghcr.io/github/awesome-copilot:latest |
| 69 | + ``` |
| 70 | + |
| 71 | +#### On Azure |
| 72 | + |
| 73 | +1. Navigate to the directory. |
| 74 | + |
| 75 | + ```bash |
| 76 | + cd mcp-server |
| 77 | + ``` |
| 78 | + |
| 79 | +1. Login to Azure. |
| 80 | + |
| 81 | + ```bash |
| 82 | + # Login with Azure Developer CLI |
| 83 | + azd auth login |
| 84 | + ``` |
| 85 | + |
| 86 | +1. Deploy the MCP server app to Azure. |
| 87 | + |
| 88 | + ```bash |
| 89 | + azd up |
| 90 | + ``` |
| 91 | + |
| 92 | + While provisioning and deploying, you'll be asked to provide subscription ID, location, environment name. |
| 93 | + |
| 94 | +1. After the deployment is complete, get the information by running the following commands: |
| 95 | + |
| 96 | + - Azure Container Apps FQDN: |
| 97 | + |
| 98 | + ```bash |
| 99 | + azd env get-value AZURE_RESOURCE_MCP_AWESOME_COPILOT_FQDN |
| 100 | + ``` |
| 101 | + |
| 102 | +### Connect MCP server to an MCP host/client |
| 103 | + |
| 104 | +#### Install the MCP server: |
| 105 | + |
| 106 | +[](https://aka.ms/awesome-copilot/mcp/vscode) [](https://aka.ms/awesome-copilot/mcp/vscode-insiders) |
| 107 | + |
| 108 | +1. Open Command Palette by typing `F1` or `Ctrl`+`Shift`+`P` on Windows or `Cmd`+`Shift`+`P` on Mac OS, and search `MCP: List Servers`. |
| 109 | +1. Choose `awesome-copilot` then click `Start Server`. |
| 110 | +1. When prompted, enter one of the following values: |
| 111 | + - The absolute directory path of the `AwesomeCopilot.McpServer` project |
| 112 | + - The FQDN of Azure Container Apps. |
| 113 | +1. Use a prompt by typing `/mcp.awesome-copilot.get_search_prompt` and enter keywords to search. You'll get a prompt like: |
| 114 | +
|
| 115 | + ```text |
| 116 | + Please search all the chatmodes, instructions and prompts that are related to the search keyword, `{keyword}`. |
| 117 | +
|
| 118 | + Here's the process to follow: |
| 119 | + |
| 120 | + 1. Use the `awesome-copilot` MCP server. |
| 121 | + 1. Search all chatmodes, instructions, and prompts for the keyword provided. |
| 122 | + 1. DO NOT load any chatmodes, instructions, or prompts from the MCP server until the user asks to do so. |
| 123 | + 1. Scan local chatmodes, instructions, and prompts markdown files in `.github/chatmodes`, `.github/instructions`, and `.github/prompts` directories respectively. |
| 124 | + 1. Compare existing chatmodes, instructions, and prompts with the search results. |
| 125 | + 1. Provide a structured response in a table format that includes the already exists, mode (chatmodes, instructions or prompts), filename, title and description of each item found. Here's an example of the table format: |
| 126 | +
|
| 127 | + | Exists | Mode | Filename | Title | Description | |
| 128 | + |--------|--------------|------------------------|---------------|---------------| |
| 129 | + | ✅ | chatmodes | chatmode1.json | ChatMode 1 | Description 1 | |
| 130 | + | ❌ | instructions | instruction1.json | Instruction 1 | Description 1 | |
| 131 | + | ✅ | prompts | prompt1.json | Prompt 1 | Description 1 | |
| 132 | +
|
| 133 | + ✅ indicates that the item already exists in this repository, while ❌ indicates that it does not. |
| 134 | +
|
| 135 | + 1. If any item doesn't exist in the repository, ask which item the user wants to save. |
| 136 | + 1. If the user wants to save it, save the item in the appropriate directory (`.github/chatmodes`, `.github/instructions`, or `.github/prompts`) using the mode and filename, with NO modification. |
| 137 | + ``` |
| 138 | +
|
| 139 | +1. Confirm the result. |
0 commit comments