search_countries

Pack: countries · Endpoint: https://gateway.pipeworx.io/countries/mcp

Search for countries by name. Returns official name, capital, region, population, area, languages, currencies, and flag emoji.

Parameters

NameTypeRequiredDescription
querystringyesCountry name to search for (partial matches are supported)

Example call

Arguments

{
  "query": "United States"
}

curl

curl -X POST https://gateway.pipeworx.io/countries/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_countries","arguments":{"query":"United States"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('search_countries', {
  "query": "United States"
});

More examples

{
  "query": "New"
}

Response shape

Always returns: results

FieldTypeDescription
resultsarrayArray of countries matching the search query
Full JSON Schema
{
  "type": "object",
  "properties": {
    "results": {
      "type": "array",
      "description": "Array of countries matching the search query",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Common country name"
          },
          "official_name": {
            "type": "string",
            "description": "Official country name"
          },
          "codes": {
            "type": "object",
            "properties": {
              "alpha2": {
                "type": "string",
                "description": "ISO 3166-1 alpha-2 code"
              },
              "alpha3": {
                "type": "string",
                "description": "ISO 3166-1 alpha-3 code"
              }
            },
            "required": [
              "alpha2",
              "alpha3"
            ]
          },
          "capital": {
            "type": "string",
            "description": "Capital city or N/A if not available"
          },
          "region": {
            "type": "string",
            "description": "Geographic region"
          },
          "subregion": {
            "type": "string",
            "description": "Subregion name, empty if not available"
          },
          "population": {
            "type": "integer",
            "description": "Total population"
          },
          "area_km2": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total area in square kilometers"
          },
          "languages": {
            "type": "array",
            "description": "Languages spoken in the country",
            "items": {
              "type": "string"
            }
          },
          "currencies": {
            "type": "array",
            "description": "Currencies used in the country",
            "items": {
              "type": "string"
            }
          },
          "flag": {
            "type": "string",
            "description": "Flag emoji or empty string"
          }
        },
        "required": [
          "name",
          "official_name",
          "codes",
          "capital",
          "region",
          "subregion",
          "population",
          "area_km2",
          "languages",
          "currencies",
          "flag"
        ]
      }
    }
  },
  "required": [
    "results"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "countries": {
      "url": "https://gateway.pipeworx.io/countries/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026