Provides an MCP bridge to the Flex Student Portal for querying academic data via AI assistants.
Configuration
View docs{
"mcpServers": {
"ahtishamdilawar-nuces-flex-mcp": {
"command": "python",
"args": [
"C:/path/to/FLEX/server.py"
],
"env": {
"FLEX_ROLL_NO": "22F-XXXX",
"FLEX_PASSWORD": "your_password"
}
}
}
}You can run a Python-based MCP server that connects your Flex Student Portal to AI assistants like Claude Desktop or GitHub Copilot. This enables natural-language queries about your academic data, with actions like checking attendance, viewing marks, or generating a transcript, all through an MCP client you already use.
- Start your MCP client (Claude Desktop or Copilot). - When you are ready, say a natural prompt like: "Get my attendance for this semester" or "Show my transcript". - The server uses your local credentials to log in to Flex and fetch information. - You can ask for comparisons, calculations, or detailed records, and the MCP client will present the results. - If you need to re-authenticate, say "Login to FLEX" to trigger the login flow in Chrome.
Prerequisites: Python 3.11 or newer and Google Chrome installed on your machine.
1. Clone the project repository and install dependencies.
git clone <repo-url>
cd FLEX
pip install -r requirements.txt2. Create a local credentials file. Replace the placeholder values with your actual Flex roll number and password.
# Example .env content
FLEX_ROLL_NO=22F-XXXX
FLEX_PASSWORD=your_password3. Configure your MCP client to connect to the local server. You will add an MCP entry that points to the server script and passes your credentials.
# Claude Desktop
{
"mcpServers": {
"flex": {
"command": "python",
"args": ["C:/path/to/FLEX/server.py"],
"env": {
"FLEX_ROLL_NO": "22F-XXXX",
"FLEX_PASSWORD": "your_password"
}
}
}
}# GitHub Copilot
{
"flex": {
"command": "python",
"args": ["C:/path/to/FLEX/server.py"]
}
}Configuration details, security notes, and usage tips are important for smooth operation. The login session persists until you restart the MCP server. Chrome is required for the login flow, and credentials are used only locally on your machine. If a CAPTCHA appears, you will solve it manually in the opened Chrome window. You should have a working Python 3.11+ environment and a stable local setup for best results.
Opens Chrome to complete CAPTCHA-authenticated login to FLEX and establish a session.
Fetches attendance records for all courses in the current term.
Retrieves detailed marks with class statistics for your courses.
Returns the full academic transcript including GPAs.
Provides Modified Class Average for relative grading insights.
Lists current semester registered courses.
Shows payment history and fee details.
Verifies whether the current session is active.