Feature/mcp - #271
Merged
Merged
Conversation
The Next.js proxy strips /api/mcp prefix, so POST /api/mcp becomes POST / on the MCP server. Added / as an additional route for the MCP endpoint. Also fixed proxy fallback to /mcp instead of /. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of staying in a loading state forever after clicking Approve, the consent page now shows a green checkmark with "Authorization complete" message telling the user to close the window. Same for Deny. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add tenant_id to lms_create_lesson and lms_create_exercise inserts - Fix lms_create_exam: exam_date was NOT NULL in DB but optional in tool — add migration to make it nullable - Fix lms_get_exam: order questions by question_id for deterministic output - Fix lms_upsert_lesson_ai_task: validate at least one field provided - Fix lms_get_lesson_ai_task: use maybeSingle() to distinguish DB errors from missing row - Fix lms_delete_exam_question: correct idempotentHint to false - Fix lms_add_exam_question and lms_create_exam: validate multiple_choice/true_false questions have options - Fix lms_list_templates: scope to system templates + own templates (was returning all tenants' data) - Add lms_delete_lesson, lms_delete_exam, lms_delete_exercise tools - Add lms_get_lesson_ai_task tool - Fix changed_by NOT NULL violation when MCP service role updates lessons/exams Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several important changes across the MCP server, client UI, and Supabase migrations to improve content management, ownership, and deletion capabilities for lessons, exams, and exercises. It also refines the UI for the OAuth consent flow and fixes issues with Supabase triggers when using the service role. The most significant updates are grouped below.
Content Deletion Tools (Destructive Actions)
lms_delete_lesson), exams (lms_delete_exam), and exercises (lms_delete_exercise). These tools ensure all related data is removed and provide confirmation messages, with appropriate annotations indicating irreversibility. (Fd0600b5L351R418, Ff5b0038L574R621, F73b4317L356R396)Ownership, Filtering, and Validation Improvements
UI/UX Enhancements
API and Routing Fixes
/mcpfor root requests, and updated the MCP server to handle both/mcpand/for POST requests. (app/api/mcp/[[...path]]/route.tsL41-R41, mcp-server/src/http-server-oauth.tsL291-R292)Supabase Migration: Trigger and Policy Fixes
changed_byfield incontent_versionsnullable and updated triggers for lessons, exams, exercises, and prompt templates to work with service role inserts. Also updated RLS policies to allow inserts withchanged_byas NULL.These changes collectively improve data integrity, user experience, and multi-tenant support for the MCP platform.