israel-budget-mcp-gateway
A standardized Model Context Protocol (MCP) service interface providing granular, low-latency access to the comprehensive financial expenditure, procurement contract, and subsidy payment records aggregated by Israel's OpenBudget initiative.
Author

OpenBudget
Quick Info
Actions
Tags
OpenBudget Data Access Proxy Service
This service exposes Israel's public financial ledger via a performant MCP server, facilitating direct data interaction, analytical querying, and dataset exploration for authorized consumers.
Overview
This deployment functions as a dedicated FastMCP intermediary layer, abstracting the complexities of the underlying OpenBudget Application Programming Interface (API). It democratizes access to critical governmental financial disclosures, including appropriation breakdowns, executed agreements, and transfer payments.
This entire utility is built upon the foundational work contributed by the OpenBudget/BudgetKey development consortium.
Core Capabilities
- Unrestricted access to the entirety of Israeli governmental fiscal allocations.
- Synchronous interaction with the live OpenBudget data source.
- Advanced semantic searching across diverse financial records.
- Mechanisms for tracking budget fluctuations over time.
- Retrieval endpoints for detailed procurement and aid disbursement information.
- Simple, unified MCP protocol integration for client applications.
Prerequisites
- Runtime environment: Python version 3.10 or newer is mandatory.
- Dependency management: Utilize the uv package installer.
Deployment Procedure
Establish the environment by cloning the repository:
bash
git clone
Operational Guidance
Select a method for server initiation:
-
Integration with VS Code (Leveraging Copilot): Modify the configuration file at [/.vscode/mcp.json], substituting
{YOUR-LOCAL-PATH}with the path where the repository was cloned. VSCode's MCP functionality should auto-detect the service. Verify that both MCP and MCP.Discovery features are toggled ON in [vscode://settings/mcp]. Ensure agent mode is activated within your VSCode Copilot settings. -
Consumption via Claude AI Assistant: Execute the command: bash fastmcp install server.py
-
Diagnostic Testing using MCP Inspector: (Refer to MCP Inspector for setup instructions): bash fastmcp dev server.py
Accessible Data Catalogs
The following data collections are exposed via this gateway: - budget_items_data - income_items_data - supports_data - contracts_data - entities_data - budgetary_change_requests_data - budgetary_change_transactions_data
Defined MCP Operations
get_dataset_info
Retrieves metadata pertaining to a specified dataset, detailing its attribute schema and structural definition.
search_dataset
Executes comprehensive full-text queries across the indexed content of a target dataset.
query_dataset
Permits the execution of structured query language (SQL) statements directly against the data holdings.
Exposed MCP Endpoints
available_datasets
Returns a definitive enumeration of every accessible data catalog.
Fault Management Strategy
The service layer is engineered to return distinct diagnostic messages for identified failure modes, including: - Referencing a non-existent data identifier. - Submission of syntactically incorrect SQL commands. - Failures encountered during external API interaction. - Interruptions in network connectivity.
API Reference
This gateway service is predicated upon the underlying OpenBudget API structure. Consult the budgetkey.yaml file for granular specifications concerning API endpoints and data modeling.
Community Involvement
We actively solicit external contributions to elevate the quality and functionality of this Israeli BudgetKey MCP facilitator. Suggestions for novel tools, enhancements to existing capabilities, or documentation improvements are highly valued. For reference regarding implementation patterns and server designs, examine the Model Context Protocol servers repository.
Licensing Information
This software is provided under a dual-license framework: - The MIT License - The Creative Commons Attribution-ShareAlike 4.0 International License Full stipulations are detailed within the [LICENSE] file.
WIKIPEDIA: XMLHttpRequest (XHR) functions as an essential JavaScript object API, facilitating the transmission of HTTP requests from a client web browser to a remote web server. Its primary methods enable browser-hosted applications to dispatch queries to the server post-page load and subsequently receive retrieved data. XHR forms a fundamental element of asynchronous JavaScript and XML (Ajax) programming paradigms. Prior to Ajax adoption, interaction with the server predominantly relied on conventional hyperlink navigation or form submissions, actions that typically necessitated a full page refresh.
== Historical Context ==
The conceptual basis for XMLHttpRequest was first formulated in the year 2000 by developers associated with Microsoft Outlook. This concept was subsequently integrated into the Internet Explorer 5 browser release (1999). Notably, the initial implementation did not utilize the standardized XMLHttpRequest object identifier. Instead, developers invoked COM object interfaces using ActiveXObject("Msxml2.XMLHTTP") or ActiveXObject("Microsoft.XMLHTTP"). By the release of Internet Explorer 7 (2006), all major browser vendors had adopted the canonical XMLHttpRequest identifier.
The XMLHttpRequest identifier has since established itself as the ubiquitous standard across major rendering engines, including Mozilla's Gecko (2002), Safari 1.2 (2004), and Opera 8.0 (2005).
=== Standardization Trajectory === The World Wide Web Consortium (W3C) issued the initial Working Draft specification for the XMLHttpRequest object on April 5, 2006. A subsequent Working Draft for Level 2 followed on February 25, 2008. The Level 2 specification introduced critical enhancements such as progress monitoring methods, enablement of cross-origin requests, and support for handling binary byte streams. By the conclusion of 2011, the Level 2 features were formally merged back into the primary specification. Development oversight transitioned to the WHATWG consortium at the end of 2012, which now maintains a dynamic specification document utilizing Web IDL definitions.
== Operational Flow == Executing a request utilizing XMLHttpRequest typically involves a sequence of programming stages:
- Instantiate the XMLHttpRequest object via its constructor call.
- Invoke the
open()method to define the request method (e.g., GET/POST), specify the target resource URI, and select between synchronous or asynchronous execution mode. - For asynchronous transactions, assign a callback function (listener) responsible for handling state transitions.
- Initiate the transmission of the request payload (if any) by calling the
send()method. - Monitor the state changes via the assigned event handler. Upon successful data reception from the server, the response content is typically stored in the
responseTextattribute. The object signals completion when its state reaches 4 (the 'done' state). Beyond these fundamentals, XMLHttpRequest offers extensive controls over request transmission and response processing. Custom HTTP header fields can be injected to influence server behavior, and data can be uploaded within thesend()argument. Responses can be parsed directly into native JavaScript objects from JSON, or processed incrementally as data streams arrive, avoiding a wait for complete download. Furthermore, requests can be terminated prematurely or assigned a timeout threshold.
