Skip to main content
Glama
IshaanShivalli

college-tools-mcp

대학 관리 AI 어시스턴트 (v5)

Google Gemini 및 MCP(Model Context Protocol) 기반으로 하는 지능형 대학 행정 어시스턴트입니다. 이 어시스턴트는 구조화된 FastMCP 도구를 통해 관계형 SQLite 데이터베이스와 상호작용하며, 학생, 교수, 강좌, 수강 신청, 학업 성적에 관한 문의를 처리합니다.


아키텍처 개요

+-------------------------------------------------------------+
|                      User / Client                          |
+-------------------------------------------------------------+
                              |
                              v
+-------------------------------------------------------------+
|                   Gemini LLM Assistant                      |
|                         (bot.py)                            |
+-------------------------------------------------------------+
                              |
                     MCP Protocol (stdio)
                              |
                              v
+-------------------------------------------------------------+
|                     FastMCP Server                          |
|                      (tooling.py)                           |
+-------------------------------------------------------------+
                              |
                        SQLite Queries
                              |
                              v
+-------------------------------------------------------------+
|                   College SQLite Database                   |
|                        (college.db)                         |
|   - persons (students, faculty, staff)                      |
|   - courses                                                 |
|   - student_enrollments                                     |
+-------------------------------------------------------------+

Related MCP server: College AI Assistant

주요 기능

  • 합성 데이터 생성: Faker를 사용하여 학생, 교수, 강좌, 성적 내역을 포함한 실제와 유사한 대학 기록을 생성합니다.

  • FastMCP 도구: 학사 기록, 강좌, 학과, 수강 통계를 질의할 수 있는 견고하고 스키마를 준수하는 MCP 도구를 제공합니다.

  • 대화형 멀티 턴 봇: Google GenAI SDK(google-genai)를 사용하며 MCP를 통한 자동 도구 호출을 구현하는 채팅 인터페이스입니다.

  • 안전한 구성: .env 지원과 함께 환경 변수 기반 API 키 관리를 제공합니다.


프로젝트 구조

.
├── bot.py                   # Interactive Gemini chatbot integrating MCP tools via stdio
├── tooling.py               # FastMCP Server exposing database querying tools
├── create_data.py           # SQLite database schema initializer & synthetic data generator
├── college.db               # SQLite database file (generated by create_data.py)
├── system_prompt.txt        # System instruction prompt for the AI assistant
├── prompt.txt               # Context and initial project design prompts
├── mcp_config.example.json  # Example configuration for MCP client registration
├── requirements.txt         # Python package dependencies
├── .env                     # Environment variables (GEMINI_API_KEY)
└── .gitignore               # Git ignore file for Python, SQLite, and secrets

데이터베이스 스키마

SQLite 데이터베이스(college.db)에는 다음과 같은 관계형 테이블이 포함되어 있습니다:

  1. persons: 학생, 교수, 직원 프로필(ID, 이름, 이메일, 전화, 생년월일, 성별, 주소, 역할)을 저장합니다.

  2. courses: 강좌 목록(ID, 강좌 코드, 강좌명, 학과, 학점, 담당 강사)을 저장합니다.

  3. student_enrollments: 수강 정보(수강 ID, 학생 ID, 강좌 ID, 수강 일자, 학점, 학기)를 저장합니다.


사용 가능한 MCP 도구 (tooling.py)

  • get_student_info(student_id_or_name): 학Knowing ID 또는 성명으로 학생 정보를 조회합니다.

  • get_course_details(course_code_or_name): 강좌 상세 정보와 담당 교수 정보를 확인합니다.

  • get_student_enrollments(student_id_or_name): 수강한 강좌와 학점 목록을 확인합니다.

  • get_students_by_course(course_code_or_name): 특정 강좌에 수강한 학생 목록을 조회합니다.

  • list_courses_by_department(department): 특정 학과의 모든 강좌 목록을 조회합니다.

  • get_courses_taught_by_faculty(faculty_id_or_name): 특정 교사가 가르치는 강좌 목록을 확인합니다.

  • search_persons(query, role): 학생, 교수, 직원 등 여러 역할에 걸쳐 인물을 검색합니다.

  • get_course_statistics(course_code_or_name): 요약 통계(총 등록 인원, 성적 분포)를 제공합니다.

  • list_all_courses(): 모든 대학 강좌의 전체 목록을 확인합니다.

  • execute_custom_sql_query(query): 복잡한 집계를 위한 읽기 전용 쿼리 실행 기능입니다.


설치 및 설정

1. 사전 설치 조건

2. 의존성 설치

pip install -r requirements.txt

3. 환경 변수 설정

프로젝트 루트의 .env 파일을 생성하거나 편집합니다.

GEMINI_API_KEY=your_actual_gemini_api_key_here

4. 합성 데이터베이스 생성

합성 데이터를 사용하여 데이터베이스를 초기화합니다:

python create_data.py

사용법

대화형 AI 봇 실행

python bot.py

학술 또는 행정 질문을 입력하세요 (예: "컴퓨터 과학의 모든 과목을 보여줘" 또는 "John Doe가 받은 성적은 무엇인가?"). exit 또는 quit를 입력하면 세션이 종료됩니다.

MCP 서버로 연결 (예: IDE / Claude Desktop / Antigravity)

mcp_config.example.json을 참조하여 MCP 클라이언트 설정에 tooling.py를 등록합니다.

{
  "mcpServers": {
    "college-tools-mcp": {
      "command": "python",
      "args": [
        "-Wignore",
        "<FULL_PATH_TO>/tooling.py"
      ]
    }
  }
}

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides MCP tools for searching student profiles, viewing marks/attendance, and finding low-attendance students. Enables AI assistants like Gemini to interact with college student data through natural language.
    -
  • F
    license
    Not graded
    quality
    B
    maintenance
    MCP server exposing a university course catalog with tools for searching courses, looking up prerequisites and instructors, and generating prerequisite graphs, plus resources and a prompt template for AI academic advisors.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables LLM agents to safely query educational administration databases through read-only MCP tools, enforcing SQL whitelisting, automatic LIMIT caps, parameterized queries, timeouts, token authentication, and audit logging.
    -