Secure AI Course Access: A Production MCP Server with Entitlement-Scoped Retrieval
AI client — A student asks the assistant a question about their course material.
Overview
The client wanted an AI assistant that answers from paid course material — but only for the courses a given student had actually bought. Two failure modes would each break the business: a student asks about content they never paid for and the assistant answers anyway, or someone uses the assistant to bulk-extract the entire library.
The Challenge
The client wanted an AI assistant that answers from paid course material — but only for the courses a given student had actually bought. Two failure modes would each break the business: a student asks about content they never paid for and the assistant answers anyway, or someone uses the assistant to bulk-extract the entire library. Complicating it further, there was no existing auth or purchase API to plug into.
Our Solution
We built a remote MCP server exposing course-scoped retrieval to an AI client. OAuth 2.1 with PKCE and JWKS was designed and built from scratch, since no auth layer existed. Retrieval is filtered by entitlement server-side rather than in the prompt, so scope cannot be talked around. Anti-bulk-export guardrails and audit logging keep the assistant answering questions rather than surrendering the library. We then profiled the endpoint and parallelised the independent reads — rate limiting, entitlements, embedding, citation and audit — to cut response time.
Results
p95 latency cut 4.58s → 2.80s and median 4.03s → 2.26s under 50 concurrent users
50 concurrent live calls: 50/50 succeeded, zero errors
Entitlement scoping enforced server-side, not by prompt instruction
Handed over with the environment cleaned and the roster verified
Tech Stack
Have a similar project?
Let's talk about how we can build something like this for you. Free 30-minute consultation, no obligations.
Related Services
More Case Studies
Pokepal
Product Startup, United States · 6 weeks
Supports English and Japanese card scanning
Nftcomplete
Product Startup, United States · 8 weeks
5+ marketplace APIs aggregated into one platform
Efn
Fitness Startup, France · Ongoing (from March 2026)
Live on App Store and Google Play
Dripmap
Startup Founder, United States · 5 weeks
MVP live in 5 weeks from signed scope
Notepd
Product Founder, United States · 8 weeks
25,000+ downloads in the first quarter
Matchportalen
Matchmaking Agency, Norway · 10 weeks
Manual matching workflow replaced with a structured dashboard
Proposalgenie
SaaS Startup, US · 6 weeks
Live SaaS product at proposalgenie.ai, shipped production-ready
Culineer
Restaurant Tech Startup, UAE · 8 weeks
50+ restaurants onboarded
Air-gapped-rag-platform
Confidential — under NDA · 18 days
Runs fully air-gapped on a local model — zero outbound calls, proven end-to-end
Ai-inspection-pipeline
Confidential — under NDA · Ongoing
Live in production on both the iOS App Store and Google Play
Production-debug-no-access
Confidential — under NDA · Fixed scope
Live production fault diagnosed and fixed without hosting or dashboard access