Contents
Documentation Town hall contracts
town-hall-contracts
1 credit per call Read-only mairies
List the public contracts signed by one French commune since 2018: subject, supplier, amount, dates, and whether it is a recurring contract to renew.
When to use it. Give the INSEE code. status to-renew keeps the recurring contracts (services, supplies) whose probable end is within 24 months: the time to approach the buyer. Small communes buy below the publication threshold and often have none.
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 public contracts signed by one French commune since 2018: subject, supplier, amount, dates, and whether it is a recurring contract to renew, 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-contracts",
"arguments": {
"limit": 10,
"offset": 0,
"insee": "12345",
"status": "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-contracts \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"limit": 10,
"offset": 0,
"insee": "12345",
"status": "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",
"status": "any",
}
request = urllib.request.Request(
"https://mairies.vosfichiers.com/api/v1/town-hall-contracts",
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-contracts", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"limit": 10,
"offset": 0,
"insee": "12345",
"status": "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. 38229. pattern ^(\d{5}|2[AB]\d{3})$ |
| status | enum | optional | "any" | Filter on the contract status. one of "any", "to-renew", "recurring-ongoing", "works-ongoing", "finished" |
| 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" |
| words | string | optional | none | Words. 3 to 80 characters |
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