cbs-mcp
Integrates with the Israel Central Bureau of Statistics public price-index API to provide official CPI, housing, construction-input, and other economic indices, including bilingual search, historical data, index comparison, CPI summaries, and index-linkage calculations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Israel's Consumer Price Index, housing and construction-input indices — and a correct הצמדה למדד calculator — for any MCP client.
A Model Context Protocol server that gives AI agents the official price indices of the Israel Central Bureau of Statistics (הלשכה המרכזית לסטטיסטיקה): the CPI (מדד המחירים לצרכן) and its ~350 components, dwelling prices, residential/commercial building inputs (מדד תשומות הבנייה), road construction, agriculture, producer prices and more — about 1,350 indices with bilingual search, chain-linked history across base changes, multi-index comparison, a one-call CPI summary and an index-linkage calculator that matches the official CBS calculator to the agora.
It talks directly to the CBS's free, public price-index API (published by the CBS) at api.cbs.gov.il: no API key, no scraping.
Part of a small family of Israeli MCP servers: boi-mcp (Bank of Israel exchange rates and interest rate), il-opendata-mcp (data.gov.il datasets) and hebrew-il-mcp (ID, phone, VAT, IBAN validators and the Hebrew calendar).
Tools
Tool | What it does |
| The catalog's chapters (consumer prices, housing, producer prices, building/road/agriculture/bus inputs...) in English and Hebrew, each with its main index code and subjects with index counts. |
| Search ~1,350 indices by English or Hebrew text ( |
| Latest value of an index (default: headline CPI |
| History between |
| Rank up to 12 indices by their chain-linked change between two months (default: the CPI and its main groups), with annualized rates and a |
| The latest CPI in one call: headline value, monthly and 12-month inflation, four |
| הצמדה למדד. Adjust an |
Resources
URI | Content |
| Catalog chapters and subjects (same as |
| Hand-picked indices (CPI, core CPI, housing, construction inputs...) and what each is used for — no network |
| The latest CPI summary |
| Latest value and last 13 observations of any index; the template lists and auto-completes the featured codes |
Every tool returns human-readable JSON text and structuredContent. Bad input (unknown code, malformed month, a month that isn't published yet, a future date) produces an MCP isError result with a clear message instead of crashing the session.
Related MCP server: Data.gov.il MCP Server
Index linkage, done right
Index-linked amounts are everywhere in Israel — rent, alimony, salaries, apartment purchase contracts (linked to the building-inputs index), tenders and loans — and they are easy to get subtly wrong:
Base changes. The CBS moves indices to a new base every few years (CPI: "Average 2022" → "Average 2024" in January 2025, coefficient 1.074). Dividing a 2019 value (100.8, base 2018) by a 2025 value (103.6, base 2024) gives +2.8% instead of the real +17.25%. cbs-mcp requests the API's chaining data (
coef=true), which carries each observation's value on every older base, and always compares on a common base.Known index vs. index month. Contracts usually link to the index known on the payment date. CBS publishes month M on the 15th of M+1 at 18:30, so on 1–15 of a month the known index is two months back and from the 16th it is last month's. The
from_date/to_datemode delegates to the official CBS calculator, which applies this rule;from_month/to_monthuses exactly the months you name.Both agree.
100 ₪from the November 2019 CPI to the November 2025 CPI computed locally (chaining coefficient 1.140778) gives 117.25 ₪ — the same result the official calculator returns for 2020-01-01 → 2026-01-01. This exact case is a regression test.Calculator quirks handled. The CBS calculator parses dates as
MM-DD-YYYY(so01-06-2023is 6 January), answers HTTP 500 for future dates or reversed ranges, and the API drops a share of connections. cbs-mcp sends US-ordered dates, validates input up front, retries transient failures with backoff and turns validation errors into readable messages.
Quick start
Claude Desktop / Cursor / any MCP client
{
"mcpServers": {
"cbs": {
"command": "npx",
"args": ["-y", "github:Shtibel1/cbs-mcp"]
}
}
}Claude Desktop: put this in claude_desktop_config.json. Cursor: ~/.cursor/mcp.json (or .cursor/mcp.json in a project).
Or from a local clone:
npm install && npm run build
node dist/cli.js # speaks MCP over stdioThen ask your agent things like:
"My rent is 4,500 ₪ linked to the CPI from March 2025. What should I pay now?"
"What was inflation last month, and which CPI groups rose the most over the past year?"
"חוזה דירה מקבלן צמוד למדד תשומות הבנייה מיוני 2023 — בכמה עלה הסכום של מיליון ש״ח?"
"Chart the CPI since 2015 on a single base."
Hosted: Streamable HTTP
npx -y github:Shtibel1/cbs-mcp --http --port 3000
# → cbs-mcp listening on http://127.0.0.1:3000/mcp
curl http://127.0.0.1:3000/healthz # {"status":"ok","name":"cbs-mcp","version":"0.1.0"}{ "mcpServers": { "cbs": { "url": "http://127.0.0.1:3000/mcp" } } }Flag | Env | Default | Notes |
| off | Serve Streamable HTTP instead of stdio | |
|
|
| |
|
|
| Binds to loopback by default; use |
|
| none | Repeatable flag, or a comma-separated env var. Browser requests from any other |
|
|
| Seconds to cache index data; the catalog is kept 12 hours. |
| Print the version and exit |
The HTTP mode is stateless: every POST /mcp gets a fresh server and transport (sharing one cached client), there are no session ids, and GET/DELETE /mcp return 405, so instances can sit behind any load balancer. Bodies over 1 MB get 413, malformed JSON gets 400.
Docker
docker build -t cbs-mcp .
docker run --rm -p 3000:3000 -e ALLOWED_ORIGINS=https://app.example cbs-mcpThe image runs the HTTP mode as the unprivileged node user on 0.0.0.0:3000 with a HEALTHCHECK against /healthz. CI builds it on every push and smoke-tests the health check, a real tools/list call, the origin guard and the non-root user.
As a library
import { CbsClient } from "cbs-mcp";
const cbs = new CbsClient();
const cpi = await cbs.getLatestIndex(120010); // latest CPI, base, monthly / 12-month change
const hits = await cbs.searchIndices("שכר דירה"); // → 120460 Rent
const history = await cbs.getHistory(120010, "2015-01"); // chain-linked, rebased to the latest base
const rent = await cbs.calculateLinkedAmount({ amount: 4500, from_date: "2025-03-10" });
const contract = await cbs.calculateLinkedAmount({ amount: 1_000_000, code: 200010, from_month: "2023-04", no_decrease: true });Live example
Real output from the built server against the live CBS API, run on 2026-11-22 (Asia/Jerusalem; the latest CPI is October 2026, published 2026-11-15):
Call | Result |
| CPI October 2026: 105.2 (Average 2024 = 100), −0.1% on the month, +1.1% year over year; core ex. fruit/vegetables/housing −0.2%; housing +4.2% YoY leads, clothing & footwear −4.7% and furniture −4.2% fall |
| 46 months, one base change (2025-01, ×1.074), chain-linked +10.44% (2.68%/yr) — a naive comparison of published values would show +2.8% |
| Housing +4.19% · CPI +1.06% · Health +1.06% · ex-energy +0.96% · Food −0.10% · Transport & communication −1.64% · Clothing & footwear −4.70% |
| 117.25 ₪ (100.8 on base 2018 → 103.6 on base 2024, chaining coefficient 1.140778) |
| 117.25 ₪ from the official calculator (known indices 2019-11 → 2025-11) |
| 1,115,607.12 ₪ — residential building inputs, known index 2023-04 → 2026-09, coefficient 1.387 |
| CPI fell 0.57% → floor applied, 5,000 ₪ |
|
|
The first call loads the bilingual catalog (~1.4 s); later searches are served from memory in ~20 ms.
{
"amount": 100,
"code": 120010,
"name": "Consumer Price Index - General",
"method": "index_months",
"from": { "period": "2019-11", "value": 100.8, "base": "Average 2018" },
"to": { "period": "2025-11", "value": 103.6, "base": "Average 2024" },
"chaining_coefficient": 1.140778,
"factor": 1.172466,
"change_pct": 17.247,
"linked_amount": 117.25,
"difference": 17.25,
"no_decrease": false,
"floor_applied": false,
"computed_by": "cbs-mcp (published index values linked with CBS chaining coefficients)",
"source": "Israel Central Bureau of Statistics (הלשכה המרכזית לסטטיסטיקה), api.cbs.gov.il"
}Architecture
flowchart LR
C["MCP client<br/>(Claude Desktop, Cursor, agents)"] -- stdio --> CLI[cli.ts]
R["Remote agents"] -- "POST /mcp" --> H["http.ts<br/>stateless Streamable HTTP<br/>origin check · /healthz"]
CLI --> S["server.ts<br/>7 tools · 4 resources<br/>zod schemas · isError results"]
CLI -- "--http" --> H
H -- "new server per request<br/>shared CbsClient" --> S
S --> CBS
subgraph L["src/lib — no MCP imports"]
CBS["cbs.ts<br/>injectable fetch · retries · paging<br/>history · compare · calculator"]
CACHE["cache.ts<br/>TTL · in-flight dedupe"]
LINK["linkage.ts<br/>chain-linking · rebasing · index floor"]
CAT["catalog.ts<br/>EN+HE tree merge · search"]
MON["months.ts<br/>known index · MM-DD-YYYY · Asia/Jerusalem"]
CBS --> CACHE
CBS --> LINK
CBS --> CAT
CBS --> MON
end
CBS -- "HTTPS · JSON" --> API["api.cbs.gov.il/index<br/>catalog/tree · data/price · data/calculator"]
APP["Your TS app"] -- import --> LHow the data is fetched
Need | CBS API request |
Catalog (chapters → subjects → codes) |
|
Latest values |
|
History / comparison |
|
CPI summary |
|
Known-index linkage |
|
Layout
src/
lib/cbs.ts injectable-fetch client: retries, paging, series parsing, history, compare, CPI summary, calculator
lib/linkage.ts chain-linking across base changes, rebasing to the latest base, base-change detection, index floor
lib/catalog.ts merges the English and Hebrew catalog trees; bilingual search with aliases and niqqud-insensitive matching
lib/months.ts YYYY-MM / MM-YYYY / MM-DD-YYYY formats, known-index rule, publication dates, Israeli "today"
lib/featured.ts hand-picked index codes and the CPI summary basket
lib/cache.ts promise-based TTL cache with in-flight de-duplication
server.ts MCP tools, resources and the resource template (zod schemas)
http.ts stateless Streamable HTTP transport (node:http, no framework)
cli.ts entry: stdio by default, --http for hosted mode
version.ts single source of the version
scripts/
record-fixtures.mjs re-records every fixture from the live API and prints a live check of each tool
test/
scenarios.mjs the live calls whose responses are recorded (shared by the recorder and the tests)
fixtures/ real CBS API responses recorded on 2026-11-22
*.test.ts 75 vitest tests; fetch replays the fixtures, so CI never hits the networkDevelopment
npm test # vitest, replaying recorded CBS responses (no network)
npm run typecheck
npm run build
npm run record-fixtures # refresh fixtures from the live API (then update expected numbers)Attribution
This is an unofficial client. All index data comes from the Israel Central Bureau of Statistics and is subject to its terms of use. Linkage results are informational; for legal or financial disputes rely on the official CBS publications and calculator. This project has no affiliation with the CBS.
Roadmap
Publish to npm so
npx cbs-mcpworks without the GitHub shorthandAverage dwelling prices by district and number of rooms
Quarterly producer-price and services indices in
compare_indicesLinked-payment schedules (monthly rent or instalments linked over a period)
Exact publication calendar for the known-index rule when the 15th falls on a weekend or holiday
Chain-linked history and comparison across base changes (v0.1.0)
Official-calculator cross-check for known-index linkage (v0.1.0)
Contributing
Issues and PRs are welcome. Keep API logic in src/lib with unit tests and add an end-to-end case in test/server.test.ts for new tools. New fixtures must be real recorded responses (npm run record-fixtures) — never hand-written API data.
License
MIT © Nadav Shtibel
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Live Israeli public data for AI agents: alerts, prices, open data, FX rates, Shabbat times.
Bank of Israel public API MCP. Keyless.
Prices in 31 Israeli supermarket chains by barcode. Free search; API key or x402 pay-per-call.
Loan & mortgage calculator, compound interest, ROI, crypto prices, FX conversion for AI agents.
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server that provides programmatic access to the Israeli Central Bureau of Statistics (CBS) price indices and economic data941 npm4MIT
- AlicenseCqualityCmaintenanceEnables AI assistants to search, discover, and analyze thousands of datasets from Israel's national open data portal. It provides tools for querying government ministries, municipalities, and public bodies using the CKAN API.973 npm111MIT
- AlicenseNot gradedqualityCmaintenanceEnables access to Israel Central Bureau of Statistics (CBS) data through natural language queries via the Pipeworx MCP gateway.59 npmMIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to query official Brazilian Central Bank economic data, including Selic, CDI, IPCA, IGP-M, INCC, exchange rates, and Focus projections, and to correct values for inflation or calculate returns by CDI/Selic percentages.MIT