unity-2d-topdown-lessons
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Unity 2D Top-Down Lesson & Architecture RAG (unity-2d-topdown-lessons)
Offline-ready Hybrid RAG + MCP Server distilled from proven Unity 2D top-down courses, official Unity technical articles, open-source companion C# repositories, and Unity 2022 LTS / Unity 6 LTS best practices.
Built so AI coding agents retrieve battle-tested game engineering patterns and pitfall fixes before writing C# scripts or configuring 2D scenes—eliminating guesswork, physics glitches, sorting bugs, and deprecated APIs.
Researched Source Corpus (raw_sources/)
YouTube Playlists & Supercuts: 9 playlists (
317cataloged playlist entries inraw_sources/youtube/playlists_index.json),112extracted video transcripts + chapter maps (~2.42Mchars across Game Code Library, Chris' Tutorials, Night Run Studio, Ketra Games, Sunny Valley Studio, Code Monkey, Brackeys, Mister Taft Creates, Digital Oddities/Sally, Terresquall, Unity GDC/Official).Web Courses & Technical Articles:
32extracted guides (raw_sources/web/) from Unity Learn (2D Tech Art Essentials), Unity Happy Harvest technical series (Tilemaps,URP 2D Lights,Unity 6 Character Animation,2D VFX & Shader Graph), GameDevBeginner, Terresquall Vampire Survivors Parts 1–4 + 2.5, Madwomb, and NavMeshPlus.Companion GitHub Repositories:
12shallow-cloned repositories (raw_sources/github/) includingh8man/NavMeshPlus,SunnyValleyStudio(ContextSteering,ProceduralDungeon,Tank2D,CleanerCode),MisterTaftCreates/Unity-Zelda-Like, andBrackeys(2D-Shooting,Health-Bar,2D-Shader-Graph,2D-Glow,2D-Lights,Minimap).
Related MCP server: code-rag-mcp
Curated Knowledge Base (docs/)
File |
| Coverage |
|
| Project folder setup, URP 2D, SO rules, Events, Execution Order, Unity 2022 vs Unity 6 matrix |
|
| Input System, |
|
| CompositeCollider2D, seam fixes, Custom Axis |
|
| 4-dir Blend Trees + |
|
|
|
|
| Enemy FSM, LoS hysteresis, Sunny Valley Context Steering, |
|
| Random Walk, Corridors-First, BSP Rooms, 4/8-bit Bitmask Walls, Infinite Viewport Chunk Streaming |
|
|
|
|
|
|
|
| 32 diagnostic bugs + Pre-Delivery QA Gate |
|
| Full curated map of tutorials, playlists, blogs & companion repos |
Hybrid Retrieval & MCP Server Architecture
ingest.py: Builds BOTH a normalized SQLite FTS5 database (data/lessons.sqlite3,unicode61 remove_diacritics 2) with a structuredpitfallstable AND a ChromaDB dense vector store (data/chroma/) using local cachedall-MiniLM-L6-v2ONNX embeddings.lesson_rag.py: Lazily loads ChromaDB + local ONNX embeddings (so MCPinitializetakes milliseconds), expands bilingual Vietnamese/English Unity queries, fuses FTS5 BM25 + semantic cosine ranks via Reciprocal Rank Fusion (RRF) with curated-tier weighting, and exposes 4 read-only MCP tools over stdio JSON-RPC 2.0:search_2d_lessonsread_2d_lessonget_2d_pitfallslist_2d_topics_and_courses
Quick Setup
git clone https://github.com/tuanvu17112003/unity-2d-topdown-lessons-mcp.git
cd unity-2d-topdown-lessons-mcp
# 1. Install runtime dependencies (ChromaDB + ONNX runtime)
pip install -r requirements.txt
# 2. (Optional) Re-download YouTube transcripts & companion GitHub repos into raw_sources/
# Requires yt-dlp and git
python fetch_sources.py
# 3. Build local SQLite FTS5 + ChromaDB ONNX index (downloads ~79 MB all-MiniLM-L6-v2 on first run)
python ingest.py
# 4. Check index statistics & run smoke tests
python lesson_rag.py stats
python smoke_test.py
# 5. Query from CLI (English or Vietnamese)
python lesson_rag.py search "tại sao nhân vật di chuyển chéo nhanh hơn và bị kẹt góc tường"
python lesson_rag.py pitfalls "NavMeshAgent sprite vanishes"
python lesson_rag.py read movement-input-and-physics2dNote on repository size & third-party sources:
data/(generated SQLite + Chroma binaries) andraw_sources/{github,web,youtube/videos}/(~4.67 GB of third-party cloned repos, transcripts, and scraped blogs) are excluded via.gitignore. Only original synthesized Markdown guides (docs/), playlist metadata (raw_sources/youtube/playlists_index.json), and RAG server scripts are tracked in Git.
MCP Registration (mcp_config.json)
"unity-2d-topdown-lessons": {
"type": "stdio",
"command": "/path/to/python",
"args": ["-B", "/path/to/unity-2d-topdown-lessons-mcp/lesson_rag.py", "mcp"],
"env": {
"PYTHONUTF8": "1",
"ANONYMIZED_TELEMETRY": "False"
},
"timeoutMs": 120000
}Security & Privacy Design
Read-only SQLite URI mode:
lesson_rag.pyopensdata/lessons.sqlite3strictly via?mode=ro.Zero filesystem path traversal:
read_2d_lessonreads solely from indexeddocsrows in SQLite—never arbitrary host paths.Parameterized queries: All SQL & FTS5 inputs are parameterized or escaped; JSON-RPC handles malformed frames safely without crashing.
Offline inference: No external API keys required at runtime.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your personal library, readable by AI agents: durable snapshots, hybrid search, 46 MCP tools.
Knowledge base for AI agents: search, read, tasks; write, correct, report outcomes via /mcp/write.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases — works with ChatGPT, Claude, Cursor and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceZero-config knowledge base for AI coding agents. Loads your markdown docs into a searchable database and exposes them as MCP tools — search, read, and manage documentation without leaving your editor. Works instantly with SQLite (no setup), upgrades to PostgreSQL + pgvector for hybrid semantic search. 6 MCP tools, 3 resources, FTS5 keyword search, 176 tests.58 PyPI32MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to search local repositories through hybrid keyword and embedding retrieval, read matched chunks, and list indexed repos via MCP, without API keys or cloud services.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to persistently save, search, retrieve, update, link, and forget project-scoped memories through MCP tools, using local SQLite FTS5 keyword search without cloud access or telemetry.26 npm14MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents and MCP-compatible hosts to search, ask, and retrieve section-level citations from scattered local notes, docs, PDFs, Word files, web pages, org files, and chat logs using hybrid vector and BM25 retrieval.-