Fuel Radar 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., "@Fuel Radar MCP Servershow fuel stations in Bangkok"
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.
จากข้อมูลสาธารณะ (Open Data) สู่ความพร้อมทาง AI (AI-Ready)
โปรเจกต์นี้สาธิตกระบวนการยกระดับ ข้อมูลสาธารณะ (Open Data) ให้เป็น AI-Ready Data (Level 6) ตามโมเดล 5+1 Star Open Data พร้อม MCP Server ที่ทำให้ AI Agent เข้าถึงข้อมูลได้ทันที
โดยใช้ข้อมูลรายงานสถานะน้ำมันจากชุมชนของ thaipumpradar.com เป็นกรณีศึกษา
แนวคิด: 5+1 Star Open Data Model
★ Level 1: PDF, DOCX → มนุษย์อ่านได้
★★ Level 2: Excel, CSV → มีโครงสร้าง
★★★ Level 3: JSON, XML + Metadata → รูปแบบเปิด
★★★★ Level 4: REST API → เข้าถึงแบบ Real-time
★★★★★ Level 5: RDF, Linked Data → เชื่อมโยงเชิงความหมาย
★★★★★★ Level 6: AI-Ready Data → พร้อมใช้กับ AI/ML ทันที ← เป้าหมายของโปรเจกต์นี้รายละเอียดเพิ่มเติม: research/open_data_model.md
Related MCP server: gdebenz
Architecture Overview
┌─────────────────────┐ ┌──────────────────────┐ ┌─────────────────────┐
│ Data Source │ │ ETL Pipeline │ │ AI-Ready Output │
│ │ │ │ │ │
│ thaipumpradar.com │────▶│ process_radar.py │────▶│ radar_clean.jsonl │
│ (REST API) │ │ - Fetch │ │ radar_clean.parquet│
│ │ │ - Validate (≥0.3) │ │ datacard.md │
└─────────────────────┘ │ - Clean & Normalize │ └────────┬────────────┘
└──────────────────────┘ │
▼
┌──────────────────────┐ ┌─────────────────────┐
│ AI Agent │ │ MCP Server │
│ │◀───▶│ │
│ Claude, Cursor, │ │ search_fuel_status │
│ หรือ AI อื่น ๆ │ │ get_fuel_summary │
└──────────────────────┘ │ (port 3000) │
└─────────────────────┘โครงสร้างโครงการ (Project Structure)
.
├── .devcontainer/ # GitHub Codespaces config
│ └── devcontainer.json
├── pipeline/ # Data Pipeline & MCP Server
│ ├── process_radar.py # ETL: ดึง → ตรวจสอบ → ทำความสะอาด → บันทึก
│ ├── datacard.md # Data Card: metadata ของชุดข้อมูล
│ ├── mcp_server.py # MCP Server แบบ Stdio (Legacy/Windows)
│ └── mcp_server_modern.py # MCP Server แบบ HTTP/SSE (Modern/Docker)
├── data/ # ข้อมูลที่ผ่านการประมวลผล
│ ├── raw.json # ข้อมูลดิบจาก API
│ ├── radar_clean.jsonl # สำหรับ AI/RAG (1 record ต่อ 1 บรรทัด)
│ └── radar_clean.parquet # สำหรับ Analytics (columnar format)
├── demo/ # ตัวอย่างการใช้งาน
│ ├── demonstrate_ai.py # สคริปต์สาธิต AI Analysis + Mock RAG
│ └── demonstration_results.md
├── research/ # เอกสารวิจัยและกรอบการทำงาน
│ ├── open_data_model.md # โมเดล 5+1 Star Open Data
│ ├── thaipumpradar_analysis_th.md # วิเคราะห์แหล่งข้อมูล
│ ├── ai_ready_audit.md # เกณฑ์ตรวจสอบ AI-Ready Checklist
│ ├── ai_governance_framework.md # กรอบธรรมาภิบาล AI & Data
│ ├── how_to_add_mcp_tools.md # คู่มือเพิ่ม MCP Tools + Prompt Templates
│ ├── rag_explained.md # RAG vs MCP อธิบายให้แยกออก
│ ├── data_ingestion_explained.md # Data Ingestion vs ETL vs Pipeline
│ ├── glossary.md # พจนานุกรมศัพท์ 50+ คำ
│ ├── how_to_test_mcp_tools.md # วิธีทดสอบ/Debug MCP Tools
│ └── common_mistakes.md # ข้อผิดพลาดที่มักเจอ + วิธีแก้
├── Dockerfile # Container image (Python 3.12)
├── docker-compose.yml # Multi-service deployment
└── requirements.txt # Python dependenciesวิธีการติดตั้งและใช้งาน (Getting Started)
Prerequisites
Docker & Docker Compose (สำหรับรันแบบ Container)
หรือ Python 3.12+ (สำหรับรันในเครื่อง)
วิธีที่ 1: GitHub Codespaces (เริ่มใช้งานได้ทันที)
กดปุ่ม "Open in GitHub Codespaces" ด้านบน
รอให้ Codespace สร้างเสร็จ — MCP Server จะเริ่มทำงานอัตโนมัติ
ดู URL ของ MCP Server ที่แท็บ Ports (port 3000) จะได้ URL ในรูปแบบ:
https://<codespace-name>-3000.app.github.dev/mcpตั้ง visibility ของ port เป็น Public เพื่อให้ AI Client ภายนอกเชื่อมต่อได้
วิธีที่ 2: Docker Compose (แนะนำสำหรับรันในเครื่อง)
# Clone repo
git clone https://github.com/monthop-gmail/poc-XYZradar-to-ai-ready.git
cd poc-XYZradar-to-ai-ready
# รัน MCP Server
docker-compose up -d --buildMCP Server พร้อมใช้งานที่ http://localhost:3000/mcp
การตั้งค่า MCP ในแอป AI (Claude Desktop, Cursor, Windsurf, etc.)
เมื่อ MCP Server ทำงานแล้ว ให้ตั้งค่า URL ตามวิธีที่ใช้:
วิธีการรัน | MCP URL |
Codespaces |
|
Docker Compose (ในเครื่อง) |
|
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"fuel-radar": {
"url": "https://<codespace-name>-3000.app.github.dev/mcp"
}
}
}Cursor (Settings → MCP Servers → Add):
URL: https://<codespace-name>-3000.app.github.dev/mcpClaude Code (CLI):
claude mcp add fuel-radar https://<codespace-name>-3000.app.github.dev/mcpแทนที่
<codespace-name>ด้วยชื่อ Codespace ของคุณ หรือใช้http://localhost:3000/mcpหากรันในเครื่องหลังจากเพิ่มแล้ว AI จะสามารถเรียกใช้
search_fuel_status()และget_fuel_summary()ได้ทันที
วิธีที่ 3: Stdio (สำหรับ Claude Desktop / AI Client)
# ติดตั้ง dependencies
pip install pandas pyarrow requests fastapi uvicorn sse-starlette mcp[cli]
# รัน ETL เพื่อดึงข้อมูลล่าสุด
python pipeline/process_radar.py
# รัน MCP Server แบบ Stdio
python pipeline/mcp_server.py --transport stdioตัวอย่างการตั้งค่าใน claude_desktop_config.json:
{
"mcpServers": {
"fuel-radar": {
"command": "python",
"args": ["/absolute/path/to/pipeline/mcp_server.py", "--transport", "stdio"]
}
}
}MCP Tools ที่พร้อมใช้งาน
เมื่อเชื่อมต่อ MCP Server แล้ว AI Agent จะเรียกใช้เครื่องมือเหล่านี้ได้ทันที:
search_fuel_status(query)
ค้นหาสถานะน้ำมันตามชื่อปั๊ม, จังหวัด, หรืออำเภอ
query: "กรุงเทพ"
→ Found 5 reports:
- ปั๊ม ปตท. สาขาลาดพร้าว (กรุงเทพมหานคร): Diesel: out, B95: available
- ปั๊ม Shell สาขาสุขุมวิท (กรุงเทพมหานคร): Diesel: available, B95: available
...get_fuel_summary()
ดูภาพรวมสถานะน้ำมันทั่วประเทศ และจังหวัดที่มีน้ำมันขาดช่วงมากที่สุด
→ Summary:
- Total: 50
- Diesel Out: 12
- เชียงใหม่: 4 reports
- กรุงเทพมหานคร: 3 reports
- ขอนแก่น: 2 reportsอยากเพิ่ม MCP Tool? ดูคู่มือ How to Add MCP Tools พร้อม Prompt Templates สำหรับให้ AI ช่วยเขียนโค้ด
Data Pipeline (ETL)
pipeline/process_radar.py ทำงานตามขั้นตอน:
Fetch — ดึงข้อมูลจาก
thaipumpradar.com/api/reports/feedValidate — กรองเฉพาะรายงานที่มี Confidence Score >= 0.3 (production ใช้ >= 0.7)
Clean — เลือกเฉพาะฟิลด์ที่จำเป็น 11 ฟิลด์ (stationName, brandId, province, diesel, ฯลฯ)
Save — บันทึกเป็น 2 รูปแบบ:
JSONL — เหมาะสำหรับ AI/RAG (อ่านทีละบรรทัด, ใช้กับ LangChain, LlamaIndex)
Parquet — เหมาะสำหรับ Analytics (columnar, ใช้กับ Pandas, DuckDB, Spark)
รายละเอียดชุดข้อมูล: pipeline/datacard.md
เอกสารวิจัยและกรอบการทำงาน (Research & Governance)
เอกสาร | เนื้อหา |
อธิบายโมเดล 5+1 Star Open Data ตั้งแต่ Level 1-6 | |
วิเคราะห์โครงสร้างข้อมูลจาก API และแผนทำ AI-Ready | |
Checklist ตรวจสอบว่าข้อมูลผ่านเกณฑ์ AI-Ready หรือไม่ | |
กรอบธรรมาภิบาล AI & Data ตามมาตรฐาน PDPA และ DGS | |
คู่มือเพิ่ม MCP Tools + Prompt Templates สำหรับใช้ AI ช่วยเขียนโค้ด | |
อธิบาย RAG vs MCP vs Keyword Search — โปรเจกต์นี้อยู่ตรงไหน | |
อธิบาย Data Ingestion vs ETL vs Pipeline — แต่ละคำหมายถึงอะไร | |
พจนานุกรมศัพท์ 50+ คำ — Data, AI, MCP, Docker, Governance | |
วิธีทดสอบและ Debug MCP Tools ก่อน Deploy | |
18 ข้อผิดพลาดที่มักเจอ พร้อมวิธีแก้ไข |
สิ่งที่ทีมงานจะได้รับ
เข้าใจมาตรฐาน AI-Ready: เห็นภาพว่า Level 6 มีองค์ประกอบอะไรบ้าง
ต้นแบบ Pipeline: โค้ด ETL + MCP Server ที่นำไปปรับใช้กับแหล่งข้อมูลอื่นได้ทันที
เพิ่มมูลค่าข้อมูล: เปลี่ยน "ข้อมูลดิบ" ให้เป็น "ฐานความรู้" (Knowledge Base) สำหรับ AI Agent
กรอบ Governance: มีแนวทางดูแลข้อมูลและ AI ตามมาตรฐานสากล
Tech Stack
Component | Technology |
Language | Python 3.12 |
Data Processing | Pandas, PyArrow |
MCP Server | FastMCP (mcp[cli]) |
Web Framework | FastAPI, Uvicorn |
Streaming | SSE (Server-Sent Events) |
Container | Docker, Docker Compose |
Data Formats | Parquet, JSONL |
จัดทำขึ้นโดย Antigravity เพื่อสาธิตการเปลี่ยนผ่านข้อมูลสาธารณะสู่ยุค AI อย่างเป็นรูปธรรม
This server cannot be deployed
Maintenance
Related MCP Connectors
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
- geoOAuthco.thinair
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
Gas and fuel prices by station and area, as structured data via a hosted MCP server.
290+ quality-scored API capabilities for AI agents across 27 countries via MCP.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to search, compare, and track prices across 40+ retailers in Southeast Asia and the US using MCP tools.2-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query real-time fuel availability (92/95/98/100/diesel) at Russian petrol stations from two crowd-sourced maps, including queue status, prices, and location-based search.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to look up real-time fuel prices at over 14,000 German gas stations, find the cheapest E5, E10, or diesel near a place or GPS coordinates, and return only open stations sorted by price.MIT
- FlicenseNot gradedqualityCmaintenancePay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.-