Skip to content
Agentmart
Submit a tool

Morocco communes

Morocco's régions, provinces and communes: HCP codes, names, census population and boundaries

Connector by zkousama · GitHub account verified by the MCP Registry

IndexedMITRemote (HTTP)★ 50
Write a review

Install

Works with Claude Code, VS Code, Cursor, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install connector/zkousama-morocco-communes

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Remote endpoint

  • https://communes.pages.dev/mcp Remote (HTTP)

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Morocco's régions, provinces and communes: HCP codes, names, census population and boundaries

Use cases: data-analysis, maps-location

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this server can do and what it asks for, from its tool list, install config and code. Checked Oct 25, 2026.

Tools
13 read · 0 write · 0 deleteRead-only
Secrets
None asked for
Install scripts
Nothing to install (hosted)
Runs as
Hosted (remote endpoint)

Tools by what they do 13

From the running server's own tool list (tools/list) on Oct 25, 2026.

Read 13 · Look things up without changing anything.

  • commune_at
  • communes_near
  • get_commune
  • get_douars
  • get_economy
  • get_housing
  • get_indicators
  • get_insights
  • get_neighbourhoods
  • get_unit
  • list_communes
  • search
Show 1 more tools
  • search_douars

Network hosts it talks to 18

  • api.cloudflare.com · found in code
  • api.groq.com · found in code
  • api.indexnow.org · found in code
  • communes.pages.dev · found in remote endpoint, install command, code
  • data.gov.ma · found in code
  • download.geofabrik.de · found in code
  • download.geonames.org · found in code
  • fonts.googleapis.com · found in code
  • generativelanguage.googleapis.com · found in code
  • github.com · found in code
  • hcp.ma · found in code
  • openstreetmap.org · found in code
  • overpass-api.de · found in code
  • overpass.kumi.systems · found in code
  • overpass.private.coffee · found in code
  • pypistats.org · found in code
  • sitemaps.org · found in code
  • wikidata.org · found in code

Files it touches

  • Your home directory (~)
  • ~/.cursor/mcp.json

Tools (13)

