Morocco communes
io.github.zkousama/morocco-communes
Serveur MCP OK 13 outils
Morocco's régions, provinces and communes: HCP codes, names, census population and boundaries
Fiche technique
- Auteur
- zkousama (espace de noms du registre)
- Dépôt
- github.com/zkousama/morocco-communes
- Site
- —
- Version
- 1.9.1
- Transport
- Streamable HTTP
- Authentification
- Aucune (constatée par notre test)
- Adresse du serveur
- https://communes.pages.dev/mcp Streamable HTTP
- Outils
- 13
- Catégories
- —
- Dernière mise à jour
- 29 sept. 2026
- Publication
- 29 sept. 2026
Auteur vérifié et popularité
Fiche pas encore revendiquée. C’est votre projet ? Revendiquez-la
Pas « Populaire » pour l’instant Retiré tout seul dès que les critères ne sont plus remplis.
- Visiteurs distincts de la fiche sur 30 jours : 0 (il en faut 30) pas encore
- ou configurations d’installation copiées sur 30 jours : 0 (il en faut 5) pas encore
- et un test réussi de moins de 14 jours : testé le 28 nov. 2026 rempli
Badge à jour tout seul. Toujours « testé le … », jamais « certifié ». Comment ça marche
[](https://latlas.dev/mcp/io.github.zkousama/morocco-communes)<a href="https://latlas.dev/mcp/io.github.zkousama/morocco-communes"><img src="https://latlas.dev/badge/statut/mcp/io.github.zkousama/morocco-communes.svg" alt="Statut sur L’Atlas" height="20"></a>Badge pour votre README
Gratuit, pour toute fiche. Il renvoie vers cette fiche et affiche « testé OK » tant que notre dernier test est réussi.
[](https://latlas.dev/mcp/io.github.zkousama/morocco-communes)<a href="https://latlas.dev/mcp/io.github.zkousama/morocco-communes"><img src="https://latlas.dev/badge/fiche/io.github.zkousama/morocco-communes.svg" alt="Référencé sur L’Atlas" height="20"></a>Nos tests
Chaque semaine : initialize puis tools/list, sans identifiant, sans jamais appeler d’outil. Méthode
- Adresse
- https://communes.pages.dev/mcp
- Dernier résultat
- OK 28 nov. 2026, 11:18
- Temps de réponse
- 761 ms (initialize + tools/list)
- Version du protocole
- 2025-11-25
- Nom annoncé
- morocco-communes 1.10.0
- Outils
- 13
Historique
| Date | Résultat | Réponse | Outils |
|---|---|---|---|
| 28 nov. 2026, 11:18 | OK | 761 ms | 13 |
Outils exposés (13, réponse à tools/list, 28 nov. 2026)
search_douars
Search Moroccan douars
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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| query | string | oui | The douar's name, in Arabic or Latin letters. |
| limit | integer | non | How many results. 10 when left out, at most 50. |
search
Search Moroccan administrative units
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 parents.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| query | string | oui | The name to look for, in French, Arabic or as a slug, or a unit's code. |
| levels | array<enum: "commune" | "arrondissement" | "province" | "region" | "cercle"> | non | Only these levels. Every level when left out. |
| limit | integer | non | How many results. 10 when left out, at most 50. |
get_commune
Get one commune
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).
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| id | string | oui | An HCP code, the code as digits, or a slug. |
communes_near
Communes near a point
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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| lat | number | oui | Latitude, in degrees. |
| lng | number | oui | Longitude, in degrees. |
| radius_km | number | non | Radius in km. 10 when left out, at most 100. |
| limit | integer | non | How many results. 10 when left out, at most 50. |
commune_at
Commune at a point
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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| lat | number | oui | Latitude, in degrees. |
| lng | number | oui | Longitude, in degrees. |
list_communes
List communes
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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| region | string | non | A région, by code or slug. |
| province | string | non | A province or préfecture, by code or slug. |
| cercle | string | non | A cercle, by code or slug. |
| type | enum: "urban" | "rural" | non | Urban or rural communes only. |
| sort | string | non | A field to order by: code, name, population, change, density, area, or a census indicator by its path, such as labour.unemploymentRate or amenities.runningWater, as get_indicators names them. Put 2014. before the path for the 2014 figure, or change. for how far it moved since, as in change.illitera… |
| min_population | integer | non | Only communes with at least this many people in 2024. |
| max_population | integer | non | Only communes with at most this many people in 2024. |
| page | integer | non | Page number, from 1. |
get_unit
A région, province or cercle
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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | oui | A région, province, préfecture or cercle, by code or slug. |
| level | enum: "region" | "province" | "cercle" | non | The level, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. |
get_indicators
Census indicators
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 communes of 2,000 households or more, so there they're estimates. Ranking and comparing: to order communes by one figure, call list_communes with sort set to its path, rather than this once per commune. To compare the régions, the provinces or the arrondissements, give level without a unit and get them all in one call. The 2014 census is here too, under census. Age, education, local languages, illiteracy, fertility, disability, work, the ways of getting to work, dwellings, amenities, wastewater and waste ask what 2024 asks and can be read against it. Where people work and how children get to school are 2014 only. Five topics changed and can't be subtracted: marital status covered everyone rather than people aged 15 and over, schooling ages 7 to 12 rather than 6 to 11, reading and writing was asked as combinations of languages rather than one at a time, a household counted under every cooking f…
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | non | A région, province or préfecture, cercle, commune or arrondissement, by code or slug. Morocco as a whole when left out. |
| level | enum: "commune" | "arrondissement" | "province" | "region" | "cercle" | non | With a unit, the level it's at, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. Without a unit, region, province or arrondissement gives every one of that level in one call. |
| topics | array<enum: "population" | "sex" | "age" | "maritalStatus" | "fertility" | "disability" | "schooling" | "illiteracy" …> | non | Only these topics. Every topic when left out. Two are easy to confuse: labour holds the labour force, the activity rate and the unemployment rate, while employmentStatus is how the people in work are employed, as employees, self-employed or apprentices. |
| area | enum: "total" | "urban" | "rural" | "each" | non | The whole unit (total), its urban or rural part, or each of the three. total when left out. |
| sex | enum: "all" | "male" | "female" | "each" | non | Everyone (all), men, women, or each of the three. all when left out. Household figures have no sex. |
| census | enum: "2014" | "2024" | "both" | non | Which census. 2024 when left out. both gives the two together, to see what changed. |
get_economy
Economic establishments
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 use are counted beside them and are not part of the total. Reading them: every figure is a count, taken during the census by field teams who mapped each establishment. Farming is out, the workbook counts every sector but agriculture, and the jobs are the permanent ones. Ranking and comparing: to order communes by one of these, call list_communes with sort set to its path, such as economy.establishments.jobs, or by one of the 3 it works out from them: economy.per1000.establishments, economy.per1000.jobs, economy.perBusiness.jobs. To compare the régions, the provinces or the arrondissements, give level without a unit and get them all in one call. Casablanca and the 5 other cities divided into arrondissements are counted by arrondissement, so their figures are the sum of those, marked basis: arrondissement_sum. Say so when you report one.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | non | A région, province or préfecture, cercle, commune or arrondissement, by code or slug. Morocco as a whole when left out. |
| level | enum: "commune" | "arrondissement" | "province" | "region" | "cercle" | non | With a unit, the level it's at, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. Without a unit, region, province or arrondissement gives every one of that level in one call. |
| topics | array<enum: "establishments" | "sector" | "size" | "founded"> | non | Only these topics. Every topic when left out. |
get_housing
Urban housing stock
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 the dwelling each household lives in, for the whole country rather than the towns. A unit with no urban area has nothing here. For the households with running water or electricity in any commune, rural ones included, use get_indicators' amenities topic, and its wastewater topic for a public sewer; list_communes can sort by either, as in amenities.runningWater.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | non | A unit by code or slug. Morocco as a whole when left out. |
| level | enum: "commune" | "arrondissement" | "province" | "region" | "cercle" | non | With a unit, the level it's at. Without one, region, province or arrondissement gives every one of that level. |
| topics | array<enum: "dwellings" | "occupancy" | "type" | "age" | "ageByType" | "walls" | "roofs" | "networks"> | non | Only these topics. Every topic when left out. |
get_insights
Figures that stand out in a commune
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 differently, shares by sex and likely errors in the data are left out too. An economy or housing figure on fewer than 100 businesses or urban dwellings is left out, since a handful of them can swing a share. A census figure in a commune of 2,000 households or more is marked sampled, since the long questionnaire went to a sample of households there. No language model writes or judges any of it. Only communes have these, and most have none.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | oui | A commune, by code or slug. |
| level | enum: "commune" | "arrondissement" | "province" | "region" | "cercle" | non | The level, where a name is shared: Tiznit is a commune and a province, and a name alone means the commune. |
get_neighbourhoods
A commune's neighbourhoods and postcodes
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.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | oui | A commune, by code or slug. |
| limit | integer | non | How many neighbourhoods, in alphabetical order. 200 when left out; Casablanca has over 1,400. |
get_douars
A rural commune's douars
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 a map places 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 paved road, an unpaved road a car can drive on, a primary school, a collège, a lycée and a health centre. HCP withholds those for a smaller douar, and says null. A town has no douars, though 21 communes counted as urban have some in their rural part.
| Paramètre | Type | Requis | Description |
|---|---|---|---|
| unit | string | oui | A commune, by code or slug. |
| fraction | string | non | Only the douars of this fraction, by its 10-digit code. |
| figures | boolean | non | Include each douar's figures. Left out, a douar is its name, kind, households and people. |
Compatibilité clients
Selon les transports que chaque client déclare accepter dans sa documentation officielle ; ce n’est pas un essai réel dans le client.
| Client | Transports documentés | Ce serveur | Source |
|---|---|---|---|
| Claude Code | stdio Streamable HTTP SSE | transport accepté | doc |
| Claude (claude.ai, Claude Desktop, Cowork) | stdio Streamable HTTP SSE | transport accepté | doc |
| ChatGPT (serveurs MCP personnalisés / plugins) | Streamable HTTP SSE | transport accepté | doc |
| Cursor | stdio Streamable HTTP SSE | transport accepté | doc |
| VS Code (GitHub Copilot) | stdio Streamable HTTP SSE | transport accepté | doc |
| Windsurf (documentation redirigée vers Devin Local / Devin CLI) | stdio Streamable HTTP SSE | transport accepté | doc |
| Gemini CLI | stdio Streamable HTTP SSE | transport accepté | doc |
| OpenAI Codex (CLI, extension IDE, app) | stdio Streamable HTTP | transport accepté | doc |
Configs prêtes à copier
Adresse distante utilisée : https://communes.pages.dev/mcp. Formats repris de la documentation de chaque client.
claude mcp add --transport http morocco-communes https://communes.pages.dev/mcpCustomize > Connectors > + Add > Add custom connector ; Name : morocco-communes ; URL : https://communes.pages.dev/mcpchatgpt.com/plugins > + > Add custom MCP server ; Name : morocco-communes ; Server URL : https://communes.pages.dev/mcp ; Create as a plugin{
"mcpServers": {
"morocco-communes": {
"url": "https://communes.pages.dev/mcp"
}
}
}{
"mcpServers": {
"morocco-communes": {
"type": "http",
"url": "https://communes.pages.dev/mcp",
"tools": ["*"]
}
}
}{
"mcpServers": {
"morocco-communes": {
"url": "https://communes.pages.dev/mcp"
}
}
}{
"mcpServers": {
"morocco-communes": {
"httpUrl": "https://communes.pages.dev/mcp"
}
}
}[mcp_servers.morocco-communes]
url = "https://communes.pages.dev/mcp"Citer cette source
Vous rédigez un article ou un comparatif ? Cette fiche distingue les informations du registre et nos mesures. Citez le lien permanent et la date du test ; un résultat OK ne constitue pas un audit de sécurité ni une garantie de disponibilité.
Morocco communes · L’Atlas · Test du
[Morocco communes — L’Atlas](https://latlas.dev/mcp/io.github.zkousama/morocco-communes)Source : Registre officiel MCP · relevé le 2 déc. 2026. L’Atlas n’ajoute aucune donnée qui ne vienne de cette source ou de ses propres tests.