620 ลูกค้า · 7,600+ records · 3 กลุ่มธุรกิจ · MCP SSE Protocol
| Endpoint | https://db.panupong.net/mcp |
| Transport | SSE (Server-Sent Events) |
| Auth | API Key ใน Header X-API-Key |
| SSL | Let's Encrypt (auto-renew) |
| Infra | Docker · PostgreSQL · 500 max connections |
| Tool | คำอธิบาย | ตัวอย่าง Prompt |
|---|---|---|
| query | รัน SQL (SELECT / INSERT / UPDATE / DELETE) | "ลูกค้า energy 10 อันดับแรก" |
| list_tables | แสดง 17 ตาราง + จำนวนแถว | "มีตารางอะไรบ้าง" |
| describe_table | โครงสร้างตาราง (ชื่อคอลัมน์, type, nullable) | "อธิบายตาราง pharma_customers" |
| reset_data | รีเซ็ตเป็น seed (ต้อง confirm: true) | "reset ข้อมูลหน่อย" |
หลังใส่ config แล้ว ลองถาม AI:
มีตารางอะไรบ้างในฐานข้อมูล?
ถ้าตอบกลับมาแสดง 17 ตาราง → เชื่อมต่อสำเร็จ
Cmd+Shift+P → "MCP: Add Server"bgrimm-db → Type: sse → วาง URLX-API-Key = key ของคุณหรือแก้ .cursor/mcp.json:
{
"mcpServers": {
"bgrimm-db": {
"url": "https://db.panupong.net/mcp",
"headers": {
"X-API-Key": "bg-t1-chun-xxxxxxxxxxxxxxxx"
}
}
}
}
{
"servers": {
"bgrimm-db": {
"type": "sse",
"url": "https://db.panupong.net/mcp",
"headers": {
"X-API-Key": "bg-t1-chun-xxxxxxxxxxxxxxxx"
}
}
}
}
วางใน .vscode/mcp.json หรือ Cmd+Shift+P → "MCP: Add Server..."
mcp:
bgrimm-db:
transport: sse
url: https://db.panupong.net/mcp
headers:
X-API-Key: bg-t1-chun-xxxxxxxxxxxxxxxx
วางใน ~/.config/opencode/config.yaml
{
"mcpServers": {
"bgrimm-db": {
"url": "https://db.panupong.net/mcp",
"headers": {
"X-API-Key": "bg-t1-chun-xxxxxxxxxxxxxxxx"
}
}
}
}
วางใน ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"bgrimm-db": {
"command": "npx",
"args": ["-y", "@anthropic-ai/mcp-client-sse"],
"env": {
"MCP_URL": "https://db.panupong.net/mcp",
"MCP_HEADERS": "{\"X-API-Key\":\"bg-t1-chun-xxxxxxxxxxxxxxxx\"}"
}
}
}
}
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
พิมพ์ภาษาไทยได้เลย — AI จะเรียก tool ให้อัตโนมัติ:
มีตารางอะไรบ้าง?
ลูกค้าโรงพยาบาลที่มียอดซื้อสูงสุด 5 อันดับ
โรงไฟฟ้าไหนผลิตไฟได้มากที่สุด?
ช่วยดึงข้อมูลลูกค้า AC ที่เป็น retail ทั้งหมด
เปรียบเทียบยอดขาย energy ระหว่าง industrial กับ utility
ลูกค้า pharma ที่เป็น hospital และมีเตียงเกิน 500
อธิบายโครงสร้างตาราง energy_customers
reset ข้อมูลกลับเป็นค่าเริ่มต้น
| กลุ่ม | ตาราง | ข้อมูล |
|---|---|---|
| พลังงาน | energy_customers | 225 ลูกค้า (PTTGC, EGAT, Amata...) |
| energy_production | 3,006 records | |
| energy_contracts | 450 สัญญา | |
| power_plants | 20 โรงไฟฟ้า | |
| โรงงานยา | pharma_customers | 225 ลูกค้า (รพ.ศิริราช, DKSH...) |
| pharma_orders | 1,245 คำสั่งซื้อ | |
| pharma_batches | 28 แบตช์ | |
| pharma_products | 30 ผลิตภัณฑ์ | |
| pharma_quality_tests | ผลตรวจคุณภาพ | |
| AC | ac_customers | 170 ลูกค้า (HomePro, 7-Eleven...) |
| ac_orders | 740 คำสั่งซื้อ | |
| ac_models | 25 รุ่น | |
| ac_production | 725 records | |
| ac_inventory | สต๊อกสินค้า | |
| ac_service_records | บันทึกการบริการ | |
| ทั่วไป | employees | 80 คน |
| departments | 20 แผนก |
SELECT name, customer_type, industry, contract_mw, province
FROM energy_customers ORDER BY contract_mw DESC LIMIT 10;
SELECT name, customer_type, beds, annual_order_value_mb
FROM pharma_customers WHERE customer_type='hospital'
ORDER BY annual_order_value_mb DESC;
SELECT segment, count(*) as customers, SUM(annual_value_mb)
FROM ac_customers GROUP BY segment ORDER BY 3 DESC;
SELECT 'Energy' as business, SUM(annual_consumption_gwh * 2500)
FROM energy_customers
UNION ALL SELECT 'Pharma', SUM(annual_order_value_mb)
FROM pharma_customers
UNION ALL SELECT 'AC', SUM(annual_value_mb) FROM ac_customers;
https:// (ไม่ใช่ http)X-API-Key — ตัวพิมพ์ใหญ่-เล็กตามนี้B.Grimm MCP SSE — OKมีตารางอะไรบ้าง? — ถ้าตอบไม่ได้ แสดงว่ายังเชื่อมไม่สำเร็จ