Skip to content

Commit 93b2728

Browse files
authored
Initial commit
0 parents  commit 93b2728

27 files changed

Lines changed: 1710 additions & 0 deletions

.devcontainer/devcontainer.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"name": "Python 3",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.13-bookworm",
4+
"features": {
5+
"ghcr.io/devcontainers/features/node:1": {
6+
"version": "latest"
7+
},
8+
"ghcr.io/devcontainers/features/docker-in-docker:2": {
9+
"moby": false
10+
}
11+
},
12+
"forwardPorts": [8000],
13+
"postCreateCommand": "pip install -r requirements.txt",
14+
"customizations": {
15+
"vscode": {
16+
"extensions": [
17+
"GitHub.copilot",
18+
"GitHub.copilot-chat",
19+
"ms-python.python",
20+
"ms-python.debugpy",
21+
"dbaeumer.vscode-eslint"
22+
],
23+
"settings": {
24+
"chat.agent.enabled": true,
25+
"chat.mcp.enabled": true
26+
}
27+
}
28+
}
29+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Missing School Pride
2+
3+
The website is blue, but our school colors are white and lime green. Please fix this.
4+
5+
Also, why are none of our mascots on the page?
6+
Please use the various options from https://octodex.github.com/
7+
8+
Oh one more idea, I think it would look cool if the background had various Git-style branch lines slowly animating! That's easy, right?
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Hard to change activities
2+
3+
Teachers are afraid to modify the program since they think they might break it. Move the list of activities out of the python file into a dedicated `activities.json` file.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Add filters
2+
3+
There seems to be no order to the activities. Please fix this.
4+
5+
Here are my ideas, maybe in a toolbar above the activity cards.
6+
7+
- Add some filters, for example by category. If needed, add a field to the JSON.
8+
- Add options to sort, for example by name or time. If needed, add a date field but leave the textual description version of the time.
9+
- Add a free text search.
10+
11+
Obviously, make sure it still looks good on desktop and phone.
12+
13+
----- COMMENTS -----
14+
This will be so useful. We should be proactive and do this before the list gets even longer.
15+
Let's do it! I would love to help out. I just took a coding class. 🤓
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Admin Mode
2+
3+
## Problem
4+
5+
Students are removing each other to free up space for themselves in the activities.
6+
7+
## Recommended Solution
8+
9+
Add a user icon in the top right. When clicked it shows a login button. When the login button is clicked, it presents a window to enter a username and password.
10+
11+
- Only the teachers (logged in) have the ability to register and unregister students to activities.
12+
13+
- The students (not logged in) can still view who is registered.
14+
15+
- There is no need for an account maintenance page. Teachers will be assigned passwords.
16+
17+
## Context
18+
19+
Since there is no database yet, please store the teacher usernames and passwords in a `json` file that is checked by the backend.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 🚨 Missing Activity: GitHub Skills
2+
3+
The GitHub Skills activity announced by our principal is missing from the school activities signup page.
4+
5+
Yesterday in the school assembly, the principal announced a new partnership with GitHub to teach students practical coding and collaboration skills. However, when I try to sign up for this activity, I can't find it on the website.
6+
7+
I can see several other activities, like these, so I think I have access.
8+
9+
- ✅ Chess Club
10+
- ✅ Programming Class
11+
- ✅ Gym Class
12+
13+
## ⏱️ Timeline
14+
15+
This is time-sensitive as the announcement mentioned registrations would close by the end of this week. Many students are eager to join. It's the first part of our [GitHub Certifications program](https://resources.github.com/learn/certifications/), which will help with college applications.
16+
17+
## 💡 Expected Outcome
18+
19+
The GitHub Skills activity should be added to the system and available for registration like other activities
20+
21+
Hewbie C.
22+
11th Grade Student
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Prettier Interface
2+
3+
Now that we have many activities, the list on the left is too long so it is hard to navigate. And the add dialog is far away from the activity.
4+
5+
- Move the cards to the bottom
6+
7+
- Remove the registration form and replace it with a "register student" button on each activity card.
8+
9+
- Make sure it looks good on desktop and phone.
10+
11+
----- COMMENTS -----
12+
I second this idea. I'm having trouble finding my activity.
13+
100% support this. Nice idea! Looking forward to the update.
14+
Don't forget about tablet's too.

