Borgo

v0.5.2
io.github.ABCastor/borgo Checked 7 hours ago Published 5 days ago

Compare cities to live in on open, sourced data: take-home pay, rent, visas, climate, safety.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_cities Search cities

Find cities already in the dataset (the snapshot and places fetched before) by name, alias or id, optionally within one country. Returns ids for the other tools, how many match and whether more do. A place not found here can still be fetched: call fetch_city.

ParameterTypeDescription
query *stringName, alias or id; empty lists every city
countrystringISO alpha-2 filter
limitintegerDefault 10 for a query, 100 for the full list

get_city Figures for a city

One city's figures, each with source, period, geographic level and licence; daylight; the take-home pay model; whether each person in a household may live and work there, with the rules checked; links to sources we may not copy, and Borgo's generic quality-of-life index with its fixed weights. Compact by default (figures with a value, long series counted); pass metrics for a few figures, detail "full" for everything. Hosts with MCP Apps show this result as Borgo's city dossier (key figures with their sources, the year's temperatures against the person's nice days). Other hosts get the markdown…

ParameterTypeDescription
city *stringCity id or name
detailstring"summary" (default) or "full"
metricsarrayOnly these metric ids, e.g. ['rent_1bed','pm25']; list_metrics_and_sources kind "metrics" lists them
passportsarrayOptional: each person's passports, e.g. [['US']] or [['IT'],['US','IE']]: who may live and work there
rightsarrayOptional: each person's rights to live and work that are not citizenship, in the same order as passports, e.g. [[{kind:'permanent',where:'DE'}]]

compare_cities Compare cities

Rank any number of cities for a person or household: a verdict, the score out of 100 from their weights with points and reasons per line, must-pass lines as pass, fail or unknown, each earner's take-home pay and what is left after rent and spending, who can move there, how the set was scored, and what to add next. Every figure carries its source and period. Compact by default; detail "full" adds every tax line, childcare, health, leave and break-even. Hosts with MCP Apps show this result as an interactive Borgo chart the person can click (change the ranking, adjust weights, open a city). Other…

rank_cities Rank and filter known cities

List known cities by any scalar/monthly metric, any priority recipe (nice days under your definition, money left with salary and spending), or your overall score. Compose inclusive metric/priority ranges, geographic and population filters and established household rights. Every row names its sources and periods. Gaps and unknown filters never pass as zero. Returns an in-chat bar chart, Equal Earth map or weather month strips, plus a markdown fallback. Defaults: descending, 20 results; rent usually needs ascending. Money uses one display currency, default EUR or salary currency. compare_cities…

suggest_cities Suggest cities for me

Rank all published cities by the current profile: top five not already in cities, with their two biggest observed score contributions. Same inputs as compare_cities; cities may be empty. Fixed scoring by default; Weather uses your nice-day definition. Missing lines are left out of a city's score, so its coverage says how much of the score rests on real figures.

net_pay Take-home pay

Take-home pay for a gross yearly salary in a country (and region or city, for regional and municipal taxes), with every tax line, the model's caveats and its official sources. Takes age, children, a pension share, a newcomer regime, and a partner (joint filing for a married couple where the country has it). Hosts with MCP Apps show this result as Borgo's money waterfall (gross pay, each tax line, take-home pay). Other hosts get the markdown.

ParameterTypeDescription
gross *numberGross yearly salary
ageintegerAge in years, where the tax uses it
childrenarrayChildren's ages, for child credits and allowances
citystringCity id or name; sets country, region and municipal taxes
countrystringISO alpha-2 or name; optional when city is given
currencystringCurrency of gross; default the country's
displayCurrencystring
partnerobjectA second earner in the same household
pensionnumberPension share of gross, 0.05 = 5%
regimestringA newcomer regime id for this country (list_metrics_and_sources kind "regimes")
regionstringISO 3166-2 subdivision, e.g. US-CA, GB-SCT, IT-21
tweakobject

list_metrics_and_sources Metrics, criteria and sources

What the dataset holds: scoring lines with their scales and default weights, metrics with coverage, sources with licences, take-home pay models, newcomer regimes with each condition's id, presets, and the link-only sources. Pass kind for one part (kind "regimes", country "NL" lists the Dutch regimes and their conditions).

ParameterTypeDescription
countrystringISO alpha-2, with kind taxModels or regimes
kindstringOne part only; leave out for everything

methodology How the scores and money are computed

How scores, weights, must-pass lines, missing data, the money model, the right to live and the open-data rule work, with every scale.

list_sources The source registry

The curated list of sources: what each measures (with a plain definition), coverage, licence, whether it may be redistributed, how it is fetched (endpoint, CORS, key) and who vetted it, plus link-only pages such as Numbeo and WeatherSpark. Filter by metric or country; pass a place to get the publisher's page for it.

ParameterTypeDescription
accessstring
citystringA city id or name in the dataset, to fill in each publisher's page for it
countrystringISO alpha-2: only sources covering this country
metricstringMetric id, e.g. pm25, rent_1bed, sunshine_hours

community_figures What people report for a place

Figures people report for themselves about a place on Borgo, after automated review: rent by bedrooms and area, everyday prices, take-home pay by kind of work and a 1 to 5 rating of living there, each with its median (a rating: mean), middle half from 3 entries, count, months and the official figure beside it where one exists. Community data, CC BY 4.0; never mixed into official figures or scores. Covers the snapshot's cities and the towns on Borgo's map.

