Finance Toolkit
500+ transparent financial methods calculated from raw statements, not third-party endpoints.
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
MCP server for Swiss federal finances (EFV): budget, debt, forecasts and spending data
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"swiss-efv": {
"command": "uvx",
"args": [
"swiss-efv-mcp"
]
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add swiss-efv -- uvx swiss-efv-mcpวางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"swiss-efv": {
"command": "uvx",
"args": [
"swiss-efv-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"swiss-efv": {
"type": "stdio",
"command": "uvx",
"args": [
"swiss-efv-mcp"
]
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 9 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub malkreide ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.4.0) เข้า registry 44 วันที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย
ในหมวดเดียวกันมี Finance Toolkit, SolidInvoice, Korea Tax Calculator
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
500+ transparent financial methods calculated from raw statements, not third-party endpoints.
Create and send invoices and quotes, manage clients, and track payments in SolidInvoice.
Korean tax calculation and tax-audit judgment MCP: 96 tools with statutory citations.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
🇨🇭 Part of the Swiss Public Data MCP Portfolio — open-source MCP servers connecting AI agents to Swiss public and open data.
This is a private project. It is independent of any employer or institutional affiliation.
MCP server for Swiss federal finances (EFV): budget, debt, forecasts and spending by task and institution.
🇩🇪 Deutsche Version
This server closes the fiscal gap in the portfolio's Economics & Finance cluster. swiss-snb-mcp already covers monetary policy; swiss-efv-mcp adds the state budget — federal revenue, expenditure, balance, debt ratios (with forecasts to 2029), a hierarchical budget drill-down, and spending by department. Data comes from the Eidgenössische Finanzverwaltung (EFV) via opendata.swiss (OGD Schweiz).
is_projection so actuals and plan/forecast years are unambiguous.dump_status never returns empty silently.stdio (local) and SSE (cloud).*"How has the federal balance developed since the SNB rate turnaround in 2022 —
and which task areas absorbed the growth in spending?"*
fiscal_headline(variable="saldo", household="bund", year_from=2021)
fiscal_budget_breakdown(topic="Ausgaben nach Aufgabengebiet", level=2)
Cross-read with swiss-snb-mcp, this connects the interest-rate cycle to the federal deficit — something neither server can answer alone.
uv / uvx (recommended) or pipdata.finance.admin.ch and efv.admin.ch — no API key neededuvx swiss-efv-mcp # zero-install run (once published to PyPI)
pip install swiss-efv-mcp
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": { "swiss-efv": { "command": "uvx", "args": ["swiss-efv-mcp"] } } }
# Run locally over stdio (default transport)
uvx swiss-efv-mcp
PYTHONPATH=src python -m swiss_efv_mcp
All configuration is loaded once into a typed Settings object (pydantic-settings). The legacy unprefixed names below keep working; the canonical names use the EFV_MCP_ prefix. Defaults are safe for local use.
| Variable | Default | Purpose |
|---|---|---|
TRANSPORT | stdio | Transport: stdio (Claude Desktop) or sse / streamable-http (cloud) |
HOST | 127.0.0.1 | Bind host (SSE only). Loopback by default; set 0.0.0.0 only in a container |
PORT | 8000 | Bind port (SSE only) |
EFV_MCP_LOG_LEVEL | INFO | structlog level (JSON to stderr) |
EFV_MCP_CORS_ORIGINS | [] | SSE only: explicit allowed browser origins (default-deny; comma-separated or JSON) |
EFV_MCP_OTEL_ENABLED | false | Enable OpenTelemetry tracing (requires the otel extra); standard OTEL_* env vars configure export |
Cloud (Render / Railway):
TRANSPORT=sse PORT=8000 swiss-efv-mcp # exposes /sse
| Tool | Purpose |
|---|---|
fiscal_headline | Revenue / expenditure / balance / debt ratios over 1990–2029, per household and model; every point flags is_projection |
fiscal_budget_breakdown | Hierarchical federal budget by topic (Ausgaben nach Art / nach Aufgabengebiet, Einnahmen, Bilanz, …) |
fiscal_by_institution | Spending per department / administrative unit since 2007 (Personalausgaben, Informatik, external services, FTE) |
fiscal_list_dimensions | Discover valid parameter values — call this first to build correct arguments |
fiscal_status | Cache freshness and upstream health per dataset; never returns empty silently |
dump_status | Deprecated alias of fiscal_status (kept for backward compatibility; removed in a future minor) |
All tools are read-only: each is annotated readOnlyHint: true, destructiveHint: false, only issues HTTP GETs against the EFV dump files, and has no write, send, or filesystem capability.
MCP primitives. This server uses only the Tools primitive. The EFV data are sliced live from cached dumps with no stable resource hierarchy to expose as *Resources*, and there are no server-authored *Prompts*. The five tools are small and closely related, so they live in a single server.py rather than a tools/ package.
┌──────────────────────────────┐
Claude / Agent ──▶ │ swiss-efv-mcp (FastMCP) │ │ 5 tools · Pydantic v2 env. │ └───────────────┬──────────────┘ │ fetch + retry + TTL cache ┌───────────────────────┴───────────────────────┐ ▼ ▼ data.finance.admin.ch efv.admin.ch/dam fs_dashboard/main_extern.csv bundeshaushalt_de.csv (headline, 1990–2029) institutionen_de.csv
This server uses Architecture C (Dump-first).
Rationale (verified live on 2026-07-24):
standardauswertung.csv 157 MB, fir_art_funk.csv 1.23 GB) are out of scope for v0.1.0; loading them per request is not viable. A future Phase 2 would pre-process them into SQLite/Parquet.Consequences:
dump_status always returns a readable state.swiss-efv-mcp/
├── src/swiss_efv_mcp/ │ ├── init.py │ ├── main.py # entry point; dual transport (stdio / SSE+CORS) │ ├── client.py # dump-first data layer: egress allow-list, retry, UA, TTL cache │ ├── logging_config.py # structlog JSON to stderr │ ├── models.py # Pydantic v2 envelopes (source + provenance) │ ├── server.py # 5 FastMCP tools (annotated) + testable *_impl functions │ └── settings.py # typed pydantic-settings config ├── tests/ # respx mock tests + hardening tests + @pytest.mark.live ├── docs/ # network-egress.md + accepted-risk ADRs ├── audits/ # MCP best-practice audit runs (findings, report, summary) ├── README.md · README.de.md · CHANGELOG.md · SECURITY.md · CONTRIBUTING.md ├── Dockerfile · server.json · LICENSE └── pyproject.toml
readOnlyHint: true, only issues HTTP GETs against the EFV dump files, and has no write, send, or filesystem capability.ALLOWED_HOSTS frozenset + assert_host_allowed() is enforced before every request (HTTPS-only, two fixed EFV hosts). URLs are hardcoded constants; no user input builds a URL. See docs/network-egress.md.User-Agent is injected because the endpoints 403 the default httpx/curl UA (see Known limitations) — do not remove it.mask_error_details=True plus client-side masking keep raw upstream/internal detail out of tool results; full detail goes only to the structlog stderr log.1900–2100, level 1–8, string max_length).dump_status always returns a readable state and never a silent empty.HOST, default 127.0.0.1; set HOST=0.0.0.0 only inside a container (the provided Dockerfile does). Browser origins must be listed explicitly via EFV_MCP_CORS_ORIGINS.audits/ and SECURITY.md. Accepted risks are documented as ADRs under docs/adr/.Live-probe findings (2026-07-24), also in CHANGELOG.md → Known findings:
| Finding | Impact |
|---|---|
| Endpoints return HTTP 403 without a browser User-Agent | UA is injected by the client; do not remove it |
| opendata.swiss "CSV" links for 2 datasets point to an HTML landing page | real files resolved to a DAM path (/dam/de/sd-web/{id}/…) whose opaque id may rotate on re-upload |
NA appears as a literal string in hh/model/source | cleaned to None centrally |
"Forward-looking" is not one label: Bund uses "Budget/financial plans", staat uses "Forecasts" | abstracted via is_projection |
| Accounting-model break at 2022/2023 ("bis 2022" vs "ab 2023" topics) | series has a seam; a note flags affected topics |
| Detail cubes (157 MB / 1.23 GB) not served | Phase 2; use the curated files for now |
This server is in Phase 1 (read-only). Every tool only ever fetches the public EFV dump files — there are no write, send, or filesystem capabilities.
| Phase | Scope | Status |
|---|---|---|
| 1 — Read-only | Headline series, budget breakdown, spending by institution | ✅ current |
| 2 — Detail cubes | Pre-process the 157 MB / 1.23 GB cubes to SQLite/Parquet | planned |
| 3 — Multi-agent | (none planned) | — |
A transition to a later phase would require a re-audit before any write-capable tool is added.
This server is native to MCP spec `2026-07-28` and still serves the older handshake era, so both pins are stated — a single number would describe only half of what clients actually get.
| Era | Revision | How a conne
ตัดมาแค่ช่วงต้น อ่านต่อใน repo