.github/steps/1-step.md

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
## Step 1: Introduction to MCP and environment setup
2+
3+
<img width="150" align="right" alt="copilot logo" src="https://github.com/user-attachments/assets/4d22496d-850b-4785-aafe-11cba03cd5f2" />
4+
5+
In the [Getting Started with GitHub Copilot](https://github.com/skills/getting-started-with-github-copilot) exercise, we were introduced to the Mergington High School's extracurricular activities website, which allowed students to sign up for events.
6+
7+
And now we have a problem... but.. it's a good one! More teachers are asking to use it! 🎉
8+
9+
Our fellow teachers have lots of ideas but we can't seem to keep up with all the requests! 😮 To fix this issue, lets give GitHub Copilot an upgrade by enabling Model Context Protocol (MCP). To be more specific, we will add the GitHub MCP server, which will enable a combined workflow of issue management and website upgrades. 🧑‍🚀
10+
11+
Let's get started!
12+
13+
### 📖 Theory: What is Model Context Protocol (MCP)?
14+
15+
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is often referred to as "USB-C for AI" - a universal connector that allows GitHub Copilot (and other AI tools) to seamlessly interact with other services.
16+
17+
Essentially, it is a way to describe the capabilities and requirements of a service, so AI tools can easily determine what methods to use and to accurately provide the parameters. An MCP server is providing that interface.
18+
19+
```mermaid
20+
graph LR
21+
A[Developer] -->|Uses| B[GitHub Copilot]
22+
B -->|Unified API| MCP[Model Context Protocol]
23+
24+
MCP <-->|Unique API| C[(GitHub)]
25+
MCP <-->|Unique API| D[(Slack)]
26+
MCP <-->|Unique API| E[(Figma)]
27+
28+
style B fill:#4CAF50,stroke:#333,stroke-width:2px
29+
30+
subgraph "Less Context Switching, More Coding"
31+
B
32+
MCP
33+
C
34+
D
35+
E
36+
37+
end
38+
```
39+
40+
### :keyboard: Activity: Get to know your environment
41+
42+
Before we dive into MCP, let's start up our development environment and refamiliarize ourself with the extracurricular activity application.
43+
44+
1. Right-click the below button to open the **Create Codespace** page in a new tab. Use the default configuration.
45+
46+
[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/{{full_repo_name}}?quickstart=1)
47+
48+
1. Validate the **Copilot Chat** and **Python** extensions are installed and enabled.
49+
50+
<img width="300" alt="copilot extension for VS Code" src="https://github.com/user-attachments/assets/ef1ef984-17fc-4b20-a9a6-65a866def468" /><br/>
51+
<img width="300" alt="python extension for VS Code" src="https://github.com/user-attachments/assets/3040c0f5-1658-47e2-a439-20504a384f77" />
52+
53+
1. Verify our application runs before modification. In the left sidebar, select the **Run and Debug** tab and then press the **Start Debugging** icon.
54+
55+
<details>
56+
<summary>📸 Show screenshot</summary><br/>
57+
58+
<img width="300" alt="run and debug" src="https://github.com/user-attachments/assets/50b27f2a-5eab-4827-9343-ab5bce62357e" />
59+
60+
</details>
61+
62+
<details>
63+
<summary>🤷 Having trouble?</summary><br/>
64+
65+
If the **Run and Debug** area is empty, try reloading VS Code: Open the command palette (`Ctrl`+`Shift`+`P`) and search for `Developer: Reload Window`.
66+
67+
<img width="300" alt="empty run and debug panel" src="https://github.com/user-attachments/assets/0dbf1407-3a97-401a-a630-f462697082d6" />
68+
69+
</details>
70+
71+
1. Use the **Ports** tab to find the webpage address, open it, and verify it is running.
72+
73+
<details>
74+
<summary>📸 Show screenshot</summary><br/>
75+
76+
<img width="350" alt="ports tab" src="https://github.com/user-attachments/assets/8d24d6b5-202d-4109-8174-2f0d1e4d8d44" />
77+
78+
![Screenshot of Mergington High School WebApp](https://github.com/user-attachments/assets/5cb88d53-d948-457e-9f4b-403d697fa93a)
79+
80+
</details>
81+
82+
### :keyboard: Activity: Add the GitHub MCP server
83+
84+
1. Inside your codespace, open the **Copilot Chat** panel and verify **Agent** mode is selected.
85+
86+
<img width="200" alt="image" src="https://github.com/user-attachments/assets/201e08ab-14a0-48bf-824e-ba4f8f43f8ab" />
87+
88+
<details>
89+
<summary>Agent mode missing?</summary><br/>
90+
91+
- Verify VS Code is at least `v1.99.0`.
92+
- Verify the Copilot extension is at least `v1.296.0`.
93+
- Check if Agent mode is enabled in your [user or workspace settings](https://code.visualstudio.com/docs/configure/settings#_workspace-settings).
94+
95+
<img width="300" alt="image" src="https://github.com/user-attachments/assets/407a79dd-707e-471b-b56b-1938aece4ad8" />
96+
97+
</details>
98+
99+
1. Inside your codespace, navigate to the `.vscode` folder, and create a new file named `mcp.json`. Paste the following contents:
100+
101+
📄 **.vscode/mcp.json**
102+
103+
```json
104+
{
105+
"servers": {
106+
"github": {
107+
"type": "http",
108+
"url": "https://api.githubcopilot.com/mcp/"
109+
}
110+
}
111+
}
112+
```
113+
114+
1. In the `.vscode/mcp.json` file, click the **Start** button and accept the prompt to authenticate with GitHub. This has just informed GitHub Copilot of the MCP server's capabilities.
115+
116+
<img width="350" alt="mcp.json file showing start button" src="https://github.com/user-attachments/assets/15a3d885-1c13-40b4-8d59-87b478ddd8a0" />
117+
118+
<img width="350" alt="allow authentication prompt" src="https://github.com/user-attachments/assets/f5ec128d-9924-454b-8ab4-3f43ebc83cfc" /><br/>
119+
120+
<img width="350" alt="mcp.json file showing running server" src="https://github.com/user-attachments/assets/c413c52d-94dc-429f-91e0-3486141908b9" />
121+
122+
1. In the Copilot side panel, click the **🛠️ icon** to show the additional capabilities.
123+
124+
<img width="350" alt="image" src="https://github.com/user-attachments/assets/b1be8b80-c69c-4da5-9aea-4bbaa1c6de10" />
125+
126+
<img width="350" alt="image" src="https://github.com/user-attachments/assets/99178d1b-adbe-4cf4-ab9c-3a4d29918a13" />
127+
128+
1. **Commit** and **push** the `.vscode/mcp.json` file to the `main` branch.
129+
130+
> 🪧 **Note:** Pushing directly to `main` is not a recommended practice. It is only to simplify this exercise.
131+
132+
1. Now that your MCP server configuration is pushed to GitHub, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.
133+
134+
> [!NOTE]
135+
> The next steps will involve creating GitHub issues. If you would like to avoid notification emails, you can unwatch the repository.
136+
137+
<details>
138+
<summary>Having trouble?</summary><br/>
139+
140+
Make sure:
141+
142+
- Your `.vscode/mcp.json` file is similar to the example provided.
143+
- You pushed the changes to the `main` branch.
144+
145+
</details>

.github/steps/2-step.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
## Step 2: Agent Mode and an MCP Server for GitHub
2+
3+
Great work! You just connected your first MCP server to GitHub Copilot! 🎉
4+
5+
🚨 The teachers have been busy opening new issues in your repository with bugs and feature requests! Go [take a look](https://github.com/{{full_repo_name}}/issues) - so many good ideas!
6+
7+
We should probably look into them and start researching for other upgrades. Fortunately, with an MCP server for GitHub, triaging these and even doing some research to get ahead should be pretty quick! 🕵️
8+
9+
### 📖 Theory: How MCP Tool Calling Works in Agent Mode
10+
11+
Now that we have the GitHub MCP connected, let's look at how **agent mode** actually uses these external tools.
12+
13+
With every prompt you send, Copilot also includes the catalog (list + schema) of available tools. Copilot can then plan and decide:
14+
15+
- Is any tool needed for this request?
16+
- Which tool(s) best match the intent?
17+
- What arguments (per each tool's input schema) should be passed?
18+
19+
Copilot then executes the chosen tool call(s) and streams results back to the LLM.
20+
21+
![Flowchart diagram illustrating how a user interacts with Copilot Agent Mode](https://github.blog/wp-content/uploads/2025/05/how-it-works.png)
22+
23+
> [!TIP]
24+
> You can also explicitly nudge Copilot to call a specific tool by including `#<tool_name>` in your prompt (e.g `#create_pull_request`, `#codebase`).
25+
26+
From here, Copilot can use a set of GitHub‑aware tools to do more than just read or edit code in your repo. Here are a few things you can ask it to do:
27+
28+
- Discover similar public projects to get inspiration.
29+
- Search issues considering description, comments, and likes.
30+
- Turn the new ideas you like into issues right away so you don’t lose them.
31+
- Retrieve an issue, make changes on a branch, and start a pull request.
32+
33+
Isn't that cool?! Now let's do it! 👩‍🚀
34+
35+
### :keyboard: Activity: Quickly find and save ideas
36+
37+
Let's put the GitHub MCP server to use by researching, comparing, and capturing enhancement ideas!
38+
39+
1. Close any open files inside your codespace. This will help reduce unnecessary context.
40+
41+
1. Ensure the **Copilot Chat** panel is open and **Agent** mode is selected. Verify the MCP server tools are also still available.
42+
43+
1. Ask Copilot to search GitHub for projects similar to this one.
44+
45+
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
46+
>
47+
> ```prompt
48+
> Search for any other repositories for organizing extra curricular activities
49+
> ```
50+
51+
1. When an MCP tool is required, Copilot may ask for permission. **Verify the request** and modify if necessary, then click **Continue**.
52+
53+
<img width="250" alt="request permission dialog" src="https://github.com/user-attachments/assets/229473af-c206-47a4-b356-943b9c9bd946" />
54+
55+
1. Ask Copilot to describe one of the projects. Explore until you find something you like.
56+
57+
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
58+
>
59+
> ```prompt
60+
> Please look at the code for the 3rd option and give me a detailed description of the features.
61+
> ```
62+
63+
1. Use Copilot to compare and generate ideas for enhancements.
64+
65+
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
66+
>
67+
> ```prompt
68+
> Please compare these features to our project. Which would be new?
69+
> ```
70+
71+
1. Nice! Let's have Copilot create issues to save these ideas.
72+
73+
> ![Static Badge](https://img.shields.io/badge/-Prompt-text?style=social&logo=github%20copilot)
74+
>
75+
> ```prompt
76+
> I like it. Let's create issues for these in my repository.
77+
> ```
78+
79+
1. Copilot will ask for permission to create issues on your repository. Click **Continue** for each new issue. Reminder: **verify the request** before running.
80+
81+
<img width="250" alt="request permission dialog" src="https://github.com/user-attachments/assets/52635294-950a-4168-b71e-498eb769f3af" />
82+
83+
1. Since we are done researching, let's finish this chat session to clear the context. At the top of the **Copilot Chat** panel, click the **New Chat** icon (plus sign).
84+
85+
1. With the new issues created, Mona should already be busy checking your work. Give her a moment and keep watch in the comments. You will see her respond with progress info and the next lesson.
86+
87+
> [!NOTE]
88+
> The Model Context Protocol (MCP) landscape is quickly evolving. Many servers, including the [Official GitHub MCP server](https://github.com/github/github-mcp-server) are in active development and do not have full parity with their stable APIs.

0 commit comments

Comments
 (0)