Skip to content

rmsr2004/mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UC Enrollment Assistant

Python SQLite LangChain MCP HTML JavaScript CSS

A conversational AI assistant designed to manage university enrollments, students, and courses. This project was developed as an assignment for the Systems Integration course within the Master's in Informatics Engineering at the University of Coimbra (FCTUC).

🏗 Architecture

The solution implements a modern, decoupled, three-tier architecture:

  1. Frontend (UI): A lightweight, vanilla HTML/CSS/JS single-page application that provides a chat interface for users.

  2. LangChain Agent (Middleware): A FastAPI-based service that handles memory, processes user prompts via a Large Language Model (LLM), and decides which backend tools to invoke.

  3. MCP Server (Backend): A Model Context Protocol (MCP) server that manages the core business logic and database interactions for the main entities: Student, Course, and Enrollment.

✨ Features

  • Natural Language Interface: Manage database records through plain English commands.

  • Contextual Memory: The LangChain agent remembers the current session, allowing for conversational follow-ups.

  • Separation of Concerns: The frontend communicates strictly with the LangChain Agent, ensuring the core MCP database server is completely abstracted from the client.

  • Entity Management:

    • Create, read, and list Students (Name, Age, Email).

    • Create, read, and list Courses (Title, Acronym).

    • Manage Enrollments (Linking students to courses with grading).

🚀 Getting Started

Prerequisites

  • Python 3.10+
  • uv or pip for Python dependency management.
  • A modern web browser.

1. Launch the MCP Server

The MCP Server acts as the core database handler and tool provider.

# Navigate to the mcp-server directory
cd src/mcp-server

# Install dependencies and start the server
uv sync
uv run main.py

(By default, this will run on the port specified in your config.conf or environment variables).

2. Start the LangChain Agent

The LangChain agent handles the AI logic and acts as a bridge between the frontend and the MCP server. It automatically starts the MCP server in stdio transport mode.

# Open a new terminal and navigate to the langchain-agent directory
cd src/langchain-agent

# Install dependencies and start the FastAPI application
uv sync
uv run main.py

(Ensure the agent is configured to point to the running MCP Server).

3. Launch the Frontend

No build step or dedicated web server is strictly necessary for the frontend.

  1. Navigate to the src/frontend folder.

  2. Open index.html directly in your web browser, or use a local development server (like VS Code Live Server) for a better experience.

  3. Ensure the API_BASE_URL in script.js matches the port where your LangChain Agent is running.

Usage Examples

Once the system is running, you can use the chat interface to execute commands such as:

  • "Create a student named Ana Silva with email ana@uc.pt"

  • "Create a course called Systems Integration with 6 credits"

  • "Enroll student 1 in course 1 with grade 18"

  • "List all students"

  • "Show all enrollments for Ana Silva"

📂 Project Structure

├── docs/                      # Assignment documentation and templates
└── src/
    ├── frontend/              # Client-side web application (HTML/CSS/JS)
    ├── langchain-agent/       # FastAPI LLM Agent middleware
    └── mcp-server/            # Core backend and database logic

About

AI assistant to manage university enrollments, students and courses. Systems Integration Course Assignment FCTUC 2025/2026

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors