Add MCP server for LLM integration with multi-student support#55
Add MCP server for LLM integration with multi-student support#55
Conversation
|
@copilot can you rebase on main and sync with the new changes? |
I've successfully rebased the MCP server branch on main and updated it to work with the new profiles system (commit 68eeb0f and later). Key ChangesIntegration with Profiles System:
What This Means:
The branch is ready but requires a force push since the rebase rewrote history. The changes are in commits 68eeb0f through 50007ab. All tests pass and both binaries build successfully. |
Co-authored-by: zmoog <25941+zmoog@users.noreply.github.com>
Co-authored-by: zmoog <25941+zmoog@users.noreply.github.com>
Co-authored-by: zmoog <25941+zmoog@users.noreply.github.com>
Rebased the branch with main and updated the MCP server implementation to work with the new YAML-based configuration system that was introduced in main. The new config uses profiles instead of students and YAML format instead of JSON. Changes: - Updated MCP server to use config.Load() and new config.Config structure - Changed from Students to Profiles throughout the codebase - Updated tool names: list_students → list_profiles - Changed parameter names: student_id → profile - Updated spaggiari.New() call to include profile name parameter - Updated README.md with new YAML config format and examples - Updated go.mod/go.sum with proper dependencies 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
de3a147 to
df7ba3a
Compare
|
@copilot can you review the PR description to see if it's aligned with the PR content? |
Co-authored-by: zmoog <25941+zmoog@users.noreply.github.com>
I've reviewed and updated the PR to align the documentation with the actual implementation (commit 97bca81). Issues Found:
Fixed:
The PR now correctly documents that it uses YAML-based profiles configuration shared with the CLI, not the old JSON students format. |
|
|
||
| ### API Authentication | ||
| - Uses existing identity management from Spaggiari adapter | ||
| - Tokens cached in `~/.classeviva/identity.json` |
There was a problem hiding this comment.
| - Tokens cached in `~/.classeviva/identity.json` | |
| - Tokens cached in `~/.classeviva/identity-*.json` |
There was a problem hiding this comment.
Fixed in commit e93505b. Updated to identity-*.json pattern.
| 1. **Configuration file not found** | ||
| - Ensure `~/.classeviva/students.json` exists | ||
| - Check file permissions |
There was a problem hiding this comment.
| 1. **Configuration file not found** | |
| - Ensure `~/.classeviva/students.json` exists | |
| - Check file permissions | |
| 1. **Profiles not found** | |
| - Ensure `~/.classeviva/config.json` exists and contains at least on student | |
| - Check file permissions |
There was a problem hiding this comment.
Fixed in commit e93505b. Updated to reference config.yaml and corrected the typo "on" → "one".
| 2. Create configuration file at `~/.classeviva/config.yaml`: | ||
| ```yaml | ||
| profiles: | ||
| student1: | ||
| username: "your_username" | ||
| password: "your_password" | ||
| student2: | ||
| username: "your_username" | ||
| password: "your_password" | ||
| default_profile: "student1" | ||
| ``` |
Co-authored-by: zmoog <25941+zmoog@users.noreply.github.com>
Overview
This PR implements a Model Context Protocol (MCP) server that enables LLMs like Claude to interact with the Classeviva school portal API. The implementation integrates with the new profiles configuration system, allowing users to manage multiple student credentials through a unified YAML configuration file shared with the CLI.
Changes
Core Implementation
MCP Server (
entrypoints/mcp/main.go)mcp-golibrarylist_profiles: Lists all configured student profileslist_grades: Retrieves grades for a specific profile with optional limitlist_agenda: Shows homework and events with configurable date rangeslist_noticeboards: Displays school announcements and circularsConfiguration System Integration
~/.classeviva/config.yaml)adapters/configpackage with koanf-based configuration loadingclasseviva profile add/remove/list)User Experience
Installation & Setup
install.sh) that builds and installs the binaryconfig.yaml.example) with clear placeholdersDocumentation
Use Cases
With this MCP server, users can now ask Claude to:
Security
Testing
go vetreports no issuesExample Configuration
Users can manage profiles using the CLI:
Or manually create
~/.classeviva/config.yaml:Claude Desktop Integration
To use with Claude Desktop, add to your configuration file:
{ "mcpServers": { "classeviva": { "command": "/path/to/classeviva-mcp" } } }Integration with Profiles System
This PR integrates seamlessly with the existing profiles feature:
config.yamlconfiguration file as the CLIFixes #52
Original prompt
Fixes #52
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.