Contents
Documentation Town hall projects
town-hall-projects
1 credit per call Read-only mairies
List the projects of one French commune: investments funded by the State (DETR, DSIL, Fonds vert…) and planning permits it requested, with its summary.
When to use it. Give the INSEE code (find it with town-hall-search or town-hall-profile). The summary gives counts since 2023, the latest projects, contracts to renew and local context (income, solar power, charging points). Themes and short subjects come from a model reading the official titles; the official title is returned too.
Credits are taken when the call starts and given back in full if the tool fails, times out or is refused by the service behind it.
Ask your assistant
Once the server is connected, a request in plain words is enough. For example:
Use Mairies de France to list the projects of one French commune: investments funded by the State (DETR, DSIL, Fonds vert…) and planning permits it requested, with its summary, with insee = "12345".
Examples
Most clients only need the server address and a sign-in: see Connect. Clients configured by a file take the first block. Your assistant then writes the second one by itself.
{
"mcpServers": {
"mairies-de-france": {
"url": "https://mairies.vosfichiers.com/mcp"
}
}
}
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "town-hall-projects",
"arguments": {
"limit": 10,
"offset": 0,
"insee": "12345",
"kind": "any"
}
}
}
Put an API key in the API_KEY environment variable first. Create a key
curl -X POST https://mairies.vosfichiers.com/api/v1/town-hall-projects \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 10,
"offset": 0,
"insee": "12345",
"kind": "any"
}'
Put an API key in the API_KEY environment variable first. Create a key
import json
import os
import urllib.request
payload = {
"limit": 10,
"offset": 0,
"insee": "12345",
"kind": "any",
}
request = urllib.request.Request(
"https://mairies.vosfichiers.com/api/v1/town-hall-projects",
data=json.dumps(payload).encode(),
headers={
"Authorization": "Bearer " + os.environ["API_KEY"],
"Content-Type": "application/json",
},
method="POST",
)
with urllib.request.urlopen(request) as response:
print(json.load(response))
Put an API key in the API_KEY environment variable first. Create a key
const response = await fetch("https://mairies.vosfichiers.com/api/v1/town-hall-projects", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"limit": 10,
"offset": 0,
"insee": "12345",
"kind": "any"
}),
});
console.log(await response.json());
Input
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| limit | integer | optional | 10 | Rows per page, 25 at most. ≥ 1≤ 25 |
| offset | integer | optional | 0 | Rows to skip, for the next page. ≥ 0≤ 50000 |
| insee | string | required | none | INSEE code, e.g. 38544. pattern ^(\d{5}|2[AB]\d{3})$ |
| kind | enum | optional | "any" | subsidy, permit or any. one of "any", "subsidy", "permit" |
| theme | enum | optional | none | Keep only this theme. one of "schools-childhood", "public-buildings", "energy", "street-lighting", "roads-mobility", "water-sanitation", "environment-nature", "sport", "culture-heritage", "health-social", "security", "digital", "planning-urbanism", "economy-tourism", "general-services" |
| since_year | integer | optional | none | First year. ≥ 2013≤ 2100 |
Output
A JSON object whose fields depend on the request; this tool declares no fixed shape.
Try it
Run this tool from your account, with a form built from the fields above. A run is a real call: it costs 1 credit.
Open in the playground