A FastMCP server providing GitHub Copilot tips and tricks via the Model Context Protocol. Built for O'Reilly teaching demonstrations.
- 📚 46 curated tips across 6 categories (Prompting, Shortcuts, Code Gen, Chat, Context, Security)
- 🔍 Resources — List categories and stats
- 🛠️ Tools — Search, filter, random tips, delete/reset
- 💬 Prompts — Task suggestions, category exploration, learning paths
- 🎯 Elicitations — Interactive guided discovery with real MCP elicitations
- 📝 Logging — Structured logging to file and console for debugging
- 🧪 26 unit tests with pytest
# Windows (PowerShell 7+)
cd src
pwsh .\setup.ps1# macOS/Linux
cd src
chmod +x setup.sh
./setup.shThis creates a .venv virtual environment and installs dependencies.
python copilot_tips_server.pyThe server runs via stdio transport (standard MCP protocol).
The MCP Inspector provides a web UI for testing your server interactively:
python start_inspector.pyNote for Windows users:
If you are running commands from outside the src directory, or if your project is not located at C:\github\copilot-dev\src, you may need to adjust the path to match your local setup. For example, if your project is in a different folder, navigate to that directory first:
cd path\to\your\copilot-dev\src
python start_inspector.pyThis will:
- ✅ Check for Node.js 18+ (shows version)
- ✅ Verify the port is actually available before using it
- ✅ Validate server script and Python executable exist
- 🚀 Launch the inspector web UI
- 🔗 Connect to your MCP server automatically
Open the URL shown in the terminal (e.g., http://localhost:52341).
pytest test_copilot_tips_server.py -vAll 26 tests should pass.
The server includes structured logging to help with debugging and monitoring:
- Log Location:
logs/mcp_server.log - Log Level: INFO (configurable via code)
- Outputs: Both file and console
Logs include:
- Server initialization
- Tool invocations with parameters
- Search results and patterns
- Errors and warnings
- Tip access patterns
View logs:
# Tail the log file
tail -f logs/mcp_server.log
# On Windows PowerShell
Get-Content logs/mcp_server.log -Wait -Tail 20- Click Resources tab
- Click
tips://categoriesto see all tip categories - Click
tips://statsto see tip counts by category and difficulty
- Click Tools tab
- Select a tool and fill in parameters:
| Tool | Parameters | Description |
|---|---|---|
get_tip_by_id |
tip_id: e.g., prompt-001 |
Get specific tip |
get_tip_by_topic |
search_term: e.g., chat |
Search tips |
get_random_tip |
category, difficulty (optional) |
Random tip |
delete_tip |
tip_id |
Delete tip (in-memory) |
reset_tips |
(none) | Restore deleted tips |
interactive_tip_finder |
(uses elicitation) | Guided tip discovery |
guided_random_tip |
(uses elicitation) | Random tip with prompts |
- Click Run to execute
Note: The interactive_tip_finder and guided_random_tip tools use MCP elicitations to prompt you for input. These require client support for elicitations.
- Click Prompts tab
- Select a prompt template:
tip_suggestion— Get tips for a specific taskcategory_explorer— Deep dive into a categorylearning_path— Personalized learning plan
The server is pre-configured for VS Code:
- Debug: Press
F5and select "🚀 Run MCP Server" - Tasks:
Ctrl+Shift+P→ "Tasks: Run Task" → choose setup/run tasks - MCP Client: The
.vscode/mcp.jsonconfigures the server for Copilot Chat
VS Code automatically activates the venv in new terminals. If not working:
Ctrl+Shift+P→ "Python: Select Interpreter"- Choose
src/.venv/Scripts/python.exe - Reload window
src/
├── copilot_tips_server.py # Main FastMCP server (resources, tools, prompts)
├── test_copilot_tips_server.py # Pytest test suite (26 tests)
├── start_inspector.py # Robust inspector launcher
├── setup.ps1 # Windows setup script (pwsh)
├── setup.sh # Unix setup script
├── pyproject.toml # Python project config
├── README.md # This file
└── data/
└── copilot_tips.json # Tips database (46 tips, 6 categories)
Tips are stored in data/copilot_tips.json:
{
"tips": [
{
"id": "prompt-001",
"title": "Provide Top-Level Comments",
"description": "Add a high-level comment...",
"category": "Prompting Techniques",
"difficulty": "beginner"
}
]
}Categories: Prompting Techniques, IDE Shortcuts, Code Generation, Chat Features, Workspace Context, Security & Privacy
Difficulty levels: beginner, intermediate, advanced
Install Node.js 18+ from https://nodejs.org/ and restart your terminal. The inspector shows detailed error messages if npx isn't working.
The Python extension may not detect the venv. Select the interpreter manually or reload the window.
The inspector now verifies port availability before use. If issues persist, close other inspector instances or processes using ports in the 49152-65535 range.
Check the terminal output for error details. Common issues:
- Server script not found (verify
copilot_tips_server.pyexists) - Python venv not created (run
setup.ps1orsetup.sh) - Node.js version too old (need 18+)
- Python 3.10+
- Node.js 18+ (for MCP Inspector)
- PowerShell 7+ (Windows) or Bash (Unix)
┌─────────────────┐ stdio ┌──────────────────────┐
│ MCP Inspector │◄──────────────►│ copilot_tips_server │
│ (Web UI) │ │ (FastMCP/Python) │
└─────────────────┘ └──────────┬───────────┘
│
▼
┌──────────────────────┐
│ data/copilot_tips │
│ .json (46 tips) │
└──────────────────────┘
MIT