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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@datacountry/mcp-server

v1.1.0

Published

MCP server for datacountry.io geopolitical API

Readme

DataCountry MCP Server

A Model Context Protocol (MCP) server that provides access to the datacountry.io geopolitical API. This server enables AI assistants like Claude to query comprehensive data about countries, cities, currencies, languages, timezones, phone formats, postal codes, and more. Includes 32 tools for geopolitical data lookup and validation.

Installation

Using npx (recommended)

npx @datacountry/mcp-server

Global installation

npm install -g @datacountry/mcp-server
datacountry-mcp

Configuration

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | DATACOUNTRY_API_KEY | No | - | Your datacountry.io API key for higher rate limits | | DATACOUNTRY_API_URL | No | https://api.datacountry.io/v1 | Custom API base URL |

Claude Desktop Configuration

Add to your Claude Desktop config file:

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

{
  "mcpServers": {
    "datacountry": {
      "command": "npx",
      "args": ["@datacountry/mcp-server"],
      "env": {
        "DATACOUNTRY_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available Tools

Countries (11 tools)

| Tool | Description | |------|-------------| | list_countries | List countries with filters (region, subregion, independence, UN membership, landlocked, sort, pagination) | | search_countries | Search countries by name or code | | get_countries_by_region | Get all countries in a region | | get_country | Get country details with optional includes (currencies, languages, timezones, borders, translations, economic, demographic, cities) | | get_country_borders | Get countries sharing a border | | get_country_currencies | Get currencies used in a country | | get_country_languages | Get languages spoken in a country | | get_country_timezones | Get timezones in a country | | get_country_economic | Get economic indicators (GDP, inflation, unemployment) | | get_country_demographic | Get demographic indicators (life expectancy, literacy, age distribution) | | get_country_cities | Get cities in a country |

Cities (3 tools)

| Tool | Description | |------|-------------| | list_cities | List cities with filters (country, population, capital status, sort, pagination) | | get_capital_cities | Get all capital cities | | search_cities | Search cities by name |

Currencies (3 tools)

| Tool | Description | |------|-------------| | list_currencies | List all currencies | | get_currency | Get currency details by code | | get_currency_countries | Get countries using a currency |

Languages (3 tools)

| Tool | Description | |------|-------------| | list_languages | List all languages | | get_language | Get language details by code | | get_language_countries | Get countries speaking a language |

Timezones (3 tools)

| Tool | Description | |------|-------------| | list_timezones | List all timezones | | get_timezone | Get timezone details by name | | get_timezone_countries | Get countries in a timezone |

Regions (3 tools)

| Tool | Description | |------|-------------| | list_regions | List regions with country counts | | get_region_subregions | Get subregions in a region | | get_all_subregions | Get all subregions globally |

Phone (5 tools)

| Tool | Description | |------|-------------| | list_phone_formats | List phone formats for all countries (calling codes, patterns, lengths) | | get_phone_format | Get phone format for a specific country | | validate_phone_number | Validate a phone number for a country (returns validity, type, formatted versions) | | parse_phone_number | Parse a phone number into components (country code, national number, URI) | | format_phone_number | Format a phone number (national, international, E.164, RFC3966) |

Postal (1 tool)

| Tool | Description | |------|-------------| | validate_postal_code | Validate a postal code for a country (returns validity and expected format) |

Rate Limits

  • Anonymous: 50 requests/day
  • With API key: Based on your plan (up to 10,000/day)

Get an API key at datacountry.io

Example Usage

Once configured, you can ask Claude questions like:

  • "What are all the landlocked countries in Europe?"
  • "Show me the economic indicators for Japan"
  • "Which countries use the Euro?"
  • "List the largest cities in Brazil"
  • "What languages are spoken in Switzerland?"
  • "Is +1-202-555-1234 a valid US phone number?"
  • "Format this UK number in international format: 07911123456"
  • "Validate the postal code 10001 for the United States"

Development

# Install dependencies
npm install

# Build
npm run build

# Run locally
node build/index.js

Changelog

1.1.0

  • Added phone validation tools: validate, parse, and format phone numbers
  • Added phone format lookup by country (calling codes, patterns, number lengths)
  • Added postal code validation tool
  • Total tools increased from 26 to 32

1.0.1

  • Initial public release
  • 26 tools covering countries, cities, currencies, languages, timezones, and regions

License

MIT