Telusko Support Chat MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Telusko Support Chat MCP Servershow me my courses and why my last payment failed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Telusko Support Chat — MCP with Roles, Scopes & JWT
A customer support desk for an online course platform where learners, support agents, and admins all use the same chat interface. What each person can do is decided entirely by the JWT they carry and the scopes inside it — not by the UI or the prompt.
Built as part of the Telusko Agentic AI Engineering with Python course (session 11-10-2026).
Tech stack: Python + FastAPI + MCP (Model Context Protocol) + LangChain + OpenAI + SQLite + JWT + Docker
The One Idea
There is a single chat endpoint and a single model. Nothing in the chat code knows what a learner may do. The difference between Rahul asking “show me my courses” and Akshay asking the same question is the JWT attached to the request, and the MCP server reading the scopes inside it. The permission system is not in the UI and not in the prompt. It is in the server.
Related MCP server: Corebee MCP Server
Roles
Role | Who | What they can do |
learner | Students | See own courses/payments/certificates, buy a course, raise & reply to own tickets |
support | Support desk | Work the ticket queue, look up learners, extend access (max 30 days), remove enrollments |
admin | Platform owners | Everything support can do + issue certificates, manage FAQs, view stats, manage users |
Architecture
flowchart LR
Browser["Browser<br/>http://localhost:8000"] -->|JWT| Backend["FastAPI Backend<br/>:8000"]
Backend -->|Same JWT| MCP["MCP Server<br/>:8001"]
MCP --> Tools["Tools<br/>(filtered by scopes)"]
Tools --> DB[("SQLite<br/>telusko.db")]
Backend --> LLM["ChatOpenAI"]The browser never talks to the MCP server. It only talks to the backend.
The backend forwards the same JWT to the MCP server on every tool call.
The MCP server verifies the token and only exposes / allows tools the caller has scopes for.
Features
Role-based access control via scopes (
resource:action) carried in the JWTMCP middleware that hides tools the caller cannot use and blocks unauthorized calls
Data-level rules (e.g. learners can only see their own tickets)
Full tool-calling loop with a visible trace in the UI (great for learning)
Simulated course purchase flow
Admin user management panel (custom permissions possible)
Fully containerized with Docker Compose
Quick Start
With Docker (recommended)
git clone https://github.com/yash9614/project_mcp.git
cd project_mcp
# Create .env from the example and fill in your values
cp .env.example .env
# Edit .env: add OPENAI_API_KEY and a JWT_SECRET (32+ chars)
docker compose up --buildWithout Docker
uv sync
uv run python -m database.db # create + seed the database (once)
uv run python -m mcp_server.server # MCP server on :8001
uv run python -m backend.app # Backend + UI on :8000Demo Accounts
Password for all: password123
Role | |
learner | |
learner | |
learner | |
support | |
support | |
admin |
Project Structure
.
├── backend/ # FastAPI app, login, chat loop, admin endpoints
├── common/ # config, auth (JWT), permissions, prompts
├── database/ # schema.sql, seed.sql, models.py, db.py
├── mcp_server/ # MCP server: JWT verifier, middleware, tools
├── frontend/ # Single-file HTML UI
├── docker-compose.yml
├── Dockerfile
└── pyproject.tomlKey Design Decisions
Scopes travel in the JWT. The MCP server never looks up the user in the database to decide permissions — it only trusts the verified token.
Tool visibility is filtered.
tools/listonly returns tools the caller has a scope for.One client per request. The backend opens a fresh MCP connection for each chat turn, authenticated with that user’s JWT.
Models layer owns all SQL. Tools never write raw SQL; they call methods on the dataclass models.
SQLite for simplicity. No external database required for the class project. Moving to Postgres later only requires changing
database/db.py.
What to Try
Log in as Rahul (learner) → ask about your courses / certificate / failed payment.
Log in as Neha (support) → list open tickets, look up Priya, try extending access by 60 days (blocked).
Log in as Akshay (admin) → issue a certificate, view stats, open Manage Users.
Watch the tool-call traces under each assistant reply — they show exactly which MCP tools were invoked and what they returned.
Bonus Material
See CONCEPTS.md for the most important concepts and interview-style questions.
This server cannot be deployed
Maintenance
Related MCP Connectors
AI support employee for any website: learns the site, answers visitors by chat and voice.
Run your website's AI support agent: knowledge, conversations, leads and live replies.
Run the Geduk LMS from an AI assistant: courses, sessions, enrolments, users and catalogue.
Helpdesk tickets from your AI: find, reply, take, hold, complete — within your own role. OAuth.
Related MCP Servers
AlicenseAqualityBmaintenanceEnables managing support tickets from Claude, Cursor, and other AI tools, including listing, creating, updating, and replying to tickets.611 npmMIT- AlicenseNot gradedqualityDmaintenanceEnables AI-driven customer support operations including conversation management, knowledge base, contacts, metrics, and settings via MCP.MIT
- AlicenseAqualityCmaintenanceEnables Zendesk admins to audit business rules, monitor backlog and SLAs, review security, and manage user offboarding through natural language.131MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to create and train support bots, manage knowledge sources, review conversations and leads, access analytics and usage, and retrieve install snippets via the Model Context Protocol.26 npmMIT