mcp-country-state-city
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
mcp-country-state-city
CountryStateCity MCP — wraps CountryStateCity API (api.countrystatecity.in/v1)
Part of Pipeworx — an MCP gateway connecting AI agents to 1863+ live data sources. This is an independent, unofficial integration — not affiliated with, endorsed by, or published by the upstream provider.
Tools
Tool | Description |
| List all countries with ISO codes, capitals, phone codes, currencies, and regions. Returns ~250 countries. Useful for building dropdowns or validating country data. |
| Get all states or provinces for a country by ISO2 code (e.g., "US", "IN", "BR"). Returns state names, codes, and types. |
| Get cities for a country, optionally filtered by state. Pass country_code (e.g., "US") and optionally state_code (e.g., "CA") to narrow results. |
Related MCP server: Geodb Cities MCP Server
Quick Start
Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
{
"mcpServers": {
"country-state-city": {
"url": "https://gateway.pipeworx.io/country-state-city/mcp"
}
}
}What this endpoint actually serves
tools/list at https://gateway.pipeworx.io/country-state-city/mcp returns the tools in the table
above plus the shared Pipeworx meta-tools — ask_pipeworx,
discover_tools, search_within, remember/recall and the rest of the
gateway-wide set. So the tool count you see is larger than this table: a
single-pack endpoint currently lists roughly 30 shared tools alongside the
pack's own. The connection's initialize response states its exact scope, and
is the authoritative answer for a given day.
This is deliberate, not multiplexing by accident. The meta-tools are what let a
scoped connection answer a question this pack does not cover — via
ask_pipeworx, which routes across the whole catalog — without you adding a
second MCP server. There is currently no way to mount a pack endpoint without
them; if the extra schemas cost you more context than the routing is worth,
connect to the full gateway once rather than to several pack endpoints.
Or connect to the full Pipeworx gateway to get every pack's tools listed directly, instead of just this one's:
{
"mcpServers": {
"pipeworx": {
"url": "https://gateway.pipeworx.io/mcp"
}
}
}Both URLs reach the same gateway and the same 1863+ data sources. The
only difference is which pack's tools are listed directly; ask_pipeworx
reaches all of them from either one.
No MCP client? Call it over HTTP
This pack takes your own API key (_apiKey) — we don't front one for it, so there's no curl here that would run without it. Inspect any tool: GET https://gateway.pipeworx.io/v1/tools/country_state_city_list_countries. Find one: POST https://gateway.pipeworx.io/v1/tools/search_packs with {"query":"..."}.
Run it from npm
@pipeworx/mcp-country-state-city is a local stdio bridge to the Pipeworx gateway: your MCP client
starts it with npx, and it forwards every call to the same
https://gateway.pipeworx.io/country-state-city/mcp endpoint shown above. It needs network access;
there is no offline mode.
{
"mcpServers": {
"country-state-city": {
"command": "npx",
"args": ["-y", "@pipeworx/mcp-country-state-city"]
}
}
}Without a key it calls anonymously, capped at 50 calls a day. A free account
raises that to 200 a day: get a key at https://pipeworx.io/signup and add
"env": { "PIPEWORX_API_KEY": "<your key>" } to the server entry.
The key is sent as a Bearer token, the same way a hosted connection sends it,
so calls are metered and billed exactly as they are there.
It lists only this pack's tools by default. Set PIPEWORX_META_TOOLS=1 to
also list ask_pipeworx and the other gateway-wide tools.
Behind an HTTPS proxy: Node's built-in fetch does not read HTTPS_PROXY by
default. Newer Node releases honour it when NODE_USE_ENV_PROXY=1 is set; check
your Node version's documentation.
Using with ask_pipeworx
Instead of calling tools directly, you can ask questions in plain English — this works on the pack endpoint above as well as on the full gateway:
ask_pipeworx({ question: "your question about Country State City data" })The gateway picks the right tool and fills the arguments automatically.
More
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
City geocoding and timezone resolution for birth data, for AI agents, one API key.
Search and explore a global travel points-of-interest catalog (cities, countries, POIs).
Search 16,000+ API operations and 95 built tools by need, then call any of them by name
31Provides access to Civic Plus - See Click Fix, allowing you to interact with your data via an LLM.…
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables exploration of geographical data including countries, cities, states/provinces, and regions through a SQLite database. Supports searches by name, location coordinates, currency, and regional groupings with comprehensive statistical queries.157-
- AlicenseBqualityDmaintenanceProvides access to the GeoDB Cities API for retrieving global geographic data including city details, populations, and local time. It enables users to find nearby locations, calculate distances between places, and browse administrative divisions across countries.18MIT
- AlicenseCqualityDmaintenanceProvides access to the City By Api Ninjas API to retrieve detailed city information worldwide. Users can search and filter results by name, country, population range, and geographic coordinates.1MIT
- AlicenseNot gradedqualityBmaintenanceProvides world country data from the REST Countries API, enabling search by name, ISO code, region, language, or currency, with details like capital, population, and languages.198 npmMIT