cbs-mcp-server

TacticCoder/cbs-mcp-server

3.1

If you are the rightful owner of cbs-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

An MCP server for accessing Israeli Central Bureau of Statistics (CBS) data, including price indices, population statistics, and economic indicators.

Tools
5
Resources
0
Prompts
0

CBS MCP Server

An MCP (Model Context Protocol) server for accessing Israeli Central Bureau of Statistics (CBS) data, including price indices, population statistics, and economic indicators.

Features

This MCP server provides access to:

  • Locality Search: Search for cities, towns, and regions in Israel
  • Price Indices: Access to Consumer Price Index (CPI) and other price indices
  • Population Data: National and local population statistics
  • Economic Indicators: GDP, unemployment, wages, trade data, and more
  • Statistical Series: Search for various statistical data series

Installation

  1. Install the required dependencies:
pip install -r requirements.txt
  1. Make the server executable:
chmod +x cbs_mcp_server.py

Usage

Running the Server

The server can be run directly:

python cbs_fastmcp_server.py

Available Tools

1. search_localities

Search for localities (cities, towns, regions) in Israel by name.

Parameters:

  • query (required): Search query for locality name (Hebrew or English)
  • language (optional): Language for search ("Hebrew" or "English", defaults to "Hebrew")

Example:

{
  "query": "תל אביב",
  "language": "Hebrew"
}
2. get_price_indices

Get main price indices data from CBS including Consumer Price Index (CPI).

Parameters:

  • year (optional): Year for the data (defaults to current year)
  • month (optional): Month for the data (1-12)

Example:

{
  "year": 2025,
  "month": 6
}
3. get_population_data

Get population statistics for Israel or specific localities.

Parameters:

  • locality_code (optional): Locality code (if not provided returns national data)
  • year (optional): Year for the data (defaults to current year)

Example:

{
  "locality_code": 5000,
  "year": 2025
}
4. get_economic_indicators

Get main economic indicators including GDP, unemployment, wages, etc.

Parameters:

  • indicator (optional): Specific economic indicator to retrieve
    • Options: "gdp", "unemployment", "wages", "exports", "imports", "balance_of_payments"
  • year (optional): Year for the data

Example:

{
  "indicator": "gdp",
  "year": 2025
}
5. search_series

Search for statistical series in the CBS database.

Parameters:

  • query (required): Search query for series name or code
  • category (optional): Category of data to search in
    • Options: "prices", "population", "economy", "social", "construction"

Example:

{
  "query": "CPI",
  "category": "prices"
}

API Endpoints

The server interacts with the following CBS API endpoints:

  • Boards Generator: https://boardsgenerator.cbs.gov.il
  • Main CBS Site: https://www.cbs.gov.il
  • Locality Search: /Handlers/WebParts/YishuvimSearchHandler.ashx

Data Sources

The server provides access to data from:

  1. CBS Boards Generator: For locality search and some statistical data
  2. CBS Main Website: For general statistical information and links
  3. CBS Time Series DataBank: For detailed statistical series (referenced)

Limitations

  • Some data retrieval requires specific API endpoints that may need authentication
  • Real-time data access is limited to publicly available endpoints
  • For comprehensive data access, users are directed to the official CBS website

Error Handling

The server includes comprehensive error handling for:

  • Network connectivity issues
  • Invalid API responses
  • Missing or invalid parameters
  • Rate limiting (if applicable)

Development

Adding New Tools

To add new tools to the server:

  1. Define the tool in the list_tools method
  2. Add a handler method in the call_tool method
  3. Implement the actual functionality in a separate method

Extending API Access

To extend API access:

  1. Research additional CBS API endpoints
  2. Add new methods to handle the data retrieval
  3. Update the tool definitions accordingly

License

This project is provided as-is for educational and development purposes. Please respect the CBS terms of service and data usage policies.

Support

For issues or questions:

  1. Check the CBS official documentation
  2. Review the error messages in the server logs
  3. Ensure all dependencies are properly installed

Related Links