ckan-thaigdc-mcp
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., "@ckan-thaigdc-mcp ค้นหาชุดข้อมูลประชากรใน NSO ที่มีไฟล์ CSV"
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.
ckan-thaigdc-mcp
MCP server สำหรับค้นหาและอ่านข้อมูลจาก CKAN โดยออกแบบมาสำหรับระบบบัญชีข้อมูลภาครัฐของไทยที่ใช้ ckanext-thai_gdc และใช้กับ CKAN ทั่วไปได้ด้วย
เวอร์ชันนี้อ่านอย่างเดียว ไม่ส่ง token และเห็นเฉพาะข้อมูลสาธารณะ
สิ่งที่ทำได้
Tool | หน้าที่ |
| แสดงไซต์ที่ตั้งค่าไว้ |
| เวอร์ชัน ประเภท catalog จำนวนชุดข้อมูล และความสามารถของไซต์ |
| ค้นชุดข้อมูล พร้อมตัวกรองและการนับตามหมวด |
| ดู metadata และรายการไฟล์ของชุดข้อมูล |
| ดูรายละเอียดไฟล์ คอลัมน์ และจำนวนแถว |
| ดึงข้อมูลในตาราง กรอง เรียง และหาค่าที่ไม่ซ้ำ |
| แสดงหรือค้นหน่วยงาน |
| แสดงหรือค้นกลุ่ม |
| ค้นแท็กและคำค้นที่ระบบแนะนำ |
| ดูฟิลด์ metadata ฟิลด์บังคับ และค่าที่เลือกได้ |
| หาชุดข้อมูลที่ส่งต่อไปยัง catalog อื่นด้วย |
ตัวอย่างคำถาม:
"ใน NSO มีชุดข้อมูลเกี่ยวกับประชากรที่มีไฟล์ CSV อะไรบ้าง"
"ขอร้อยละครัวเรือนที่มีแท็บเล็ตของภาคเหนือ เรียงจากมากไปน้อย"
"จังหวัดกาฬสินธุ์รับชุดข้อมูลอะไรจาก NSO บ้าง"
Related MCP server: CKAN MCP Server
ติดตั้ง
ต้องมี Node.js 20.3 ขึ้นไป
git clone https://github.com/nungsatick/ckan-thaigdc-mcp.gitcd ckan-thaigdc-mcpnpm installnpm install จะ build ให้เองที่ dist/index.js จากนั้นดู path เต็มของไฟล์นี้ไว้ใช้ในขั้นตอนถัดไป
node -e "console.log(require('path').resolve('dist/index.js'))"ตัวอย่างด้านล่างใช้ C:/path/to/ckan-thaigdc-mcp/dist/index.js ให้เปลี่ยนเป็น path ของคุณ บน Windows ใช้ / ได้เลย
ตั้งค่ากับ AI แต่ละตัว
Claude Code
claude mcp add --env "CKAN_SITES=nso=https://catalog.nso.go.th,gdcatalog=https://gdcatalog.go.th" --transport stdio --scope user ckan-thaigdc-mcp -- node C:/path/to/ckan-thaigdc-mcp/dist/index.jsตรวจสอบด้วยคำสั่งนี้ หรือพิมพ์ /mcp ใน Claude Code
claude mcp get ckan-thaigdc-mcp--scope userใช้ได้ทุกโปรเจกต์ ถ้าต้องการแชร์เฉพาะโปรเจกต์ให้ใช้--scope projectซึ่งจะสร้าง.mcp.jsonถ้าจะใช้ไซต์เริ่มต้นทั้งหมด ไม่ต้องใส่
--env
Claude Desktop
เปิด Settings > Developer > Edit Config แล้วเพิ่มส่วนนี้ลงในไฟล์ที่เปิดขึ้นมา
{
"mcpServers": {
"ckan-thaigdc-mcp": {
"command": "node",
"args": ["C:/path/to/ckan-thaigdc-mcp/dist/index.js"],
"env": {
"CKAN_SITES": "nso=https://catalog.nso.go.th,gdcatalog=https://gdcatalog.go.th"
}
}
}
}ปิด Claude Desktop ให้สนิทรวมถึงที่ system tray แล้วเปิดใหม่
ไฟล์นี้ปกติอยู่ที่ %APPDATA%\Claude\claude_desktop_config.json แต่ถ้าติดตั้งจาก Microsoft Store อาจอยู่ที่อื่น จึงควรเปิดผ่านเมนู Edit Config ถ้ามี mcpServers อยู่แล้ว ให้เพิ่มเฉพาะ ckan-thaigdc-mcp เข้าไป
Codex (CLI, IDE extension, ChatGPT desktop)
ทั้งสามตัวใช้ไฟล์ตั้งค่าเดียวกันคือ ~/.codex/config.toml (Windows: %USERPROFILE%\.codex\config.toml) ให้เพิ่มส่วนนี้
[mcp_servers.ckan-thaigdc-mcp]
command = "node"
args = ["C:/path/to/ckan-thaigdc-mcp/dist/index.js"]
[mcp_servers.ckan-thaigdc-mcp.env]
CKAN_SITES = "nso=https://catalog.nso.go.th,gdcatalog=https://gdcatalog.go.th"หรือเพิ่มด้วยคำสั่ง
codex mcp add ckan-thaigdc-mcp --env "CKAN_SITES=nso=https://catalog.nso.go.th,gdcatalog=https://gdcatalog.go.th" -- node C:/path/to/ckan-thaigdc-mcp/dist/index.jsตรวจสอบด้วยคำสั่งนี้ หรือพิมพ์ /mcp ใน Codex
codex mcp listGoogle Antigravity
เปิดไฟล์ตั้งค่า
IDE: กด … ด้านบนแผง agent > MCP Servers > Manage MCP Servers > View raw config
App หรือ CLI: แก้ไฟล์
~/.gemini/config/mcp_config.jsonโดยตรง (Windows:%USERPROFILE%\.gemini\config\mcp_config.json)
เพิ่มส่วนนี้
{
"mcpServers": {
"ckan-thaigdc-mcp": {
"command": "node",
"args": ["C:/path/to/ckan-thaigdc-mcp/dist/index.js"],
"env": {
"CKAN_SITES": "nso=https://catalog.nso.go.th,gdcatalog=https://gdcatalog.go.th"
}
}
}
}โหลดใหม่
App: Settings > Customizations > Installed MCP Servers แล้วกดปุ่ม refresh
CLI: พิมพ์
/mcpแล้วเลือกโหลดใหม่IDE: ถ้ายังไม่เห็น tools ให้ปิดแล้วเปิดใหม่
Antigravity รุ่นเก่าใช้ไฟล์ ~/.gemini/antigravity/mcp_config.json ถ้าแก้แล้วไม่เห็นผล ให้ใช้เมนู View raw config เพื่อดูว่ารุ่นของคุณอ่านไฟล์ใด
AI อื่น ๆ
โปรแกรมที่รองรับ MCP แบบ stdio ส่วนใหญ่ใช้ค่าเดียวกันนี้: command คือ node, args คือ path ของ dist/index.js และ env คือ CKAN_SITES
เลือกไซต์ด้วย CKAN_SITES
กำหนดในรูปแบบ ชื่อย่อ=URL คั่นด้วยจุลภาค server จะเรียกได้เฉพาะไซต์ในรายการนี้
CKAN_SITES=nso=https://catalog.nso.go.th,kalasin=https://kalasin.gdcatalog.go.th,local=http://localhost:8881ใช้
http://ได้เฉพาะlocalhostส่วนไซต์อื่นต้องเป็นhttps://ถ้าไม่กำหนด จะใช้
nso,gdcatalog,datagoth,statprovince,kalasin
แก้ปัญหาเบื้องต้น
อาการ | สิ่งที่ควรตรวจ |
ไม่เห็น tools | path ใน |
| ใช้ path เต็มของ Node เป็น |
| รัน |
| เพิ่มไซต์นั้นใน |
ไซต์ไม่ตอบ | ลองใหม่หรือลด |
ทดสอบ server โดยไม่ต้องใช้ AI:
npx @modelcontextprotocol/inspector node dist/index.jsพัฒนาต่อ
npm testnpm run buildnpm run smoke เรียก tools ทุกตัวกับไซต์จริง เลือกไซต์ได้ด้วย SMOKE_SITE และ CKAN_SITES
ผลการศึกษา API และแผนเฟสถัดไปอยู่ใน docs/ckan-api-research.md
License
Available Tools
11 toolsckan_find_federated_copiesFind Federated Dataset CopiesARead-onlyIdempotent
Find datasets on other catalogs that were copied from a source catalog, using their reference_url_catalog field. Searches several sites and reports a per-site result, including sites that fail.
Examples:
"ชุดข้อมูลนี้ถูกส่งไปจังหวัดไหนบ้าง" -> source_url="https://catalog.nso.go.th/dataset/ns_16_20305"
"จังหวัดกาฬสินธุ์รับอะไรจาก NSO บ้าง" -> source_url="https://catalog.nso.go.th", match="prefix", sites=["kalasin"]
Inputs: source_url (required), limit, match, sites, +1 more.
ckan_get_datasetGet CKAN DatasetARead-onlyIdempotent
Get one dataset's metadata and its files (resources). Each resource says whether it is queryable: if so, pass its id to ckan_query_data; if not, give the user its url.
Use ckan_search_datasets to find ids. detail="full" returns the catalog's raw record, which is much longer.
Inputs: id (required), site (required), detail, response_format.
ckan_get_resourceGet CKAN ResourceARead-onlyIdempotent
Get one file's details. For a queryable resource this also returns its columns, their types and the row count, which ckan_query_data needs for filters and sorting.
Values are often stored as text, including years such as "2565Q2", so check column types before comparing them.
Inputs: site (required), resource_id (required), response_format.
ckan_get_schemaGet CKAN Metadata SchemaARead-onlyIdempotent
Get a catalog's metadata fields: their labels, whether they are required, and allowed values.
Use this to learn what a field means, or the exact value to filter on: values are usually Thai and differ from English-looking names (update_frequency_unit is 'ปี', not 'year').
By default choices are only counted. Pass field="objective" or include_choices=true to see them.
Inputs: site (required), field, limit, offset, +3 more.
ckan_list_groupsList CKAN GroupsARead-onlyIdempotent
List a catalog's groups with dataset counts, or find them by name. Pass the returned name as the group filter of ckan_search_datasets.
Example: "หน่วยงานที่ชื่อมีคำว่าสถิติ" -> query="สถิติ" (returns matches without dataset counts).
Inputs: site (required), limit, query, offset, +1 more.
ckan_list_organizationsList CKAN OrganizationsARead-onlyIdempotent
List a catalog's organizations with dataset counts, or find them by name. Pass the returned name as the organization filter of ckan_search_datasets.
Example: "หน่วยงานที่ชื่อมีคำว่าสถิติ" -> query="สถิติ" (returns matches without dataset counts).
Inputs: site (required), limit, query, offset, +1 more.
ckan_list_sitesList CKAN SitesARead-onlyIdempotent
List the CKAN catalogs this server may query, with the aliases other tools take as site. Call this first when you do not know which catalog to use.
Inputs: response_format.
ckan_query_dataQuery CKAN TableARead-onlyIdempotent
Read rows from a queryable resource, with filters, full-text search, column selection, sorting and distinct values. Only works where ckan_get_dataset shows the resource as queryable.
Call ckan_get_resource first for the column names: an unknown column is an error.
Examples:
Rows for one region -> filters={"region": "ภาคเหนือ"}
Several values -> filters={"region": ["ภาคเหนือ", "ภาคใต้"]}
Which regions exist -> fields=["region"], distinct=true
Highest values first -> sort="Per_HH_Tablet desc", limit=5
Inputs: site (required), resource_id (required), q, sort, +6 more.
ckan_search_datasetsSearch CKAN DatasetsARead-onlyIdempotent
Search one catalog's public datasets, with optional filters and counts per category (facets). Returns compact summaries; use ckan_get_dataset for full metadata and the file list.
Examples:
"ชุดข้อมูลเกี่ยวกับประชากร" -> query="ประชากร"
Words that must be in the title -> title="ประชากร อายุ"
"สถิติที่มีไฟล์ CSV" -> query="สถิติ", format="CSV", data_type="stat"
"มีหน่วยงานไหนบ้างและชุดข้อมูลละกี่ชุด" -> limit=0, facets=["organization"]
Use names returned by facets, ckan_list_organizations or ckan_list_groups for the organization and group filters.
Inputs: site (required), fq, tag, sort, +10 more.
ckan_search_tagsSearch CKAN TagsARead-onlyIdempotent
Find tags containing some text, plus search terms the catalog suggests where available. Pass a returned tag as the tag filter of ckan_search_datasets.
Example: query="ประชากร".
Inputs: site (required), query (required), limit, offset, +1 more.
ckan_site_infoGet CKAN Site InfoARead-onlyIdempotent
Get a catalog's CKAN and Thai GDC versions, catalog type, dataset count and features.
Use this to check whether a site supports something before relying on it: capabilities.datastore means tabular data may be queryable with ckan_query_data, capabilities.scheming means ckan_get_schema works.
Inputs: site (required), response_format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Most tools target clearly distinct resources and actions (search datasets vs get dataset vs query data vs get resource). The main potential confusions are ckan_list_sites vs ckan_site_info (both about catalogs) and ckan_list_organizations vs ckan_list_groups, but the descriptions clarify the boundaries reasonably well.
All names share a ckan_ prefix and predominantly follow verb_noun (list_sites, search_datasets, get_dataset, query_data, get_schema). Minor deviations like ckan_site_info (noun-only, not get_site_info) and ckan_find_federated_copies (find instead of get/search) are small inconsistencies.
11 tools is well within the ideal 3-15 range and each tool covers a distinct facet of CKAN exploration. Nothing feels redundant or missing at the count level.
The surface covers discovery (sites, orgs, groups, tags), search, metadata retrieval, schema inspection, and tabular data querying, plus federated copy lookup — comprehensive for a read-only catalog client. There are no write/CRUD operations and no direct resource download tool (users are told to use the URL), but these are minor gaps for the apparent read-only purpose.
Related MCP Connectors
Read-only discovery for Malaysian public datasets with freshness, licence, and provenance.
Read-only tools for the approved public KOKU SCRIPTS AI Catalog.
Read-only search of 2,189 AI agent tools (MCP servers, x402 APIs) with daily automated trust scores.
Read-only MCP tools for AI agent discovery, structured resources, and NIULAI information.
Related MCP Servers
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants and CLI tools to explore and analyze datasets from 600+ global CKAN open-data portals. Provides comprehensive tools for dataset discovery, datastore queries, metadata analysis, and local downloads without writing custom CKAN integrations.14MIT
- AlicenseAqualityAmaintenanceEnables AI assistants to search, explore, and query any CKAN open data portal through natural language, making public datasets accessible without requiring knowledge of the portal's API.201,648 npm82MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search and read Thailand's official open-government data from data.go.th, providing tools to search datasets, retrieve full records, and browse categories without API keys.MIT

mcp-data-lvofficial
AlicenseNot gradedqualityCmaintenanceEnables AI agents to search, retrieve metadata, and query tabular resources from Latvia's Open Data portal (data.gov.lv) via CKAN.76 npmMIT