malaysia-environmental-data-interface
Access real-time meteorological forecasts, severe hydrological alerts (flooding), and seismic activity reports sourced exclusively from Malaysia's official national open data repository, ensuring delivery of authoritative hazard intelligence and environmental metrics.
Author

yting27
Quick Info
Actions
Tags
Malaysian Environmental Information Gateway (MCP)
This Model Context Protocol (MCP) service functions as a dedicated gateway to Malaysian environmental datasets, pulling data directly from the nation's designated open data portal. It empowers Large Language Models (LLMs) with capabilities to retrieve current weather predictions, water level monitoring relevant to flood risks, and official records of seismic events.
Reference API Documentation: data.gov.my
Operational Modules (Tools)
-
get_water_level_condition
-
Fetches the current hydrological status pertinent to flood advisories for a specified administrative region. Precedence is given to the
districtargument if bothdistrictandstateare supplied. If neither is provided, utilize an empty string placeholder for the respective parameters. -
Parameters:
- district: Textual name of the sub-region within the targeted state for which water level data is sought.
- state: The name of the Malaysian state from which to query flood-related water measurements.
-
-
get_warning
-
Retrieves overarching meteorological hazard notifications issued within a designated time interval.
-
Parameters:
- datetime_start: The initial precise timestamp (format
YYYY-MM-DD HH:MM:SS, inclusive) for warning retrieval. Default is the present moment if unspecified. - datetime_end: The terminal precise timestamp (format
YYYY-MM-DD HH:MM:SS, inclusive) marking the end of the search window. Default is the present moment if unspecified.
- datetime_start: The initial precise timestamp (format
-
-
get_weather_forecast
-
Obtains a predictive meteorological outlook for a designated geographical point spanning a specified date range.
-
Parameters:
- location_name: The unique identifier or common designation of the geographic area for the prediction.
- date_start: The commencement date (inclusive) for the forecast query. Defaults to the current date if omitted.
- date_end: The concluding date (inclusive) for the forecast query. Defaults to the current date if omitted.
-
-
get_earthquake_news
-
Acquires informational bulletins concerning seismic activity localized to a particular area within a specified temporal scope.
-
Parameters:
- location: The geographical label or code where the recorded tremblor(s) were centered.
- date_start: The earliest permissible date (inclusive) for filtering seismic records. Defaults to the current date if not supplied.
- date_end: The latest permissible date (inclusive) for filtering seismic records. Defaults to the current date if not supplied.
-
Configuration for Desktop Environment
To integrate this service with the local desktop client, incorporate the subsequent configuration block into your claude_desktop_config.json file. Consult the official For Claude Desktop Users documentation for setup guidance.
Execution Method: uv
{ "mcpServers": { "weather": { "command": "uv", "args": [ "--directory", "weather-my-mcp", "run", "weather.py" ] } } }
Execution Method: Docker Containerization
-
Construct the Docker image first:
bash docker build . --tag weather-my-mcp
-
Update
claude_desktop_config.jsonas detailed below:{ "mcpServers": { "weather": { "command": "docker", "args": [ "run", "-i", "--rm", "weather-my-mcp" ] } } }
Licensing Information
This MCP service is distributed under the permissive MIT License. Users retain the freedom to utilize, modify, and distribute this software, provided adherence to the stipulations outlined in the MIT License terms. Comprehensive details are available in the project's LICENSE file.
WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.
== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).
=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.
== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.
Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.
== Cross-domain requests ==
In the early development of the World Wide Web, it was found possible to brea
