delight2004/runyankole_mcp_server
3.1
If you are the rightful owner of runyankole_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 project is a Model Context Protocol (MCP) server designed to be a personalized AI tutor for learning Runyakole/Rukiga.
π£οΈ Runyakole/Rukiga Language Tutor Server
π Overview
This project is a Model Context Protocol (MCP) server designed to be a personalized AI tutor for learning Runyakole/Rukiga. It uses your custom language data to provide highly accurate and contextualized explanations via Google Gemini, tackling the scarcity of digital resources for less commonly spoken languages.
β¨ Features
- π€ Customizable Knowledge Base: Load your own Runyakole/Rukiga dictionary, grammar, and phrases from
runyakole_rukiga_data.txt
. - π§ Intelligent Context Management: Combines your language data with user queries for targeted LLM prompts.
- βοΈ Google Gemini Integration: Leverages Gemini for AI-powered explanations and learning.
- π RESTful API: Clear endpoints for easy integration with front-end apps or mobile clients.
- π Secure API Key Handling: Uses
.env
for storing your Gemini API key safely. - β»οΈ Reloadable Data: Update your language data without restarting the server.
π οΈ Technologies
- Python 3.x
- Flask (Web Framework)
- Flask-CORS (CORS handling)
- Requests (HTTP client)
- python-dotenv (Environment variables)
- Google Gemini API (LLM)
βοΈ Setup & Installation
1. Clone the Repository
git clone https://github.com/delight2004/runyankole_mcp_server.git
cd runyankole_mcp_server
2. Install Dependencies
pip install Flask Flask-CORS requests python-dotenv
# OR
pip install -r requirements.txt
3. Get Gemini API Key
Sign in to Google AI Studio
Generate and copy your Gemini API key.
4. Configure Environment Variable
Create a .env file in the project root:
GEMINI_API_KEY="YOUR_ACTUAL_GEMINI_API_KEY_HERE"
> β
Note: .env is already in .gitignore and will not be pushed to GitHub.
5. Create Language Knowledge Base
Create runyakole_rukiga_data.txt in the root directory and add your custom language knowledge.
Example:
--- Runyakole/Rukiga Language Knowledge Base ---
Greetings:
- Hello (singular): Oraire ota
- Hello (plural): Muraire muta
- I am fine: Ndi kurungi
Basic Vocabulary:
- Person: Omuntu (singular), Abantu (plural)
- Water: Amaizi
Grammar Notes:
- Noun Classes: 'Om-'/'Ab-' for people (e.g., Omuntu, Abantu).
---
π Running the Server
python app.py
The server will be live at:
http://127.0.0.1:5000
---
π API Endpoints
POST /teach_me_runyakole
Description: Query the AI tutor with a language-related question.
Request Body:
{
"query": "How do I say 'thank you'?"
}
Example cURL:
curl -X POST -H "Content-Type: application/json" \
-d '{"query": "What does 'Amaizi' mean?"}' \
http://127.0.0.1:5000/teach_me_runyakole
Response:
{
"runyakole_tutor_response": "The AI's answer based on your knowledge base."
}
---
POST /reload_knowledge_base
Description: Reloads runyakole_rukiga_data.txt without restarting the server.
Example cURL:
curl -X POST http://127.0.0.1:5000/reload_knowledge_base
---
GET /health
Description: Checks if the server is running.
Example cURL:
curl http://127.0.0.1:5000/health
---
β‘οΈ Next Steps (Ideas π‘)
π₯οΈ Web UI: Build a simple front-end for smoother interaction.
π§ Advanced Context: Add semantic search or embeddings.
β° Spaced Repetition: Track learning progress over time.
π Text-to-Speech: Add audio pronunciation with TTS.
βοΈ Deployment: Host the server on Google Cloud Run, Render, etc.
---
π Happy Learning!
Letβs preserve and modernize our local languages, one prompt at a time β¨
---
Let me know if you'd like a badge pack (e.g., `Made with Python`, `Built with Gemini`, `Powered by MCP`) or a license section added!