npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lightyoruichi/datagovmy-mcp

v0.3.1

Published

MCP server for Malaysian government open data APIs (OpenDOSM and Data Catalogue)

Readme

Malaysia Data Government MCP Server

A Model Context Protocol (MCP) server that provides AI assistants with programmatic access to Malaysian government open data through the OpenDOSM and Data Catalogue APIs.

Key Features

  • Zero setup required. Built with TypeScript - just npx and go!
  • Comprehensive data access. Connects to both OpenDOSM and Data Catalogue APIs.
  • Easy integration. Simple tool interface for querying datasets, filtering, and pagination.

Requirements

  • Node.js 18 or newer - Download Node.js
  • VS Code, Cursor, Windsurf, Claude Desktop, Goose or any other MCP client

Getting Started

Using npx (Recommended)

The easiest way to use this server - no installation required:

{
  "mcpServers": {
    "datagovmy": {
      "command": "npx",
      "args": [
        "-y",
        "@lightyoruichi/datagovmy-mcp"
      ]
    }
  }
}

Add via the Amp VS Code extension settings screen or by updating your settings.json file:

"amp.mcpServers": {
  "datagovmy": {
    "command": "npx",
    "args": [
      "-y",
      "@lightyoruichi/datagovmy-mcp"
    ]
  }
}

Amp CLI Setup:

Add via the amp mcp add command below

amp mcp add datagovmy -- npx -y @lightyoruichi/datagovmy-mcp

Use the Claude Code CLI to add the Malaysia Data Government MCP server:

claude mcp add datagovmy npx -y @lightyoruichi/datagovmy-mcp

Follow the MCP install guide, use the standard config above.

Configuration file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

After adding the configuration, restart Claude Desktop.

Use the Codex CLI to add the Malaysia Data Government MCP server:

codex mcp add datagovmy npx "-y" "@lightyoruichi/datagovmy-mcp"

Alternatively, create or edit the configuration file ~/.codex/config.toml and add:

[mcp_servers.datagovmy]
command = "npx"
args = ["-y", "@lightyoruichi/datagovmy-mcp"]

For more information, see the Codex MCP documentation.

Use the Copilot CLI to interactively add the Malaysia Data Government MCP server:

/mcp add

Alternatively, create or edit the configuration file ~/.copilot/mcp-config.json and add:

{
  "mcpServers": {
    "datagovmy": {
      "type": "local",
      "command": "npx",
      "tools": [
        "*"
      ],
      "args": [
        "-y",
        "@lightyoruichi/datagovmy-mcp"
      ]
    }
  }
}

For more information, see the Copilot CLI documentation.

Click the button to install:

Or install manually:

Go to Cursor Settings -> MCP -> Add new MCP Server. Name to your liking, use command type with the command npx -y @lightyoruichi/datagovmy-mcp. You can also verify config or add command like arguments via clicking Edit.

Use the Factory CLI to add the Malaysia Data Government MCP server:

droid mcp add datagovmy "npx -y @lightyoruichi/datagovmy-mcp"

Alternatively, type /mcp within Factory droid to open an interactive UI for managing MCP servers.

For more information, see the Factory MCP documentation.

Follow the MCP install guide, use the standard config above.

Click the button to install:

Install in Goose

Or install manually:

Go to Advanced settings -> Extensions -> Add custom extension. Name to your liking, use type STDIO, and set the command to npx -y @lightyoruichi/datagovmy-mcp. Click "Add Extension".

Follow the MCP Servers documentation. For example in .kiro/settings/mcp.json:

{
  "mcpServers": {
    "datagovmy": {
      "command": "npx",
      "args": [
        "-y",
        "@lightyoruichi/datagovmy-mcp"
      ]
    }
  }
}

Click the button to install:

Add MCP Server datagovmy to LM Studio

Or install manually:

Go to Program in the right sidebar -> Install -> Edit mcp.json. Use the standard config above.

Follow the MCP Servers documentation. For example in ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "datagovmy": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@lightyoruichi/datagovmy-mcp"
      ],
      "enabled": true
    }
  }
}

Open Qodo Gen chat panel in VSCode or IntelliJ → Connect more tools → + Add new MCP → Paste the standard config above.

Click Save.

Click the button to install:

Or install manually:

Follow the MCP install guide, use the standard config above. You can also install the Malaysia Data Government MCP server using the VS Code CLI:

# For VS Code
code --add-mcp '{"name":"datagovmy","command":"npx","args":["-y","@lightyoruichi/datagovmy-mcp"]}'

After installation, the Malaysia Data Government MCP server will be available for use with your GitHub Copilot agent in VS Code.

