Supabase
server ทางการของ Supabase ให้ AI สร้างตาราง ถามข้อมูล และดูการตั้งค่าโปรเจกต์ในฐานข้อมูล Supabase ของคุณ
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
BFS STAT-TAB PxWeb API for official Swiss statistics
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"swiss-statistics": {
"command": "uvx",
"args": [
"swiss-statistics-mcp"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add swiss-statistics -- uvx swiss-statistics-mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"swiss-statistics": {
"command": "uvx",
"args": [
"swiss-statistics-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"swiss-statistics": {
"type": "stdio",
"command": "uvx",
"args": [
"swiss-statistics-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub malkreide ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.8.0) เข้า registry 43 วันที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Supabase, MongoDB MCP Server, Elasticsearch MCP Server
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
server ทางการของ Supabase ให้ AI สร้างตาราง ถามข้อมูล และดูการตั้งค่าโปรเจกต์ในฐานข้อมูล Supabase ของคุณ
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
🇨🇭 Part of the [Swiss Public Data MCP Portfolio](https://github.com/malkreide)
MCP Server for Swiss Federal Statistical Office (BFS) data via STAT-TAB PxWeb API — 682 datasets across 21 themes, no authentication required
🇩🇪 Deutsche Version
This server is Alpha (0.x) as per the PyPI classifier. Until 1.0:
mainSee CHANGELOG.md for breaking changes.
swiss-statistics-mcp provides AI-native access to the Swiss Federal Statistical Office (BFS) via the STAT-TAB PxWeb API, without authentication:
| Property | Details |
|---|---|
| API | STAT-TAB PxWeb API v1 |
| Endpoint | https://www.pxweb.bfs.admin.ch/api/v1/ |
| Provider | Swiss Federal Statistical Office (BFS) |
| Datasets | 682 tables across 21 thematic areas |
| Languages | German (de), French (fr), Italian (it), English (en) |
| Licence | Open Government Data (OGD) — BFS Terms of Use |
| Authentication | None — fully public |
Anchor demo query: *"How many students attended lower secondary schools in the canton of Zurich in 2024?"* — real BFS figures, no hallucination.
# Clone the repository
git clone https://github.com/malkreide/swiss-statistics-mcp.git cd swiss-statistics-mcp
pip install -e .
uv pip install -e .
Or with uvx (no permanent installation):
uvx swiss-statistics-mcp
# stdio (for Claude Desktop)
python -m swiss_statistics_mcp.server
python -m swiss_statistics_mcp.server --http --port 8000
MCP_HOST=0.0.0.0 python -m swiss_statistics_mcp.server --http --port 8000
python -m swiss_statistics_mcp.server --http --host 0.0.0.0 --port 8000
Try it immediately in Claude Desktop:
*"How many teachers worked in the canton of Zurich in 2023?"*
*"What is the population of canton Bern broken down by age?"*
*"Compare the social assistance rate across all cantons for 2022."*
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": { "swiss-statistics": { "command": "python", "args": ["-m", "swiss_statistics_mcp.server"] } } }
Or with uvx:
{
"mcpServers": { "swiss-statistics": { "command": "uvx", "args": ["swiss-statistics-mcp"] } } }
Config file locations:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonThe configuration syntax is identical to Claude Desktop. The file name depends on the client:
.cursor/mcp.json in the project folder, or ~/.cursor/mcp.json globally~/.codeium/windsurf/mcp_config.json.continue/config.jsonFor use via claude.ai in the browser (e.g. on managed workstations without local software).
⚠️ Security note — this server has no authentication. A public URL
turns it into an open proxy to the BFS API on your deployment's IP. Any
client with the URL can drive the tools, consume your platform quota, and
attribute traffic to your IP. Two mitigations, in order of preference:
1. Put it behind access control — Render's «Private Service», Cloudflare
Access, or a reverse proxy with Basic-Auth / IP allowlist in front of the
container.
2. Accept it as a public open-data proxy — only acceptable because all
data is BFS OGD (Public Open Data) and tools are read-only.
The server binds to
127.0.0.1by default. To expose it on a container
port you must explicitly set
MCP_HOST=0.0.0.0(e.g. as a Render env var)
or pass
--host 0.0.0.0. Do not do this without one of the mitigations above.
Render.com:
MCP_HOST=0.0.0.0python -m swiss_statistics_mcp.server --http --port 8000https://your-app.onrender.com/sse💡 *"stdio for the developer laptop, SSE for the browser."*
Since v0.2.0, every tool returns a typed Pydantic model rather than a JSON string. FastMCP serializes these as structured content so MCP clients can read fields directly.
# Old (pre-0.2.0)
result = await bfs_get_data(...) # str data = json.loads(result) # dict print(data["rows_total"])
result = await bfs_get_data(...) # DataTableResult print(result.rows_total) # 1000 print(result.truncated) # True
Every result carries error: str | None and hint: str | None at the top level — result.error is None means success. Data-returning tools (bfs_get_data, bfs_education_stats, bfs_population, bfs_compare_cantons) additionally expose truncated: bool, rows_total: int, and rows_returned: int for machine-readable cap detection.
| Tool | Result type |
|---|---|
bfs_browse_catalog | BrowseCatalogResult |
bfs_search_tables | SearchTablesResult |
bfs_get_table_metadata | TableMetadataResult |
bfs_get_data | DataTableResult |
bfs_education_stats | DataTableResult |
bfs_population | DataTableResult |
bfs_compare_cantons | DataTableResult |
bfs_featured_datasets | FeaturedDatasetsResult |
lookup_commune | LookupCommuneResult |
resolve_historical_commune | ResolveHistoricalCommuneResult |
list_communes | ListCommunesResult |
search_historical_series | SearchHistoricalSeriesResult |
bfs_construction_activity | ConstructionActivityResult |
bfs_construction_investment | ConstructionInvestmentResult |
bfs_price_index | PriceIndexResult |
Reference-layer results additionally carry source (attribution) and provenance (live_api \| cached); SearchHistoricalSeriesResult also carries licence_note with the mandatory HSSO NonCommercial notice. The construction and price-index results carry source + provenance on the same envelope pattern.
| Tool | Description |
|---|---|
bfs_featured_datasets | Curated list of highly relevant datasets (focus on education and demographics) |
bfs_browse_catalog | Browse the catalogue: all 21 themes (no theme_code), or all tables in a theme (e.g. theme_code="15" = Education and Science) |
bfs_search_tables | Full-text search across the entire data catalogue (682 datasets) |
bfs_get_table_metadata | Variables, values and metadata for a specific table |
bfs_get_data | Data retrieval with optional filters by dimensions and values |
bfs_education_stats | Convenience tool: teachers, pupils, demographic scenarios, scholarships |
bfs_population | Resident population by canton, year, age structure or sex |
bfs_compare_cantons | Cross-cantonal comparison for any table and any variable |
lookup_commune | Resolve a commune by name or BFS number as of a given date (canton, validity, LINDAS URI) |
resolve_historical_commune | Map a historical BFS number onto today's number(s) — re-key old statistics across fusions |
list_communes | List all communes of a canton as of a given date |
search_historical_series | Search long-run time series in Historical Statistics of Switzerland (HSSO) |
bfs_construction_activity | New buildings & dwellings per commune (yearly), incl. dwelling room-size mix |
bfs_construction_investment | Building investment & Arbeitsvorrat (leading indicator) by region/canton/commune |
bfs_price_index | Construction price index (Baupreisindex, parsed series) / residential property price index (IMPI, source links) |
Four of these tools form the reference layer of the portfolio (see Join Keys): they turn official BFS commune numbers into a reliable join key and let you re-key statistics that predate a municipal merger. The two bfs_construction_* tools cover STAT-TAB theme 09 (Bau- und Wohnungswesen) — see Construction sources. bfs_price_index covers price indices that are not in STAT-TAB — see Price-index sources.
| Cube ID | Title | Coverage | Used by |
|---|---|---|---|
px-x-0904030000_106 | Neu erstellte Gebäude mit Wohnungen nach Gemeinde, Gebäudetyp | 2013– | bfs_construction_activity |
px-x-0904030000_105 | Neu erstellte Wohnungen nach Gemeinde, Anzahl Zimmer | 2013– | bfs_construction_activity |
px-x-0904010000_205 | Bauinvestitionen und Arbeitsvorrat nach Grossregion/Kanton/Gemeinde | 1994– | bfs_construction_investment |
The pre-2013 Gemeinde-level building series lives in the discontinued cubes
px-x-0904030000_101/_104(1995–2012), which use a different geo coding and are not queried by these tools. Building/dwelling figures are the consolidated official yearly statistics — for up-to-date register states and the construction pipeline, cross-validate againstswiss-housing-mcp(deliberate redundancy).
bfs_price_index covers two indices that are not published via STAT-TAB. Their datasets live on opendata.swiss (CKAN); the data files themselves are BFS DAM assets.
| Index | Source | Returns |
|---|
| baupreisindex | opendata.swiss dataset *Schweizerischer Baupreisindex (Multibasen)* → DAM XLSX asset | Parsed national semi-ann
ตัดมาแค่ช่วงต้น อ่านต่อใน repo