mcp-workshop-kmitl
Provides tools for querying network topology and relationships in Neo4j, enabling analysis of device connections, ISIS/CDP neighbors, and impact assessments.
Provides tools for searching and analyzing device logs and performing semantic vector search in OpenSearch to find similar past issues or errors.
Provides tools for querying and managing ticket, device configuration, circuit, and customer data stored in PostgreSQL, enabling operations like retrieving pending tickets and checking device settings.
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., "@mcp-workshop-kmitlcheck open tickets for device RTT-BKK-01"
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.
AI × IP-MPLS Workshop — 3 วัน (Developer Focused)
Workshop สอนพัฒนา AI Agent + MCP Server สำหรับงานดูแลโครงข่าย IP-MPLS โดยเน้นการเขียนโค้ดเองตั้งแต่ระดับกลไก ไม่พึ่ง framework สำเร็จรูป
เป้าหมายปลายทาง: ภายในบ่ายวันที่ 3 ผู้เรียนจะมี MCP Server ของตัวเองที่ต่อกับ PostgreSQL + Neo4j + OpenSearch และมี AI Agent ที่วางแผนเองว่าจะดึงข้อมูลจากที่ไหนบ้าง พร้อม UI ที่ใช้งานได้จริง และต่อเข้ากับ Claude Desktop / Claude Code / Cursor ได้
1. Quick Start
cp .env.example .envdocker compose -f docker/docker-compose.yml --env-file .env up -ddocker compose -f docker/docker-compose.yml --env-file .env up seederdocker compose -f docker/docker-compose.yml --env-file .env run --rm seeder python verify.py เปิดใช้งาน:
บริการ | URL | ใช้ทำอะไร |
Chainlit (ของผู้เรียน) | UI ที่ผู้เรียนสร้างเอง | |
Agent API (ของผู้เรียน) | REST API ของ agent | |
Demo (แอปสำเร็จรูป) | ตัวอย่างปลายทาง ใช้เปิดคอร์ส | |
pgAdmin | ดูข้อมูลใน PostgreSQL | |
OpenSearch Dashboards | ดู log | |
Neo4j Browser | ดู topology | |
MailHog | ดูอีเมลที่ agent ส่ง |
pgAdmin: ล็อกอินด้วย
workshop@example.local/workshop(ตั้งค่าได้ใน.env) มี server ลงทะเบียนไว้แล้ว 2 ตัว — ตัวเต็มสิทธิ์ (mpls) และ ตัวอ่านอย่างเดียวที่ MCP ใช้จริง (mcp_reader) ลองรันUPDATEด้วยบัญชีmcp_readerเพื่อเห็นว่า guardrail ระดับสิทธิ์ทำงานอย่างไร (ใช้ใน Module 8)
Related MCP server: network-mcp
2. สถาปัตยกรรมระบบ
flowchart LR
U([ผู้ใช้]) --> UI[Chainlit UI<br/>:8000]
UI -->|HTTP + SSE| API[Agent API<br/>FastAPI :8080]
subgraph AGENT["Agent Core"]
direction TB
I[Intent Gate] --> P[Planner]
P --> E[Executor]
E --> S[Synthesizer]
M[(Memory<br/>short + long)] -.-> I
M -.-> P
G[Grounding] -.-> S
end
API --> AGENT
AGENT -->|OpenAI protocol| LLM[[Local LLM<br/>Gemma 3 27B]]
AGENT -->|MCP / JSON-RPC 2.0| MCP[MCP Server]
MCP --> PG[(PostgreSQL<br/>Ticket + Config)]
MCP --> NEO[(Neo4j<br/>Topology)]
MCP --> OS[(OpenSearch<br/>Log + Vector)]
CD[Claude Desktop /<br/>Claude Code / Cursor] -->|MCP stdio| MCPบทบาทของฐานข้อมูลทั้ง 3
ระบบ | เก็บอะไร | ตอบคำถามแนวไหน |
PostgreSQL | Ticket, Config อุปกรณ์, Circuit, Customer | "มี ticket อะไรค้างอยู่" / "MTU ตั้งไว้เท่าไหร่" |
Neo4j | Topology, ISIS/CDP neighbor, Interface | "อุปกรณ์นี้ต่อกับอะไร" / "ถ้าล่มกระทบใคร" |
OpenSearch | Log อุปกรณ์ + Vector (semantic search) | "มี error อะไร" / "เคยเจอปัญหาแบบนี้ไหม" |
คำถามที่ดีที่สุดคือคำถามที่ตอบด้วยแหล่งเดียวไม่ได้ — นั่นคือเหตุผลที่ต้องมี Agent วางแผน
3. Model Stack
flowchart LR
Q([คำถาม]) --> EMB[EmbeddingGemma 300M<br/>768 มิติ]
EMB --> RET[Retrieve<br/>top 50]
RET --> RR[mxbai-rerank<br/>เหลือ top 5]
RR --> BRAIN[[Gemma 3 27B<br/>Main Brain]]
BRAIN --> A([คำตอบ + citation])บทบาท | โมเดล | หมายเหตุ |
Main brain |
| ใช้ตอนส่งงาน / เดโม |
Iteration |
| ใช้ระหว่างทำ lab ให้วนแก้เร็ว |
Embedding |
| 1536 มิติ — ตรงกับ production |
Rerank |
| ลด hallucination |
ทุกตัวคุยผ่าน OpenAI-compatible protocol (Ollama หรือ vLLM) → เปลี่ยนโมเดลได้โดยไม่แก้โค้ด
4. โครงสร้างหลักสูตร
flowchart TD
subgraph D1["วันที่ 1 — ควบคุม LLM ผ่านโค้ด"]
M1[M1 Tokenomics<br/>+ Embeddings] --> M2[M2 Transformer]
M2 --> C1{{โจทย์ 1<br/>Thai Token Audit}}
C1 --> M3[M3 Structured Output]
M3 --> W1[Workshop 1<br/>JSON + Auto-retry]
W1 --> C2{{โจทย์ 2<br/>Schema Under Pressure}}
end
subgraph D2["วันที่ 2 — Agent Loop เขียนเอง"]
M4[M4 ReAct + Memory] --> M5[M5 Function Calling]
M5 --> C3{{โจทย์ 3<br/>Tool Description Battle}}
C3 --> M6[M6 Multi-Agent]
M6 --> W2[Workshop 2<br/>Agent Loop]
W2 --> C4{{โจทย์ 4<br/>Topic Shift Survival}}
end
subgraph D3["วันที่ 3 — MCP Production"]
M7[M7 MCP Architecture] --> M8[M8 Security + SDK]
M8 --> C5{{โจทย์ 5<br/>Guardrail Red-team}}
C5 --> W3[Workshop 3<br/>MCP Server จริง]
W3 --> C6{{โจทย์ 6<br/>Cross-Service Diagnosis}}
end
D1 --> D2 --> D3โจทย์ 6 ข้อ
โจทย์ | เมื่อไหร่ | เรื่อง | เวลา |
1 | วันที่ 1 ปิดช่วงเช้า | Thai Token Audit | 20 นาที |
2 | วันที่ 1 ปิดท้ายวัน | Schema Under Pressure | 30 นาที |
3 | วันที่ 2 ปิดช่วงเช้า | Tool Description Battle | 25 นาที |
4 | วันที่ 2 ปิดท้ายวัน | Topic Shift Survival | 30 นาที |
5 | วันที่ 3 ปิดช่วงเช้า | Guardrail Red-team | 25 นาที |
6 | วันที่ 3 ปิดท้าย WS3 | Cross-Service Diagnosis | 30 นาที |
5. โครงสร้างโฟลเดอร์
.
├── instructions/ เอกสารการสอนทั้งหมด (.md) ← เริ่มอ่านที่นี่
├── data/ ชุดคำถาม, เหตุการณ์จำลอง, log ตัวอย่าง
├── docker/ infra ทั้งหมด (compose + seed + loader)
├── apps/
│ ├── mcp-server/ MCP Server (แกนของวันที่ 3)
│ ├── agent-api/ Agent เป็น REST API
│ ├── chainlit-ui/ UI
│ └── demo-app/ แอปสำเร็จรูปสำหรับเดโม
├── tests/ ตรวจงานตัวเองได้ทันที
├── eval/ วัดผลคุณภาพคำตอบ (BLEU/ROUGE/LLM-judge)
└── solutions/ เฉลย ⚠️ อ่านก่อนลอง = เสียโอกาสเรียนรู้6. เริ่มเรียนที่ไหน
เปิด index.md — หน้าแผนที่หลักสูตรฉบับเต็ม มีลิงก์ไปทุกเอกสารเรียงตามเวลาจริง ตั้งแต่ก่อนอบรมจนถึงวันที่ 3 รวมเฉลยและเอกสารอ้างอิง
7. คำสั่งที่ใช้บ่อย
คำสั่ง | ทำอะไร |
| เปิดระบบทั้งหมด + seed อัตโนมัติ |
| ตรวจว่าข้อมูลครบทั้ง 3 ฐาน |
| สร้างข้อมูลใหม่ให้ timestamp สดใหม่ (ทำเช้าวันเดโม) |
| โหลด log จาก |
| รัน Agent API / Chainlit ของผู้เรียน |
| เปิดแอปสำเร็จรูป (โหมดจริง) |
| เปิดแอปสำเร็จรูป (โหมด replay ไม่ต้องมี LLM) |
| ปิดระบบ / ล้างข้อมูลทั้งหมด |
8. ความสัมพันธ์กับโครงการ MPLS LLM
Workshop นี้เป็น แบบจำลองย่อส่วนของสถาปัตยกรรม production จริง — ทุกชิ้นที่สร้างในห้อง มีคู่ของมันในระบบจริง เพื่อให้การติดตามผลวันที่ 30/60/90 มีของให้ตรวจ
Workshop | Production |
10 อุปกรณ์ 2 พื้นที่ | 2,600+ อุปกรณ์ทั่วประเทศ |
Log 2,000 บรรทัด | 29 GB/วัน |
Gemma 3 27B | GPT-OSS 120B |
Chainlit | NMS NEX Integration |
MailHog | Telegram Alert |
| Health Check ทั้ง 3 ฐาน |
อ่านรายละเอียดที่ instructions/reference/production-mapping.md
This server cannot be deployed
Maintenance
Related MCP Connectors
Let AI agents query data and act across all your business apps via MCP.
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
MCP-Native LLM Orchestration Agent
AI agents query normalized financial services data and run workflows via Milemarker MCP.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that enables LLMs to retrieve structured network information, including routing, interfaces, MPLS, and topology, from devices using gNMI and OpenConfig models. It facilitates real-time network analysis, log filtering, and status monitoring through a standardized interface.1014BSD 3-Clause
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with direct access to multi-vendor network devices for tasks like configuration management, health checks, and topology discovery through 35 specialized tools. It enables natural language control over platforms including Cisco, Juniper, and Nokia using SSH, NETCONF, and SNMP protocols.11MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to query Neo4j graph databases and Box document storage using natural language through a single MCP endpoint.-
- FlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with heterogeneous databases (MySQL, MongoDB, BigQuery) through MCP tools, allowing natural language queries and database operations.-