eClass MCP Server
Integrations
Uses .env files to store sensitive authentication credentials for eClass, maintaining them securely outside of version control
Hosts the project repository for version control and distribution of the eClass MCP server code
Built with Python, providing a foundation for the MCP server implementation that handles authentication and interactions with eClass
eClass MCP Server
Features
- Authentication: Log in to eClass through UoA's CAS SSO authentication system
- Course Management: Retrieve lists of enrolled courses
- Session Management: Maintain authenticated sessions between tool calls
- Status Checking: Verify authentication status
Project Structure
This project follows a modular architecture for better maintainability:
Installation
Install the server using UV (recommended):
Alternatively, install with pip:
Configuration
Create a .env
file in the root directory with the following configuration (or copy and rename the provided example.env
file):
All credentials must be provided in the .env file. The server does not accept credentials as parameters.
Usage
Terminal
Run the server using the entry point script:
Or as a module:
Cursor
Go to Settings -> MCP. Click on Add new MCP server
:
- Select a unique but appropriate name so that the Agent knows what the server is for (e.g., "eClass Server")
- Select the
command
option on "Type" - Add this in the command input:
python /path/to/eclass-mcp-server/run_server.py
This command runs the run_server.py
script that connects the MCP Client with the main server entry point in server.py
.
Claude Desktop
To use with Claude Desktop:
- Open Claude Desktop
- Go to Settings > Server
- Add a new server with the following details:
- Name: eClass MCP
- Command: Path to your run_server.py script
- Click Add Server
- Select the server from the dropdown when chatting with Claude
Tools
The server provides the following tools for use with MCP clients:
login
Log in to eClass using SSO authentication.
get_courses
Retrieve a list of enrolled courses (requires login first).
logout
Log out from eClass.
authstatus
Check the current authentication status.
Testing
The project includes test scripts to verify functionality:
Example MCP Client Usage
Integration with AI Agents
This MCP server is designed to be used with AI agents that support the Model Context Protocol. This enables AI systems to interact with eClass directly, allowing for capabilities like:
- Retrieving course information
- Checking course announcements
- Accessing course materials
- Submitting assignments (future feature)
Security Considerations
- The server handles sensitive authentication credentials
- Credentials are only used for authentication and are not stored persistently
- Session cookies are maintained in memory during the server's lifecycle
- The server validates session state before performing operations
- The
.env
file with credentials should never be committed to version control (it's included in .gitignore)
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
You must be authenticated.
An MCP server that enables AI agents to authenticate with and interact with Open eClass platform instances, supporting UoA's SSO authentication system for retrieving course information and performing basic platform operations.