BrettOJ/awesome-copilot-custom-mcp-server
If you are the rightful owner of awesome-copilot-custom-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This is an MCP server that retrieves GitHub Copilot customizations from the awesome-copilot repository.
MBS MCP Server: mbs-copilot-devcontext (aka Awesome Copilot)
This is an MCP server that retrieves GitHub Copilot customizations from the mbs-copilot-devcontext repository.
Install
Prerequisites
- .NET 9 SDK
- Visual Studio Code with
- C# Dev Kit extension
- Azure CLI
- Azure Developer CLI
- Docker Desktop
- GitHub Personal Access Token - Required for accessing the awesome-copilot repository via GitHub API
What's Included
Awesome Copilot MCP server includes:
| Building Block | Name | Description | Usage |
|---|---|---|---|
| Tools | search_instructions | Searches custom instructions based on keywords in their descriptions. | #search_instructions |
| Tools | load_instruction | Loads a custom instruction from the repository. | #load_instruction |
| Prompts | get_search_prompt | Get a prompt for searching copilot instructions. | /mcp.awesome-copilot.get_search_prompt |
Getting Started
Configuration
This MCP server uses the GitHub API to fetch custom instructions from the awesome-copilot repository. You need to configure a GitHub Personal Access Token to authenticate with the GitHub API.
GitHub Personal Access Token Setup
- Go to GitHub Settings > Tokens
- Click "Generate new token" (classic)
- For public repositories: No special scopes are needed
- For private repositories: Select the
reposcope - Copy the generated token
Development Environment Setup
For local development, create a .env file in the src/McpSamples.AwesomeCopilot.HybridApp directory:
cd $REPOSITORY_ROOT/awesome-copilot/src/McpSamples.AwesomeCopilot.HybridApp
cp .env.example .env
Edit the .env file and add your GitHub token:
GITHUB__TOKEN=your_github_token_here
Security Note: The
.envfile is automatically ignored by git. Never commit your token to source control.
Production Environment Setup
For Docker containers and Azure deployments, pass the token as an environment variable (see respective sections below).
Optional Configuration
You can override the default repository settings using environment variables:
GITHUB__REPOSITORYOWNER: Repository owner (default:github)GITHUB__REPOSITORYNAME: Repository name (default:awesome-copilot)GITHUB__BRANCH: Branch name (default:main)
For example, to use a different repository in your .env file:
GITHUB__TOKEN=your_github_token_here
GITHUB__REPOSITORYOWNER=myorg
GITHUB__REPOSITORYNAME=my-repo
GITHUB__BRANCH=develop
Getting repository root
-
Get the repository root.
# bash/zsh REPOSITORY_ROOT=$(git rev-parse --show-toplevel)# PowerShell $REPOSITORY_ROOT = git rev-parse --show-toplevel
Running MCP server
On a local machine
-
Make sure you have configured the
.envfile with your GitHub token (see Configuration section above). -
Run the MCP server app.
cd $REPOSITORY_ROOT/awesome-copilot dotnet run --project ./src/McpSamples.AwesomeCopilot.HybridAppNote:
- The application will fail at startup if
GITHUB__TOKENis not set in your.envfile - Make sure to take note of the absolute directory path of the
McpSamples.AwesomeCopilot.HybridAppproject
Parameters:
--http: The switch that indicates to run this MCP server as a streamable HTTP type. When this switch is added, the MCP server URL ishttp://localhost:5250.
With this parameter, you can run the MCP server like:
dotnet run --project ./src/McpSamples.AwesomeCopilot.HybridApp -- --http - The application will fail at startup if
In a container
-
Build the MCP server app as a container image.
cd $REPOSITORY_ROOT docker build -f Dockerfile.awesome-copilot -t awesome-copilot:latest . -
Run the MCP server app in a container.
Important: You must pass the GitHub token as an environment variable.
docker run -i --rm -p 8080:8080 \ -e GITHUB__TOKEN=your_github_token_here \ awesome-copilot:latestAlternatively, use the container image from the container registry.
docker run -i --rm -p 8080:8080 \ -e GITHUB__TOKEN=your_github_token_here \ ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:latestParameters:
--http: The switch that indicates to run this MCP server as a streamable HTTP type. When this switch is added, the MCP server URL ishttp://localhost:8080.-e GITHUB__TOKEN: Environment variable for GitHub authentication (required)-e GITHUB__REPOSITORYOWNER: Override repository owner (optional, default:github)-e GITHUB__REPOSITORYNAME: Override repository name (optional, default:awesome-copilot)-e GITHUB__BRANCH: Override branch name (optional, default:main)
With these parameters, you can run the MCP server like:
# use local container image with HTTP mode docker run -i --rm -p 8080:8080 \ -e GITHUB__TOKEN=your_github_token_here \ awesome-copilot:latest --http# use container image from the container registry with HTTP mode docker run -i --rm -p 8080:8080 \ -e GITHUB__TOKEN=your_github_token_here \ ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:latest --http# use custom repository docker run -i --rm -p 8080:8080 \ -e GITHUB__TOKEN=your_github_token_here \ -e GITHUB__REPOSITORYOWNER=myorg \ -e GITHUB__REPOSITORYNAME=my-repo \ ghcr.io/microsoft/mcp-dotnet-samples/awesome-copilot:latest --http
On Azure
-
Navigate to the directory.
cd $REPOSITORY_ROOT/awesome-copilot -
Login to Azure.
# Login with Azure Developer CLI azd auth login -
Set the GitHub token as an environment variable for deployment.
azd env set GITHUB__TOKEN your_github_token_hereOptionally, configure custom repository settings:
azd env set GITHUB__REPOSITORYOWNER myorg azd env set GITHUB__REPOSITORYNAME my-repo azd env set GITHUB__BRANCH develop -
Deploy the MCP server app to Azure.
azd upWhile provisioning and deploying, you'll be asked to provide subscription ID, location, environment name.
-
After the deployment is complete, get the information by running the following commands:
-
Azure Container Apps FQDN:
azd env get-value AZURE_RESOURCE_MCP_AWESOME_COPILOT_FQDN
Note: The GitHub token and other environment variables are securely stored and injected into the Azure Container Apps instance. You can update them later using the Azure Portal or Azure CLI.
-
Connect MCP server to an MCP host/client
VS Code + Agent Mode + Local MCP server
-
Copy
mcp.jsonto the repository root.For locally running MCP server (STDIO):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.stdio.local.json \ $REPOSITORY_ROOT/.vscode/mcp.jsonNew-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.stdio.local.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -ForceFor locally running MCP server (HTTP):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.http.local.json \ $REPOSITORY_ROOT/.vscode/mcp.jsonNew-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.http.local.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -ForceFor locally running MCP server in a container (STDIO):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.stdio.container.json \ $REPOSITORY_ROOT/.vscode/mcp.jsonNew-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.stdio.container.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -ForceFor locally running MCP server in a container (HTTP):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.http.container.json \ $REPOSITORY_ROOT/.vscode/mcp.jsonNew-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.http.container.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -ForceFor remotely running MCP server in a container (HTTP):
mkdir -p $REPOSITORY_ROOT/.vscode cp $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.http.remote.json \ $REPOSITORY_ROOT/.vscode/mcp.jsonNew-Item -Type Directory -Path $REPOSITORY_ROOT/.vscode -Force Copy-Item -Path $REPOSITORY_ROOT/awesome-copilot/.vscode/mcp.http.remote.json ` -Destination $REPOSITORY_ROOT/.vscode/mcp.json -Force -
Open Command Palette by typing
F1orCtrl+Shift+Pon Windows orCmd+Shift+Pon Mac OS, and searchMCP: List Servers. -
Choose
awesome-copilotthen clickStart Server. -
When prompted, enter one of the following values:
- The absolute directory path of the
McpSamples.AwesomeCopilot.HybridAppproject - The FQDN of Azure Container Apps.
- The absolute directory path of the
-
Use a prompt by typing
/mcp.awesome-copilot.get_search_promptand enter keywords to search. You'll get a prompt like:Please search all the chatmodes, instructions and prompts that are related to the search keyword, `{keyword}`. Here's the process to follow: 1. Use the `awesome-copilot` MCP server. 1. Search all chatmodes, instructions, and prompts for the keyword provided. 1. DO NOT load any chatmodes, instructions, or prompts from the MCP server until the user asks to do so. 1. Scan local chatmodes, instructions, and prompts markdown files in `.github/chatmodes`, `.github/instructions`, and `.github/prompts` directories respectively. 1. Compare existing chatmodes, instructions, and prompts with the search results. 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: | Exists | Mode | Filename | Title | Description | |--------|--------------|------------------------|---------------|---------------| | ✅ | chatmodes | chatmode1.json | ChatMode 1 | Description 1 | | ❌ | instructions | instruction1.json | Instruction 1 | Description 1 | | ✅ | prompts | prompt1.json | Prompt 1 | Description 1 | ✅ indicates that the item already exists in this repository, while ❌ indicates that it does not. 1. If any item doesn't exist in the repository, ask which item the user wants to save. 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. -
Confirm the result.