Morocco communes
Morocco's régions, provinces and communes: HCP codes, names, census population and boundaries
Connect it
Settings → Connectors → Add custom connector
URL: https://communes.pages.dev/mcpSettings → Apps & Connectors → Advanced → Developer mode
Create connector with URL: https://communes.pages.dev/mcp{
"mcpServers": {
"morocco-communes": {
"url": "https://communes.pages.dev/mcp"
}
}
}claude mcp add --transport http morocco-communes https://communes.pages.dev/mcp{
"servers": {
"morocco-communes": {
"type": "http",
"url": "https://communes.pages.dev/mcp"
}
}
}12 tools, verified live
searchread-onlyFind 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 fig
get_communeread-onlyOne 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).
communes_nearread-onlyCommunes 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.
commune_atread-onlyThe 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.
list_communesread-onlyWhich 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 a
get_unitread-onlyOne 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
get_indicatorsread-onlyHCP'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
get_economyread-onlyHCP'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 (
get_housingread-onlyHCP'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
get_insightsread-onlyFor 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 fig
get_neighbourhoodsread-onlyThe 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 nei
get_douarsread-onlyThe 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
Alternatives in Developer Tools
Compare →
Tailwind ShadesA
Tailwind CSS palettes (50-950) from any color, the closest Tailwind color, and Tailwind's defaults
three.ws for GrokA
Free text/image to 3D for Grok Bot, plus your three.ws agents once signed in. Never spends.
MGMCP GrafanaA
An MCP server giving access to Grafana dashboards, data and more.
NONotFairA
OAuth MCP for Google, Meta, X, LinkedIn, Reddit, TikTok, GSC, GA4, WordPress and GHL.
SPSpokenA
Podcast transcripts as clean Markdown with real speaker names — via the Spoken API.
Music StudioA
ABC sheet music + Strudel live coding: songs, videos and live jam sessions in ext-apps widgets.