As the server listed them on Oct 25, 2026. Descriptions are the server’s own words; hidden characters are shown as [U+…].

  • commune_atCommune at a pointread-only

    The commune whose boundary contains a point, with its names, type, parents and population, and in Casablanca, Rabat, Fès, Marrakech, Salé and Tanger the arrondissement too. Use it to turn coordinates, from a map or a device, into a commune. Sidi Mohamed Benmansour has no boundary, and neither do about 88 km² between Ifrane and Boulemane.

  • communes_nearCommunes near a pointread-only

    Communes within a radius of a point, nearest first. Distance is measured to each commune's centroid, so the nearest commune isn't always the one that contains the point: commune_at gives that one.

  • get_communeGet one communeread-only

    One commune's names, type, région, province and cercle, 2024 and 2014 population, the change between them, a point inside it, the communes it borders and how much boundary it shares with each, and in the 6 cities divided into them, its arrondissements with their population. Identify it by HCP code (01.511.01.0), the code as digits, or a slug (tanger).

  • get_douarsA rural commune's douarsread-only

    The douars of a rural commune from HCP's 2024 census, the villages and hamlets it's made of, grouped in its fractions (mashyakha), named in Arabic only. Each has its kind (grouped, split into sub-douars, or dispersed), its households and its people. A douar has its name in Latin where a source writes one, and its point where GeoNames or OpenStreetMap maps it. With figures, a douar of 30 households or more also has the nationality, sex, age, civil registration and marital status of its people, the kind of dwelling its households live in, and the average distance in km from its dwellings to a pa…

  • get_economyEconomic establishmentsread-only

    HCP's 2024 count of economic establishments for Morocco or any région, province or préfecture, cercle, commune or arrondissement: how many establishments were mapped, how many are public services, how many are associations in premises of their own, how many are businesses, and how many permanent jobs those businesses hold. The businesses are split three ways, each covering all of them: by sector (industry, construction, commerce, services), by how many people work there (1, 2-3, 4-9, 10-49, 50 and over), and by when they were founded (before 1956 through 2020 and later). The weekly souks in us…

  • get_housingUrban housing stockread-only

    HCP's 2024 count of urban dwellings for Morocco or any unit that has an urban area: how many there are, how many are occupied, vacant or second homes, what kind they are (villa, apartment, traditional or modern Moroccan house, slum, rural-type), how old they are, what their walls and roofs are made of, how many are on the public electricity, water and sewerage networks, and HCP's housing shortfall. Every figure but the count is a percentage of that unit's urban dwellings. This counts dwellings, not households: a vacant flat is here and in nobody's census record, and get_indicators describes th…

  • get_indicatorsCensus indicatorsread-only

    HCP's census figures for Morocco or any région, province or préfecture, cercle, commune or arrondissement: age, marital status, fertility, disability, schooling, illiteracy, the languages people read and write and the local languages they use, education, work, employment status and how people get to work, and for households their size, dwelling, occupancy, amenities, wastewater, waste and cooking fuel. Reading them: shares and rates are percentages from 0 to 100. Null means HCP publishes no figure there. Most come from the long questionnaire, which went to a random 20% of households in commun…

  • get_insightsFigures that stand out in a communeread-only

    For a commune, up to 3 of its 2024 census figures that stand out: among the highest or lowest communes, moved far more or less than other communes since 2014, or far from its province's figure. Each comes with its context as numbers, worked out from the census: the commune's other figures here, the communes it borders on the same figure (their median and the one furthest from it), and the same figure in 2014 beside Morocco's, where the two censuses can be compared. A commune with any figure the two censuses disagree on is left out, on its own page and as a neighbour. Figures they measure diffe…

  • get_neighbourhoodsA commune's neighbourhoods and postcodesread-only

    The neighbourhoods OpenStreetMap and Poste Maroc name in a commune, a city's arrondissements included, with the arrondissement each was placed in where it has a point, where its name comes from, and the postcodes Poste Maroc lists under it; and the commune's postcodes. The census publishes nothing by neighbourhood: the figures are the commune's, or the arrondissement's. To find which commune a neighbourhood is in, call search with its name instead.

  • get_unitA région, province or cercleread-only

    One région, province, préfecture or cercle: its name in French and Arabic, its 2024 population and households, the units above it, how many units it holds, and the ones directly under it, named: a région's provinces, a province's cercles. This is the tool for a question about a unit above the commune, such as how many cercles a province has. For a commune or an arrondissement, call get_commune; to list a unit's communes, call list_communes with that unit.

  • list_communesList communesread-only

    Which commune has the most or the least of something is one call here: sort by that figure, and every commune in the filter comes back in order with its value, with no need to look them up one by one. Communes filtered by région, province or préfecture, cercle, type or population, 50 to a page, in code order or sorted by name, population, change since 2014, density, area, any census indicator or any establishment count. Filters combine; each unit can be given by code or slug. With no filter it lists every commune, so sort: "-population" alone gives the largest in the country.

  • searchSearch Moroccan administrative unitsread-only

    Find régions, provinces and préfectures, cercles, communes and arrondissements of Morocco by name. Takes French or Arabic, a slug, or another name a place is known by: Fez finds Fès, Mogador finds Essaouira. A neighbourhood's name finds the arrondissement or commune it's in, with matched neighbourhood and the neighbourhood's names: Sidi Maârouf finds Aïn-Chock, in Casablanca. The census has no figures for a neighbourhood itself. A 5-digit postcode finds the commune it's in, with matched postcode: 20520 finds Casablanca. Returns codes; pass a commune's code to get_commune for its population and…

  • search_douarsSearch Moroccan douarsread-only

    Find douars, the villages and hamlets of Morocco's rural communes as HCP's 2024 census lists them, by name, in Arabic or in Latin letters: تشديرت and Tachdirt both find the douar of Asni. HCP names douars in Arabic only; the Latin name comes from a source where one writes it, and is otherwise spelt from the Arabic, which spelt marks. Returns each douar's code, its 2024 population and its commune; pass the commune's slug to get_douars for the douar's households and distances.

Compare and alternatives

    Featured in

    Signals

    Stars
    50
    Forks
    7
    Open issues
    1
    Contributors
    2
    Last commit
    Oct 21, 2026 (7 days ago)
    Last release
    Sep 29, 2026 (29 days ago)

    From GitHub (fetched Oct 24, 2026).

    Details

    Registry name
    io.github.zkousama/morocco-communes
    Version
    1.9.1
    Auth
    Auth not stated
    License
    MIT
    First seen
    Oct 24, 2026
    Last checked
    Oct 24, 2026
    Cite this page

    Morocco communes MCP server. Agent Mart. https://agentmart.dev/connectors/zkousama-morocco-communes (last updated 2026-10-24)