ParameterTypeDescription
city *stringCity id (turin-it) or name ('Turin', 'Palermo, IT')

submit_figures Add the person's own figures

Sends what the person pays and earns where they live to Borgo's open community data (published rounded under CC BY 4.0, no name or address kept; an automated review holds amounts far from others' or the official figure). Without confirm nothing is sent: the answer is the draft with its privacy note, for the person to approve. With confirm true the exact figures of the draft are recorded; it takes figures a person gives as their own, not estimates or figures from other sites. The answer carries a removal code for the person to keep.

ParameterTypeDescription
city *stringCity id (turin-it) or name ('Turin', 'Palermo, IT')
confirmbooleantrue only after the person agreed to send these exact figures
currencystringISO 4217; must be the place's own (checked)
pricesobjectWhat they pay for everyday things, in the place's currency
ratingintegerLiving there, all things considered, 1 poor to 5 excellent
rentobject
salaryobject

remove_figures Take back a submission

Delete a submission the person sent, with the removal code it gave them.

ParameterTypeDescription
code *stringThe 20-character removal code

fetch_city Fetch any place

Resolve any real place ("Palermo, IT", "Sligo", "Bangalore", or geonames:<id>; an island or a country, "Tenerife" or "Malta", is read as its main town or capital, and the answer says so) and fetch its figures from every registry source that covers it: climate (air and feels-like temperature with their spread and extremes, hourly temperature by month, cloud cover, wet days, and day counts: nice, beach, run or ride, muggy, grey, hot nights, heat stress, snow, wind), measured sunshine, air quality, price level, homicides, life expectancy, life satisfaction, research density and official rents. Sa…

ParameterTypeDescription
place *stringPlace name, optionally with country: "Palermo, IT"; or geonames:<id>
detailstring"summary" (default): the id, what each source gave, what the place lacks, figures with long series counted. "full": every value and URL
refreshbooleanFetch again even if cached
sourcesarrayOnly these registry source ids

record_observation Keep a figure you read

Keep a figure in this person's cache, with its source id from list_sources, the page URL and the period: one you read in an open source (a city statistics office table), or one the person read on a link-only page (Numbeo) and gave you. Never fetch link-only pages yourself. The figure counts like any other, marked as reported by an agent, unverified; figures from link-only sources are never published by the project.

ParameterTypeDescription
city *stringCity id or name (fetch_city first for a new place)
metric *stringMetric id, e.g. rent_1bed
period *stringWhat time it describes, e.g. 2026 or 2026-09
source *stringRegistry source id, e.g. numbeo
url *stringThe page the figure was read on
value *A number, or 12 monthly numbers for a monthly metric. Money in the city's local currency.
levelstring
notestring
unitstringThe unit the figure is in, as list_metrics_and_sources gives it (e.g. EUR/month for rent in Lisbon). Checked against the metric's unit; leave it out only when you are sure

list_stale Facts due for review

The facts Borgo encodes by hand (tax models, abortion and same-sex couples law, paid leave, election results, residence rules, corrected figures), each with the day it is due to be compared with its official source again, the most overdue first. Each row says why it is due, links its current source and gives the target to use with propose_change.

ParameterTypeDescription
asOfstringThe day to compare against, YYYY-MM-DD (default today)
countrystringISO alpha-2: only this country's facts
kindstringOnly one kind of fact
limitintegerDefault 50
withinintegerAlso list facts due within this many days (default 0: only those already due)

propose_change Propose a correction

Turn a correction to a Borgo figure, rule or source into a proposal the maintainers review, checked the way the project's GitHub workflow checks it: the target exists, the value has the metric's shape and unit, the citation is an official text (statute, gazette, official table or page, or a registry source) and not a link-only site, a rule cites its legal text, and the cited page answers and holds the quote. Returns the verdict and a prefilled GitHub issue link for the person to open and submit (public, under their account, data under CC BY 4.0). Posts nothing by itself: to post with the perso…

ParameterTypeDescription
agent *stringYour name and version, name@1.0
citation *objectThe primary citation: the official text itself
kind *stringcorrection (a figure shown is wrong), figure (a figure Borgo lacks), rule-change (a tax, leave, residence or law rule), source (a registry entry), link (a broken or missing address)
operator *stringThe person or project that runs you and answers for the proposal
proposed *A figure in the metric's unit (12 numbers for a monthly one), or the new rule in a sentence
citystringFor a figure: the city id (search_cities)
currentstringThe value shown now
filestringFor a rule, source or link: the file, e.g. src/tax/it.ts or registry/ons-pipr.json (list_stale gives it)
leadsarrayNews or other pages that pointed to the change: leads, never citations
levelstringThe area the value describes
metricstringFor a figure: the metric id
notestringFor the reviewer; public, so no personal details
offlinebooleanSkip opening the cited pages
pathstringFor a rule, source or link: what inside the file changes, e.g. ABORTION.US-NY or homepage
periodstringThe time the value describes, e.g. 2026-09
postobjectOnly after the person agreed to post this exact proposal: the confirm token from the previous call
sourcestringFor a figure: the registry source id it comes from (get_city shows it)
unitstringThe figure's unit, e.g. GBP/month