cyprus-open-data-mcp
# cyprus-open-data-mcp
An MCP server that gives AI agents live, official Cyprus data: companies, public contracts, property market, CYSTAT statistics (inflation, GDP, wages, population), current weather, and the whole data.gov.cy catalogue, with visual panels (company card, contracts table, charts, district map) in clients that support MCP Apps.
Add one line to Claude (or any MCP client) and ask questions in plain language; every answer comes with its source and date.
**Ελληνικά.** Το cyprus-open-data-mcp είναι διακομιστής MCP ανοικτού κώδικα που επιτρέπει σε βοηθούς τεχνητής νοημοσύνης (όπως το Claude) να απαντούν με επίσημα δημόσια δεδομένα της Κύπρου: το Μητρώο Εταιρειών του Τμήματος Εφόρου Εταιρειών, τις δημόσιες συμβάσεις που κατακυρώθηκαν, τα στατιστικά του Τμήματος Κτηματολογίου και Χωρομετρίας (πωλήσεις, πωλήσεις σε αλλοδαπούς, υποθήκες), όλους τους πίνακες της Στατιστικής Υπηρεσίας (πληθωρισμός, ΑΕΠ, απολαβές, πληθυσμός, τουρισμός), τις τρέχουσες μετρήσεις των μετεωρολογικών σταθμών του Τμήματος Μετεωρολογίας και τον κατάλογο της Εθνικής Πύλης Ανοικτών Δεδομένων data.gov.cy. Κάθε απάντηση αναφέρει την πηγή και την ημερομηνία των δεδομένων. Για λόγους προστασίας προσωπικών δεδομένων δεν υπάρχει αναζήτηση με όνομα φυσικού προσώπου. Ο κώδικας διατίθεται με άδεια MIT.
## Install
Needs Node.js 20 or newer. Nothing else: no API key, no account.
### Claude Code
```sh
claude mcp add cyprus-open-data -- npx -y cyprus-open-data-mcp
```
### Claude Desktop
Settings, Developer, Edit Config, then add to `claude_desktop_config.json` and restart Claude Desktop:
```json
{
"mcpServers": {
"cyprus-open-data": {
"command": "npx",
"args": ["-y", "cyprus-open-data-mcp"]
}
}
}
```
### Other MCP clients
Any client that runs stdio servers works with the same command, `npx -y cyprus-open-data-mcp`.
Cursor (`~/.cursor/mcp.json`) and most others use the `mcpServers` block above. VS Code (`.vscode/mcp.json`):
```json
{
"servers": {
"cyprus-open-data": { "type": "stdio", "command": "npx", "args": ["-y", "cyprus-open-data-mcp"] }
}
}
```
### From a clone
```sh
git clone <this repository> && cd cyprus-open-data-mcp
npm install # also builds dist/
claude mcp add cyprus-open-data -- node "$PWD/dist/src/index.js"
```
### Optional: download the company register ahead of time
The first company question downloads the register (about 240 MB, three CSV files) and indexes it, which takes 10 to 60 seconds depending on your connection. If that first call times out the tool says so and the next call works. To do it in advance:
```sh
npx -y cyprus-open-data-mcp --prefetch
```
### Optional: run over HTTP
For hosting behind a reverse proxy later, the server also speaks MCP Streamable HTTP (stateless):
```sh
npx -y cyprus-open-data-mcp --http 8080 # http://127.0.0.1:8080/mcp, health at /health
npx -y cyprus-open-data-mcp --http 8080 --host 0.0.0.0 # all interfaces; put a proxy with TLS in front
```
What the HTTP mode serves:
- **`GET /`:** a one-page guide to adding the server to Claude, ChatGPT or Claude Code, with the URL and a copy button.
- **Self-contained:** its fonts (Inter and Bricolage Grotesque, SIL Open Font License, licences in `assets/fonts/`) and preview image are served by the server itself from `/assets/`. It makes no requests to anywhere else, has no tracking, and sets no cookies or storage.
- **The URL it shows** is built from the request; set `CYPRUS_OPEN_DATA_PUBLIC_URL` to fix it.
- **Screenshots:** `docs/screenshots/front-*.png`.
- **`/mcp`:** the MCP endpoint.
- **`/health`:** a status check.
Abuse guards and access:
- **Rate limit:** 60 requests a minute per client, answered with HTTP 429 and a `Retry-After` header. Change it with `--rate-limit N`. Behind Cloudflare the client is taken from `CF-Connecting-IP`, but only when the connection comes from a local or private address (the tunnel or proxy).
- **Request size:** bodies are capped at 256 KB.
- **Local binding:** when bound to 127.0.0.1, the server refuses requests whose Host header is not local.
- **Authentication:** there is none. Everything the server serves is public data.
## Example questions
Asked in a fresh Claude Code session that had only this server, on 4 December 2026. The answers below are what the tools returned; check them with the links each answer cites.
1. **"Which public bodies bought advertising or marketing services (CPV 79340000 family) in the last 12 months, from whom and for how much?"**
`search_public_contracts(cpv="79340000", summary_by="buyer")`: 135 awards worth EUR 8.68 million between 27 November 2025 and 27 November 2026. The top buyers were the Deputy Ministry of Tourism with EUR 5.83 million in 3 awards, the Press and Information Office with EUR 627k in 41 awards, the Electricity Authority with EUR 578k in 1 award, the Department of Environment with EUR 497k, and the Open University with EUR 474k in 50 awards. By supplier, the largest is not a company. It is the Treasury's own label for online purchases from international platforms, EUR 5.07 million in 5 awards, EUR 5.0 million of it the Tourism ministry's online and Meta campaigns. The largest companies were Global Media Group Services Ltd (EUR 834k), LEDRA ADVERTISING LTD (EUR 578k) and UNITED BRAINS LTD (EUR 317k).
2. **"Is Ledra Advertising active, when was it registered, and has it won public contracts?"**
`search_companies` plus `search_public_contracts(supplier=..., awarded_from="2009")`:
- **Register:** LEDRA ADVERTISING LIMITED (HE 6251) is Registered (active). It was incorporated on 9 January 1974.
- **Contracts:** 7 awards since 2009, worth EUR 791,200 in total.
- **Largest award:** EUR 577,950 from the Electricity Authority on 28 September 2026.
3. **"Cyprus inflation last month vs a year ago?"**
`search_statistics` then `query_statistics`: the CPI rose 4.79% in November 2026 compared with November 2025 (October 2026: 4.37%). A year earlier, November 2025 was -0.54%. CYSTAT table "Consumer Price Index by Main Categories", updated 3 December 2026.
4. **"Current temperature and wind in Paphos?"**
`get_current_weather(place="Paphos")`: at 13:10 Cyprus time, the Paphos station (1.4 km from the town centre) read 14.9 °C (today's range 9.4 to 17.3 °C). Wind was 3.9 km/h (2.1 knots) from the SSE, humidity 58%, and there was no rain. Department of Meteorology, readings refreshed every 10 minutes.
5. **"Sales to foreigners in Limassol this year vs last?"**
`get_sales_to_foreigners(district="Limassol")`: data runs to September 2026, so January to September is compared in both years:
- **Sales:** 823 properties sold to foreign buyers in 2026 against 790 in 2025 (+4%). 464 of the 2026 sales were to non-EU buyers.
- **Sale contracts deposited:** 1,814 against 1,568 (+16%), which points to more transfers to come.
- **Full year 2025:** 1,020 sales.
6. **"What did property sell for in Limassol last quarter?"**
`get_property_sales(district="Limassol")`: in Q3 2026 the Land Registry recorded 1,340 sale transfers in Limassol. The total declared value was EUR 481.8 million, EUR 359,582 per transfer on average (Q2 2026: EUR 451,204). This covers all property types together.
7. **"How fast did the Cyprus economy grow in the latest quarter?"**
`query_statistics` on CYSTAT's quarterly GDP growth table: real GDP grew 0.5% in Q3 2026 on the previous quarter (seasonally adjusted) and 3.1% on Q3 2025. The table was updated 1 December 2026.
8. **"What are average monthly earnings in Cyprus and how fast are they rising?"**
`query_statistics` on "Average Monthly Earnings, Quarterly": EUR 2,663 in Q2 2026 (seasonally adjusted), up 0.6% on Q1 and 3.3% on Q2 2025 (EUR 2,578). CYSTAT's published year-on-year growth through 2025 was 4.2 to 4.6%. The table was updated 26 October 2026.
Not sure what to ask? The `what_can_you_answer` tool lists every topic, how fresh it is, what is not covered, and example questions. Agents are told to call it first when unsure.
## Tools
| Tool | What it does |
| --- | --- |
| `what_can_you_answer` | Topics covered, which tool to use, freshness, gaps and example questions. Start here. |
| `search_companies` | Company register search by organisation name or registration number (`HE 12345`, `12345`). |
| `get_company` | One organisation: type, status and status date, registration date, registered office, officers and their roles. |
| `search_public_contracts` | Awarded public contracts 2009 to date: buyer, title, supplier company, values, dates, CPV codes (a code covers its family). Totals, plus top buyers or suppliers with `summary_by`. |
| `get_property_sales` | Land Registry sale transfers and declared values by district and month, quarter or year, 2017 to date. |
| `get_sales_to_foreigners` | Land Registry sales and sale contracts by foreign buyers (EU and non-EU) by district. |
| `get_mortgages` | Land Registry mortgages registered and amounts by district. |
| `search_statistics` | Find CYSTAT tables (about 1,000: inflation, GDP, earnings, employment, population, census, tourism, trade, house price index...) in English or Greek. |
| `describe_statistics_table` | A CYSTAT table's dimensions and values, and what is selected by default. |
| `query_statistics` | Labelled numbers from a CYSTAT table with filters (`latest`, `last:N`, ranges, labels, `*`) and a cell limit. |
| `get_tourist_arrivals` | Shortcut: CYSTAT tourist arrivals per month or year, total or by country of residence. |
| `get_current_weather` | Live Department of Meteorology station readings: temperature, day max and min, humidity, wind, rain, pressure and solar radiation where measured. Nearest station to a town or coordinates, or an island overview. |
| `search_datasets` | Search the about 2,000 datasets on data.gov.cy by words, publisher, update date and format. English words are mapped to the Greek titles. |
| `get_dataset` | One dataset: title, publisher, last update, frequency, licence, resources with links (and the CYSTAT table reference where there is one). |
| `read_resource` | Preview rows of a CSV, JSON or XLSX file (up to 50 MB, max 200 rows per call) with paging, columns and filters. |
| `list_publishers` | Public bodies publishing on the portal, with dataset counts. |
All tools are read-only and return compact JSON with a `source` block (publisher, link, last update, licence).
### Why these sources
All of them are fresh and answer real questions. Checked on 4 December 2026:
| Source | Last updated | Data up to |
| --- | --- | --- |
| Company register | 2 December | the 2 December file |
| Public contracts | 1 December | late November |
| CYSTAT tables | continuously | CPI to November 2026, GDP to Q3 2026 |
| Land Registry | 12 October | September 2026 |
| Weather | every 10 minutes | live |
Not covered, and why:
- **Fuel prices:** the portal only links to the EU Weekly Oil Bulletin and to a web form, not to a feed that can be read reliably.
- **Rents:** CYSTAT has no rent index; rents appear only in census tables.
- **Weather forecasts:** the Met Department's open feed has current readings only.
## Panels
Seven tools also come with a visual panel, using **MCP Apps**: the official MCP extension (`io.modelcontextprotocol/ui`, spec 2026-01-26). Clients that support it show the panel inline; every other client gets the same text answer as before.
| Panel | Shown for | What you can do in it |
| --- | --- | --- |
| Company card | `get_company` | Status badge, registration date, registered office, officers and roles, and the public contracts the company has won (fetched by the panel through the host). |
| Contracts table | `search_public_contracts` | Sort by date, buyer, supplier or value, filter as you type, see totals for what is shown, load more rows, see the top buyers or suppliers. |
| Statistics chart | `query_statistics`, `get_tourist_arrivals` | Line or bar chart with a period switch (last 12, 24 or all; monthly or yearly for arrivals). Different measures get separate charts, never two axes. Every chart has a table view. |
| District map | `get_property_sales`, `get_sales_to_foreigners`, `get_mortgages` | The six districts shaded by the chosen measure and period, hover for numbers, click a district for its trend over time, plus a ranked table. Kyrenia shows as "no figures". |
<p>
<img src="docs/screenshots/company-card-light-800.png" alt="Company card, light theme" width="49%">
<img src="docs/screenshots/district-map-dark-400.png" alt="District map, dark theme, 400 px" width="24%">
<img src="docs/screenshots/contracts-table-light-400.png" alt="Contracts table, light theme, 400 px" width="24%">
</p>
<p>
<img src="docs/screenshots/statistics-chart-light-800.png" alt="Statistics chart, light theme" width="49%">
<img src="docs/screenshots/district-map-light-800.png" alt="District map, light theme" width="49%">
</p>
The screenshots use the made-up test data (no real companies or people). Light and dark versions at 400 and 800 px for every panel are in [docs/screenshots](docs/screenshots).
**Which clients show them:**
| Client | Panels | Notes |
| --- | --- | --- |
| Claude (web and desktop) | Yes | Documented MCP Apps support. Use the server as a custom connector over HTTPS (`--http`, behind a TLS proxy). |
| ChatGPT | Yes | Documented MCP Apps support in developer mode connectors. |
| VS Code (GitHub Copilot), Goose, Postman, MCPJam | Yes | Listed by the MCP Apps project. |
| Claude Code and other terminal clients | No | Text answers only; tested headless, the answers are unchanged. |
Claude has been checked with the server added as a custom connector: answers come back and the panels load. ChatGPT has not been checked yet. The panels were also tested in two ways:
- in headless Chromium, against the official `AppBridge` host class from `@modelcontextprotocol/ext-apps` 1.7.5 (handshake, tool input and result, size reporting, the company card's tool call);
- against a hand-written host that follows the spec, in light and dark at 400 and 800 px.
**How they behave:**
- **Self-contained:** each panel is one HTML file under 50 KB, with no CDN, no fonts, no images and no network access.
- **No external domains:** the `ui://` resources declare no external domains (`connectDomains`, `resourceDomains`, `frameDomains` and `baseUriDomains` are all empty). Each panel also sets its own Content Security Policy with `connect-src 'none'`.
- **Host communication:** panels talk only to the host, through the spec's `postMessage` JSON-RPC.
- **Tool calls:** the only tool calls a panel makes are `search_public_contracts`, from the company card (contracts won) and from the contracts table ("Load more"). Both are only offered when the host says it proxies tool calls.
- **Links:** "open on data.gov.cy" goes through the host's `ui/open-link`, so the host decides.
- **Theming:** panels follow the host theme. They apply the standard MCP Apps CSS variables and light or dark theme when the host sends them, and fall back to their own palette when it does not. Numbers use Cyprus conventions (EUR, 1,234), labels are in English, and Greek source names are kept where useful.
- **Map boundaries:** the district outlines come from the Department of Lands and Surveys' district boundaries on data.gov.cy (CC BY 4.0), simplified to about 11 KB by `scripts/build-district-map.py`.
- **Panel data:** tools with a panel return `structuredContent` for it, alongside the unchanged JSON text.
## Privacy (GDPR)
The company register names real people as directors, secretaries, partners and owners. This server is built so it cannot be used to profile them:
- `search_companies` matches **organisation names and registration numbers only**. Officer names are never searched.
- There is **no tool that searches by a person's name** and **no reverse lookup** from a person to the companies they are involved in.
- `get_company` returns the officers **of the one company asked about**, as published by the Registrar.
- The `supplier` filter of `search_public_contracts` accepts only names with a legal form (LTD, LIMITED, PLC, ΛΤΔ and similar), because some suppliers are sole traders. Supplier summaries aggregate the winners of the matching awards; they do not search people.
- The server keeps no logs of questions and sends nothing anywhere except plain HTTP requests for the public files.
If you build on this code, keep it that way.
### Privacy of people who use it
The server asks for no personal data: no account, no login, no cookies, no tracking. It does not store your questions or the answers. The HTTP server itself writes no request log. A host that runs it, like any website, keeps only standard access logs (time, IP address, path) at its proxy or hosting provider. When the server fetches public files it identifies itself only as `cyprus-open-data-mcp/<version>` with the project link, never with anything about you.
## Data
Data: Cyprus open data portal data.gov.cy and the Department of Registrar of Companies.
Also:
- the Statistical Service of Cyprus, CYSTAT (all statistics tables and tourist arrivals), read through its PxWeb API;
- the Department of Meteorology (live station readings, https://dom.org.cy/AWS/OpenData/CyDoM.xml);
- the Department of Lands and Surveys (property sales, sales to foreigners, mortgages);
- the Treasury of the Republic of Cyprus (public contracts).
**Licence of the data.** The portal's FAQ (https://data.gov.cy/en/faq, question 7, "Ποια είναι η άδεια χρήσης;") says:
> Γενικά τα σύνολα δεδομένων που δημοσιεύονται στο data.gov.cy είναι διαθέσιμα με άδεια χρήσης Creative Commons – Attribution 4.0 International (CC BY 4.0) επιτρέποντας σε οποιονδήποτε επιθυμεί να τα χρησιμοποιήσει να τα αναπαράγει και να τα τροποποιήσει χωρίς οποιονδήποτε περιορισμό πέραν της υποχρέωσης αναφοράς στην πηγή και της ρητής αναφοράς διαφοροποίησης του πρωτότυπου από το δευτερογενές υλικό που τυχόν παράγεται.
In English: in general, datasets published on data.gov.cy are available under Creative Commons Attribution 4.0 International (CC BY 4.0). Anyone may reproduce and modify them without restriction other than citing the source and clearly stating how derived material differs from the original.
**Licence per resource.** The portal's technical guidelines add that publishers choose between CC BY 4.0 and CC BY-SA 4.0. The catalogue records a licence on every resource: on 4 December 2026, 3,974 resources were CC BY 4.0 and 85 were CC BY-SA 4.0. The terms of each dataset apply, and `get_dataset` and every tool's `source` block show them. Specific sources:
- **Weather:** the catalogue lists the Met Department's current readings feed as CC BY 4.0. The feed itself carries the notice "Weather Data Copyright The Cyprus Department of Meteorology", so credit the Department when you use it.
- **CYSTAT tables:** catalogued on data.gov.cy as CC BY 4.0.
The portal's disclaimer (https://data.gov.cy/en/node/96) says the portal and the publishing bodies accept no responsibility for the accuracy and completeness of the data, and that official documents prevail in case of conflict. For legal certainty about a company, order an official certificate from the Registrar.
This project does not redistribute data. It downloads public files on demand and keeps a local cache. Answers derived from the data should cite the source; every tool result includes it.
### How the server treats the publishers' servers
- At most one request per second across the whole process, redirect hops included.
- **Cache:** files are cached on disk (default `~/.cache/cyprus-open-data-mcp`, or `CYPRUS_OPEN_DATA_CACHE`). The server checks with the publisher at most once a day, using ETag and Last-Modified, so unchanged files are not downloaded again.
- **Shorter cache times:** the weather feed is checked at most every 10 minutes, and statistics query results are reused for 6 hours.
- **Offline:** if a publisher's server cannot be reached, the last copy is used and marked stale.
- **User-Agent:** `cyprus-open-data-mcp/<version>`, with the project URL once published. No email or personal data.
- **Hosts:** only `data.gov.cy`, CYSTAT's statistics API and the Met Department's open data feed are contacted.
### Known limits
- **Company register:**
- The extract has names, status, type, dates, registered office and officers.
- It has **no shareholders**, no former names and no filings.
- The Registrar refreshes it about monthly.
- 17 of 577,582 rows are malformed in the source file and are skipped.
- **Land Registry figures:** counts and values per district and month, for all property types together. There are no individual transactions. The sales-to-foreigners files give counts only, without values.
- **Contracts:** values are as reported by the contracting authorities, and framework agreements can show a ceiling value. Some award rows name a generic supplier, such as online platform purchases.
- **Statistics:**
- Large statistics queries must be narrowed (default limit 200 cells, max 1000).
- CYSTAT marks some values as not available; these come back as `null`.
- Periods that exist in a table but have no numbers yet are listed in `periods_without_data`.
- **Weather:** readings come from automatic stations and are not quality-controlled. Airports report wind per runway.
- **Catalogue:** most titles exist only in Greek.
- **Previews:** `read_resource` previews CSV, JSON and XLSX files. Map services, PDFs and old `.xls` files are listed with their links but not read.
## Development
```sh
npm install
npm test # build + unit tests with tiny made-up fixtures, no network
npm run smoke # opt-in: runs every tool once against the real sources
npm run panels # renders every panel in headless Chromium, saves docs/screenshots/
npm run front # renders the HTTP front page at 360 to 1280 px, light and dark
node dist/scripts/call-tool.js query_statistics '{"table":"Price Indices/Consumer Price Index/0410070","filters":{"MONTH":"latest"}}'
```
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to add a dataset tool.
## Licence
Code: MIT, see [LICENSE](LICENSE). Data: see the Data section above.
TDQS
Scored across 16 tools
Each tool targets a distinct resource and action: catalogue browsing (search_datasets/get_dataset/list_publishers/read_resource), company lookup (search_companies/get_company), property metrics (get_property_sales/get_sales_to_foreigners/get_mortgages), statistics (search/describe/query_statistics), contracts and weather. The potentially confusable pairs (search_datasets vs search_statistics, get_dataset vs describe_statistics_table, the three property tools) are explicitly delineated in the descriptions. what_can_you_answer acts as a clear entry-point router rather than duplicating anything.
Almost all names follow a consistent snake_case verb_noun pattern (search_datasets, get_company, query_statistics, get_current_weather). The only deviation is what_can_you_answer, which is a question phrase rather than an action. The pattern is otherwise predictable and readable.
16 tools across five or six distinct data domains (catalogue, companies, property, statistics, contracts, weather) is proportionate; each tool covers a different data source or operation. It sits just above the comfortable 3-15 band, but no tool appears redundant.
Coverage is strong: catalogue discovery plus resource reading, company search and detail, three property series, statistics discovery-describe-query, contract search and live weather. Minor gaps exist: public contracts have no detail/lookup-by-id or buyer/supplier listing tool, and weather is current-only (forecasts explicitly out of scope), but these are workaroundable.