cbs-mcp
cbs-mcp lets AI agents explore Israel CBS price indices and perform official-style index linkage calculations.
List CBS price-index chapters and subjects.
Search ~1,350 indices by English/Hebrew text or code.
Get the latest value, base, changes and recent observations for any index.
Retrieve chain-linked index history across base changes.
Compare up to 12 indices over a period.
Get a one-call Israel CPI summary with core measures and main groups.
Calculate annual inflation by year, including Bank of Israel target checks for CPI.
Adjust amounts by index months or known-index dates, with optional no-decrease floor.
Build linked payment schedules with per-payment index values, linkage differentials, totals and estimates for unpublished future indices.
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.
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., "@cbs-mcp adjust 10,000 shekels from Jan 2020 to today using the CPI"
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.
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, year-by-year inflation tables, a one-call CPI summary, an index-linkage calculator that matches the official CBS calculator to the agora and linked payment schedules (rent, contractor instalments) with linkage differentials per payment.
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 |
| Annual inflation by year. For each year between |
| הצמדה למדד. Adjust an |
| לוח תשלומים צמוד מדד. A whole schedule of |
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 |
| Annual CPI inflation for the last 10 years against the BOI target |
| 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.The 1985 rescale. In January 1985 the CBS divided the CPI by 100 without changing its base label ("Average 1980": 10,754.8 in December 1984, 113.2 in January 1985), and the coefficient into "Average 1985" is on the old scale. A naive link from December 1984 to December 1985 says −97%; cbs-mcp detects steps that contradict the published monthly change, rescales by the power of ten and gets CBS's +185.2%. Every year from 1952 to today matches the published annual rate.
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.3.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 ₪ |
| Rent signed 10 June 2025 (known index April 2025, 103.1): payment 1 is 5,982.54 ₪ (index fell), Dec 2026 6,122.21 ₪; 18 payments known (+1,134.83 ₪ linkage differentials) and 6 estimated at the October 2026 index — 145,868.09 ₪ for 144,000 ₪ nominal (run 2026-11-28) |
| Residential building inputs instalments: last payment (30 Nov 2026, known index 2026-10) 257,905.14 ₪ — identical to the official CBS calculator; +25,197.63 ₪ in total (run 2026-11-28) |
| 2017–2026: 0.4 · 0.8 · 0.6 · −0.7 · 2.8 · 5.3 · 3.0 · 3.2 · 2.6 (%, Dec/Dec) and +1.54% in 2026 through October; 3 of 9 years inside the 1–3% target (2 above, 4 below), +19.36% cumulative |
| 190.7% · 444.9% · 185.2% · 19.7% · 16.1% — hyperinflation and the 1985 stabilization plan, across the 1985 rescale |
| Home prices +4.0% · +13.1% · +14.7% · −1.0% · +7.7% · −1.0% |
|
|
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/>9 tools · 5 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 |
|
Payment schedule |
|
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 and scale-break detection, index floor
lib/annual.ts year-by-year tables: Dec/Dec, annual average, year-to-date, inflation-target check
lib/schedule.ts linked payment schedules: payment dates (month-end safe), known index per payment, floor, totals
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, 2026-11-23 and 2026-11-28
*.test.ts 106 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_indicesExact publication calendar for the known-index rule when the 15th falls on a weekend or holiday
Linked payment schedules with known-index linkage, totals and estimates for future payments (v0.3.0)
Year-by-year inflation tables with the BOI target check; 1985 rescale repaired (v0.2.0)
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
Available Tools
9 toolscalculate_linked_amountIndex-linkage calculator (הצמדה למדד)A
Adjust an amount by a CBS index between two points in time, e.g. rent, alimony, a contractor payment or a loan balance linked to the CPI or to the residential building inputs index (200010). Two methods: (1) from_month/to_month — the actual index of those months (מדד בגין), computed from published values and CBS chaining coefficients, in either direction; (2) from_date/to_date — the index known on each date (המדד הידוע: month M is known from the 16th of M+1), via the official CBS calculator. no_decrease keeps the original amount when the index fell (a common contract floor). Returns the linked amount, factor, change_pct, both index values with bases and the chaining coefficient.
Inputs: amount (required), code, to_date, to_month, +3 more.
calculate_linked_scheduleLinked payment schedule (לוח תשלומים צמוד מדד)A
Build an index-linked payment schedule: payments payments of amount every interval_months from start_date — monthly rent, quarterly instalments to a contractor linked to the residential building inputs index (200010), alimony, a linked loan — each adjusted from one base index to the index known on its payment date (המדד הידוע: month M is known from the 16th of M+1), chain-linked across CBS base changes. The base is either base_month (the base index month written in the contract) or base_date (e.g. the signing date: the index known on it). Returns every payment with its index month and value, factor, linked amount and linkage differential (הפרשי הצמדה), plus totals; payments whose index is not published yet are marked estimated and use the latest published index. no_decrease applies a contract-style floor at the base amount. One API request.
Inputs: amount (required), payments (required), start_date (required), code, +4 more.
compare_indicesCompare CBS indices over a periodA
Compare how up to 12 monthly CBS indices changed between two months (chain-linked, so base changes are handled), ranked from fastest to slowest rising, with annualized rates for periods of a year or more. Defaults to the CPI and its 10 main consumption groups. Codes without data for both months are listed under missing.
Inputs: start_month (required), codes, end_month.
get_annual_changesAnnual inflation by year (שיעור אינפלציה שנתי)A
Year-by-year change of a CBS index, e.g. Israel's annual inflation rate for each of the last 10 years. For every year: December-over-December change (Q4-over-Q4 for quarterly series; year-to-date through the latest month for the current year), the 12-month change exactly as published by CBS, and the change of the annual average. Chain-linked across base changes. Summary: cumulative and average annual change, highest and lowest year. For the headline CPI (120010) each year is also checked against the Bank of Israel 1%-3% target range. Works for any index, e.g. 40010 home prices or 200010 residential building inputs.
Inputs: code, end_year, start_year.
get_cpi_summaryIsraeli CPI summary (latest month)A
One-call snapshot of the latest Israeli Consumer Price Index (מדד המחירים לצרכן): headline value, monthly and 12-month inflation, core measures (excluding fruit/vegetables/housing, excluding energy) and the main consumption groups (food, housing, transport, health...), with the fastest-rising and falling groups year over year.
Inputs: no named parameters.
get_index_historyCBS index history (chain-linked)A
Monthly (or quarterly) history of a CBS index between two months. Every observation is returned as published plus a rebased_value on the latest base, giving one continuous series across CBS base changes. Also returns the chain-linked change_pct, annualized_pct, min/max and the base changes (with chaining coefficients) inside the range. Up to 360 observations are listed; statistics always cover the full range.
Inputs: start_month (required), code, end_month.
get_latest_indexLatest value of a CBS indexA
Get the latest published value of a CBS price index with its base (e.g. 'Average 2024'), the monthly and 12-month percent change as published, the approximate publication date (CBS publishes month M on the 15th of M+1 at 18:30) and the most recent observations. change_over_window_pct is chain-linked, so it stays correct across base changes.
Inputs: code, periods.
list_chaptersList CBS price-index chaptersA
List the chapters of the Israel Central Bureau of Statistics price-index catalog (consumer prices, housing, producer prices, construction/road/agriculture/bus input prices...) with English and Hebrew names, each chapter's main index code and its subjects with index counts.
Inputs: no named parameters.
search_indicesSearch CBS price indicesA
Search ~1,350 CBS price indices by English or Hebrew text (e.g. 'rent', 'שכר דירה', 'electricity', 'תשומות בנייה', 'cpi') or by numeric code. Returns codes with English/Hebrew names, chapter and subject, frequency (monthly/quarterly), first month with data and whether the series is still published. Discontinued series are hidden unless include_inactive is true.
Inputs: query (required), limit, chapter, include_inactive.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Most tools target clearly distinct operations: catalog browsing (list_chapters, search_indices), single-index retrieval (get_latest_index, get_index_history, get_annual_changes), cross-index comparison (compare_indices), and linkage math (calculate_linked_amount, calculate_linked_schedule). There is some overlap between get_cpi_summary and get_latest_index/compare_indices when the headline CPI is the subject, but descriptions steer the agent adequately.
Every tool follows a consistent snake_case verb_noun pattern (get_*, list_*, search_*, compare_*, calculate_*). The verb choices are semantically meaningful and uniform across the set, with no style mixing.
Nine tools is well-scoped for a price-index API: browsing, retrieval, comparison, and two calculation helpers. Each tool covers a distinct capability and none feels redundant or padding.
The surface covers discovery, history, latest values, annual/comparative views, and index-linked payment calculations, including CBS base-change chaining — a strong lifecycle for the domain. Minor gaps exist: there is no direct 'get metadata for a specific code' tool (search_indices must be used), and no explicit seasonal-adjustment or weights/exclusions view beyond the fixed CPI summary measures.
Maintenance
Related MCP Connectors
Live Israeli public data for AI agents: alerts, prices, open data, FX rates, Shabbat times.
Official Bank of Israel SDMX API for ILS FX rates, policy rates, CPI inflation, and dataflows.
1Bank of Israel public API MCP. Keyless.
Official Statistics Netherlands CBS OData API for Dutch CPI, GDP, trade, and macro tables.
51
Related MCP Servers
- AlicenseBqualityCmaintenanceMCP server that provides programmatic access to the Israeli Central Bureau of Statistics (CBS) price indices and economic data958 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.9141 npm111MIT
- AlicenseNot gradedqualityCmaintenanceEnables access to Israel Central Bureau of Statistics (CBS) data through natural language queries via the Pipeworx MCP gateway.54 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