mcp-community-tools
Enables querying community and world databases via tools like get_top_10_highest_comments, fetch_countries, and get_random_name directly from GitHub Copilot in VS Code.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-community-toolsGet the top 10 highest comments"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Community Tools - Model Context Protocol Server
A professional-grade MCP (Model Context Protocol) server that provides tools for querying community and world databases. Designed with clean architecture patterns and ready for integration with GitHub Copilot.
๐ฏ Quick Start
1. Connect to GitHub Copilot (3 steps)
See QUICK_START.md for instant setup.
TL;DR:
Open VS Code Settings (Cmd+,)
Add this to
settings.json:
{
"github.copilot.mcp": [
{
"name": "mcp-community-tools",
"command": "${workspaceFolder}/.venv/bin/python3",
"args": ["${workspaceFolder}/hello_mcp.py"],
"env": {"PYTHONPATH": "${workspaceFolder}"}
}
]
}Restart VS Code
2. Ask Copilot
Now you can ask Copilot to use your tools:
"Get the top 10 highest comments"
"Show me 5 countries from Europe"
"Generate a random name"
Related MCP server: GitHub MCP TypeScript SDK Server
๐ Available Tools
Tool | Description | Example |
| Generate a random name |
|
| Get top 10 users by message count | Returns: Top 10 chatters |
| Query countries by region and limit |
|
๐๏ธ Project Structure
mcp-course/
โโโ hello_mcp.py # Main entry point (50 lines - clean!)
โโโ setup-copilot.sh # Auto-generate config helper
โโโ QUICK_START.md # 3-step Copilot integration
โโโ SETUP_COPILOT.md # Detailed setup guide
โโโ ARCHITECTURE.md # Design patterns & structure
โโโ INTEGRATION_DIAGRAM.md # Visual flow diagrams
โโโ REFACTORING_SUMMARY.md # Before/after comparison
โ
โโโ db_connection/
โ โโโ connection.py # Database Connection Factory
โ
โโโ repositories/
โ โโโ base_repository.py # Abstract Base Class
โ โโโ chatters_repository.py # Community data queries
โ โโโ countries_repository.py # World data queries
โ
โโโ tools/
โ โโโ tools.py # Tool implementations (DI)
โ
โโโ db/
โโโ community.db # Chatters data (251 records)
โโโ world.db # Countries data (250 records)โจ Key Features
๐ฏ Clean Architecture
Repository Pattern: Database access abstraction
Dependency Injection: Loose coupling between layers
Factory Pattern: Centralized connection management
SOLID Principles: All five principles applied
๐ก๏ธ Professional Code
โ Type hints throughout
โ Comprehensive error handling
โ Well-documented with docstrings
โ Easy to test and extend
๐ Ready for Production
โ Works with GitHub Copilot
โ Works with Claude Desktop
โ Works with any MCP-compatible client
โ Secure local execution
๐ Documentation
Document | Purpose |
Get Copilot working in 3 steps | |
Detailed setup & troubleshooting | |
Design patterns & principles | |
Visual flows and connections | |
Before/after code comparison |
๐ Running Locally
Prerequisites
Python 3.11+
Virtual environment (
venv)
Setup
# Clone and enter directory
cd /Users/souravkumar/WebstormProjects/mcp-course
# Activate virtual environment
source .venv/bin/activate
# Install dependencies (if needed)
pip install -r requirements.txtRun Server
python3 hello_mcp.pyOutput should show:
Server started on stdio๐ Integration Options
Option 1: GitHub Copilot in VS Code โ RECOMMENDED
See QUICK_START.md
Option 2: Claude Desktop App
See SETUP_COPILOT.md - Claude Desktop section
Option 3: Manual Testing
# Terminal 1: Start server
python3 hello_mcp.py
# Terminal 2: Test tools
curl -X POST http://localhost:3000/call \
-H "Content-Type: application/json" \
-d '{"tool": "get_top_10_highest_comments"}'๐พ Databases
community.db
SELECT * FROM chatters;
-- id, name, messages, last_message_at251 community members with activity tracking
world.db
SELECT * FROM countries;
-- id, name, iso2, iso3, capital, region, subregion, currency, currency_symbol, phonecode, emoji250 countries with detailed information
๐ ๏ธ Example Usage with Copilot
Example 1: Get Top Commenters
You: "Who are the top 10 most active community members?"
Copilot:
โ Calls: get_top_10_highest_comments()
โ Returns: Top 10 users with message counts
โ Shows: Their last activity timestampsExample 2: Find Countries
You: "Show me all European countries and their capitals"
Copilot:
โ Calls: fetch_countries(region="Europe")
โ Returns: All 50 European countries
โ Shows: Capital, currency, phone code, flag emojiExample 3: Generate Names
You: "Give me 5 random names"
Copilot:
โ Calls: get_random_name() (5 times)
โ Returns: 5 random names from the list๐๏ธ Architecture at a Glance
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GitHub Copilot / Claude โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Protocol (JSON-RPC)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ hello_mcp.py (Tool Registration) โ
โ โโ @mcp.tool() decorators โ
โ โโ Dependency injection setup โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ tools/tools.py (Business Logic) โ
โ โโ TopCommentsTool โ
โ โโ CountriesTool โ
โ โโ RandomNameTool โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ repositories/ (Data Access) โ
โ โโ ChattersRepository โ
โ โโ CountriesRepository โ
โ โโ BaseRepository (Abstract) โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ db_connection/ (Connection Factory) โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ db/ (SQLite Databases) โ
โ โโ community.db โ
โ โโ world.db โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ SOLID Principles Applied
โ
Single Responsibility: Each class has one reason to change
โ
Open/Closed: Open for extension, closed for modification
โ
Liskov Substitution: Repositories are interchangeable
โ
Interface Segregation: Minimal required interfaces
โ
Dependency Inversion: Depend on abstractions, not concretions
๐ Security
โ Local Execution: Runs on your machine only
โ No Data Upload: All data stays local
โ No Authentication: Local database access
โ Read-Only: Tools only query, don't modify data
๐งช Testing
Run Tests (when available)
pytest tests/Manual Testing
from repositories.chatters_repository import ChattersRepository
from db_connection.connection import DatabaseConnection
conn = DatabaseConnection.get_connection("community.db")
repo = ChattersRepository(conn)
results = repo.get_top_highest_comments(10)
print(results)
repo.close()๐ค Contributing
To add a new tool:
Create a Repository (if needed):
# repositories/my_data_repository.py class MyDataRepository(BaseRepository): def get_data(self): return self.execute_query("SELECT * FROM my_table")Create a Tool:
# In tools/tools.py class MyDataTool: def __init__(self, repository): self.repository = repository def execute(self): return self.repository.get_data()Register in hello_mcp.py:
@mcp.tool() def my_data_tool() -> list[dict]: conn = DatabaseConnection.get_connection("my_db.db") repo = MyDataRepository(conn) tool = MyDataTool(repo) return tool.execute()
๐ Troubleshooting
Common Issues
Issue | Solution |
"Tool not found" in Copilot | Restart VS Code completely (Cmd+Q) |
"ModuleNotFoundError" | Check PYTHONPATH in config |
Connection timeout | Verify |
Tools not available | Wait 10 seconds after restart for extension load |
For detailed troubleshooting, see SETUP_COPILOT.md
๐ License
MIT License - Feel free to use, modify, and distribute.
๐ Learning Resources
โ Quick Checklist
Read QUICK_START.md
Copy configuration to
settings.jsonRestart VS Code
Test with Copilot
Read ARCHITECTURE.md to understand design
Check INTEGRATION_DIAGRAM.md for visuals
๐ You're Ready!
Your MCP server is production-ready. Enjoy using it with GitHub Copilot! ๐
Questions? Check the documentation files or the troubleshooting section above.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sourav267/MCP-DEMO'
If you have feedback or need assistance with the MCP directory API, please join our Discord server