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

@countrydataapi/mcp-server

v1.0.0

Published

MCP Server for Country Data API - enables Claude and other LLMs to query geographical data

Downloads

107

Readme

Country Data API - MCP Server

MCP (Model Context Protocol) Server for the Country Data API. This enables Claude and other LLMs to query geographical data including countries, states, cities, and postal codes.

Installation

npm install -g @countrydataapi/mcp-server

Or use directly with npx:

npx @countrydataapi/mcp-server

Configuration

Environment Variables

Set your API key as an environment variable:

export COUNTRY_DATA_API_KEY=your-api-key-here

Claude Desktop Configuration

Add to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "country-data-api": {
      "command": "npx",
      "args": ["@countrydataapi/mcp-server"],
      "env": {
        "COUNTRY_DATA_API_KEY": "your-api-key-here"
      }
    }
  }
}

Available Tools

Countries

| Tool | Description | |------|-------------| | get_countries_all | Get all countries | | get_country_by_name | Get country by name | | get_country_by_code | Get country by ISO code (ES, ESP, 724) | | get_countries_by_region | Get countries by region (Europe, Asia, etc.) | | get_countries_by_currency | Get countries by currency (EUR, USD, etc.) | | get_countries_by_language | Get countries by language (spa, eng, etc.) | | get_countries_by_timezone | Get countries by timezone |

States

| Tool | Description | |------|-------------| | get_states_all | Get all states/provinces | | get_states_by_country | Get states for a country | | get_states_by_city | Get states containing a city |

Cities

| Tool | Description | |------|-------------| | get_cities_all | Get all cities | | get_city | Get city by name | | get_cities_by_country | Get cities for a country | | get_cities_by_state | Get cities for a state |

Zipcodes

| Tool | Description | |------|-------------| | get_zipcodes_by_country | Get zipcodes for a country | | get_zipcodes_by_state | Get zipcodes for a state |

Select (Optimized - 1 token each)

| Tool | Description | |------|-------------| | get_select_countries | Lightweight country list for dropdowns | | get_select_states | Lightweight state list for dropdowns | | get_select_cities | Lightweight city list for dropdowns |

Status

| Tool | Description | |------|-------------| | get_api_status | Get remaining API tokens |

Example Usage in Claude

Once configured, you can ask Claude things like:

  • "What countries are in Europe?"
  • "Get me information about Spain"
  • "What states are in Germany?"
  • "List cities in California"
  • "How many API tokens do I have left?"

Common Parameters

Most tools accept these optional parameters:

| Parameter | Description | |-----------|-------------| | lang | Response language: en, es, pt, fr, de, it | | fields | Comma-separated list of fields to return | | limitToken | Maximum tokens to use for this request |

Get an API Key

Visit countrydataapi.com to get your API key.

License

MIT