Skip to main content
Glama
subh812

KLH Campus Assistant

by subh812

KLH Campus Assistant — MCP Demo

A Model Context Protocol (MCP) server for KLH University Hyderabad, built with FastMCP. It exposes 7 tools (CGPA calculator, schedule-conflict checker, study-group finder, course search, club finder, exam schedule, library lookup) and 2 resources (campus FAQ, curriculum requirements) over local stdio — no deployment, no network service, just Python.

Files

  • server.py — the MCP server. Run directly with python server.py (it will idle waiting for a client — that's expected).

  • client.py — a terminal demo that connects to the server and drives a scripted conversation through Claude.

  • web/app.py + web/index.html — a small FastAPI + browser chat UI for a live, on-screen demo.

  • requirements.txt — all dependencies for server, CLI client, and web demo.

Related MCP server: mydy-lms

Setup & Running the Demo

Requirements

Step 1: Install Dependencies

Open a terminal in this folder and run:

pip install -r requirements.txt

Step 2: Set Your API Key

You need to set your Anthropic API key as an environment variable:

On macOS/Linux:

export ANTHROPIC_API_KEY=sk-ant-...

(Replace sk-ant-... with your actual API key)

On Windows (Command Prompt):

set ANTHROPIC_API_KEY=sk-ant-...

On Windows (PowerShell):

$env:ANTHROPIC_API_KEY="sk-ant-..."

Step 3: Run the Terminal Demo (Fastest)

Run this command to see the MCP server in action with a scripted demo:

python client.py

This will automatically start the MCP server and walk through several examples:

  • CGPA calculation

  • Schedule conflict checking

  • Study group search

  • Club search

For a live, interactive demo with a visual UI:

# Navigate to the web folder
cd web

# Start the app (on Windows, use 'python -m uvicorn' instead)
uvicorn app:app --reload --port 8000

Then open your browser and go to http://localhost:8000

  • Paste your API key into the page

  • Chat with the assistant — every tool call appears as an expandable card

  • Try queries like:

    • "What's my CGPA?"

    • "Do I have any schedule conflicts?"

    • "Find study groups for Data Structures"

    • "List all clubs at KLH"

Troubleshooting

  • ModuleNotFoundError: Make sure you installed dependencies with pip install -r requirements.txt

  • API key errors: Verify your API key is set correctly (it should start with sk-ant-)

  • Port 8000 already in use: Try a different port: uvicorn app:app --reload --port 8001

Related MCP Connectors

Related MCP Servers