Go to Settings -> AI -> Manage MCP Servers -> + Add to add an MCP Server. Use the standard config above.

Alternatively, use the slash command /add-mcp in the Warp prompt and paste the standard config from above:

{
  "mcpServers": {
    "datagovmy": {
      "command": "npx",
      "args": [
        "-y",
        "@lightyoruichi/datagovmy-mcp"
      ]
    }
  }
}

Follow Windsurf MCP documentation. Use the standard config above.

Local Development

For local development with TypeScript:

cd /Users/lightyoruichi/Dev/datagovmy-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Link globally for testing
npm link

Then use this configuration:

{
  "mcpServers": {
    "datagovmy": {
      "command": "datagovmy-mcp"
    }
  }
}

Note: npm link creates a global symlink, making the datagovmy-mcp command available system-wide.

Or for development with auto-reload:

# Run directly with tsx (no build needed)
npm run dev

Discovering Datasets

You have multiple ways to discover available datasets:

1. Use Discovery Tools (Recommended)

The server provides built-in tools to search and explore datasets:

# Ask your AI assistant:
"What datasets are available about fuel prices?"
"List all datasets in the Prices category"
"Show me datasets related to GDP"

The AI will use the search_datasets and list_datasets tools automatically to find relevant data.

2. Browse Categorized Datasets

  • gdp - Gross Domestic Product
  • gdp_qtr - GDP by Quarter
  • gdp_annual - GDP Annual
  • ppi - Producer Price Index
  • trade - International Trade
  • banking - Banking Statistics
  • foreign_exchange - Foreign Exchange Rates
  • property_prices - Property Prices

Keywords: economy, gdp, growth, national accounts, trade, finance

  • cpi - Consumer Price Index
  • cpi_core - Core Consumer Price Index
  • inflation - Inflation Rate
  • fuelprice - Weekly Fuel Prices (RON95, RON97, Diesel)
  • ppi - Producer Price Index

Keywords: prices, inflation, cpi, cost of living, fuel, petrol

  • population - Population Statistics
  • population_malaysia - Population of Malaysia
  • population_state - Population by State
  • births - Live Births
  • deaths - Deaths
  • marriage - Marriages
  • divorce - Divorces

Keywords: population, demography, births, deaths, fertility, mortality

  • unemployment - Unemployment Rate
  • lfs_monthly - Labour Force Survey (Monthly)
  • wages - Wages and Salaries

Keywords: unemployment, labour, jobs, work, employment, workforce, wages, salary

  • healthcare - Healthcare Statistics
  • blood_donation - Blood Donation
  • hospital_beds - Hospital Beds
  • covid_cases - COVID-19 Cases
  • covid_vaccination - COVID-19 Vaccination

Keywords: healthcare, medical, health, hospitals, covid, pandemic

  • poverty - Poverty Statistics
  • hh_income - Household Income

Keywords: poverty, income, household, earnings, welfare

  • electricity - Electricity Statistics
  • renewable_energy - Renewable Energy
  • rainfall - Rainfall Data
  • air_quality - Air Quality Index
  • water_quality - Water Quality

Keywords: environment, energy, electricity, renewable, weather, climate, pollution

  • crime - Crime Statistics

Keywords: crime, safety, police, law enforcement

  • traffic - Traffic Data
  • vehicle_registration - Vehicle Registration
  • public_transport - Public Transport Ridership

Keywords: traffic, transportation, vehicles, cars, bus, train

  • agriculture - Agricultural Production
  • manufacturing - Manufacturing Statistics
  • construction - Construction Statistics

Keywords: agriculture, farming, manufacturing, industry, construction

  • education - Education Statistics

Keywords: education, schools, students, enrollment

  • tourist_arrivals - Tourist Arrivals

Keywords: tourism, tourists, arrivals, travel

3. Manual Browse (Alternative)

If you prefer, you can still browse the data catalogues directly:

  1. OpenDOSM Datasets: open.dosm.gov.my/data-catalogue
  2. Data Catalogue Datasets: data.gov.my/data-catalogue

On each dataset page, scroll to the "Sample OpenAPI query" section to find the dataset ID.

Tools

  • query_opendosm
    • Title: Query OpenDOSM Dataset
    • Description: Query an OpenDOSM dataset (Department of Statistics Malaysia)
    • Parameters:
      • dataset_id (string, required): Dataset ID (e.g., 'cpi_core', 'gdp', 'population')
      • filters (string, optional): JSON string of filter parameters (e.g., '{"date": "2024-01-01"}')
      • limit (integer, optional): Maximum number of records to return (default: 100)
      • offset (integer, optional): Number of records to skip for pagination (default: 0)
    • Read-only: false
    • Example use cases:
      • Get latest CPI data: dataset_id='cpi_core', limit=10
      • Get GDP data for specific date: dataset_id='gdp', filters='{"date": "2024-01-01"}'
  • query_data_catalogue
    • Title: Query Data Catalogue Dataset
    • Description: Query a Data Catalogue dataset (broader government data)
    • Parameters:
      • dataset_id (string, required): Dataset ID (e.g., 'fuelprice', 'healthcare', 'crime')
      • filters (string, optional): JSON string of filter parameters (e.g., '{"date": "2024-01-01"}')
      • limit (integer, optional): Maximum number of records to return (default: 100)
      • offset (integer, optional): Number of records to skip for pagination (default: 0)
    • Read-only: false
    • Example use cases:
      • Get latest fuel prices: dataset_id='fuelprice', limit=5
      • Get filtered data: dataset_id='fuelprice', filters='{"date": "2024-12-01"}'
  • get_dataset_metadata
    • Title: Get Dataset Metadata
    • Description: Get metadata for a dataset without fetching the actual data records
    • Parameters:
      • dataset_id (string, required): Dataset ID to get metadata for
      • source (string, required): Data source - either 'opendosm' or 'data_catalogue'
    • Read-only: true
    • Example use cases:
      • Get fuel price metadata: dataset_id='fuelprice', source='data_catalogue'
      • Get CPI metadata: dataset_id='cpi_core', source='opendosm'
  • list_datasets
    • Title: List Available Datasets
    • Description: List all available datasets with optional filtering
    • Parameters:
      • source (string, optional): Filter by source - 'opendosm', 'data_catalogue', or None for all
      • category (string, optional): Filter by category (e.g., 'Prices', 'Demography', 'Economy')
      • limit (integer, optional): Maximum number of datasets to return (default: 100)
      • offset (integer, optional): Number of datasets to skip for pagination (default: 0)
    • Read-only: true
    • Example use cases:
      • List all datasets: (no parameters)
      • List OpenDOSM datasets: source='opendosm'
      • List price-related datasets: category='Prices'
  • search_datasets
    • Title: Search Datasets
    • Description: Search for datasets by keyword
    • Parameters:
      • query (string, required): Search query (searches in name, description, keywords, and ID)
      • source (string, optional): Filter by source - 'opendosm', 'data_catalogue', or None for all
      • limit (integer, optional): Maximum number of results to return (default: 10)
    • Read-only: true
    • Example use cases:
      • Search for fuel data: query='fuel'
      • Search for GDP: query='gdp'
      • Search for population: query='population'
  • get_dataset_schema
    • Title: Get Dataset Schema
    • Description: Get schema, metadata, and sample data for a dataset
    • Parameters:
      • dataset_id (string, required): Dataset ID to get schema for
      • source (string, required): Data source - either 'opendosm' or 'data_catalogue'
    • Read-only: true
    • Example use cases:
      • Get fuel price schema: dataset_id='fuelprice', source='data_catalogue'
      • Get GDP schema: dataset_id='gdp', source='opendosm'

API Details

OpenDOSM API

  • Base URL: https://api.data.gov.my/opendosm
  • Data Source: Department of Statistics Malaysia
  • Focus: Economic and demographic statistics

Data Catalogue API

  • Base URL: https://api.data.gov.my/data-catalogue
  • Data Source: Various Malaysian government agencies
  • Focus: Broader government data (healthcare, crime, education, etc.)

Both APIs support:

  • Filtering with query parameters
  • Pagination with limit and offset
  • Metadata retrieval with meta_only=true

Testing

With MCP Inspector

# Terminal 1: Start the server in development mode
npm run dev

# Terminal 2: In a new terminal, launch Inspector
npx @modelcontextprotocol/inspector

The Inspector will open in your browser. Connect to the stdio server you started in Terminal 1.

Testing Locally

# Build and link the package
npm run build
npm link

# The server is now available as 'datagovmy-mcp' command
# Configure your MCP client to use it

Data Categories

The catalogues include data across these categories:

  • Demography: Population, births, deaths, migration
  • Economy: GDP, inflation, trade, productivity
  • Labour: Employment, wages, labour force
  • Prices: Consumer prices, producer prices, fuel
  • Healthcare: Health statistics, disease data, infrastructure
  • Education: Schools, enrollment, outcomes
  • Public Safety: Crime, justice system
  • Environment: Energy, pollution, land use
  • Financial Markets: Banking, foreign exchange
  • Transportation: Vehicle registrations, ridership

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

License

MIT License - see LICENSE file for details

Links