{
  "markdown": "# Leadgen — Romanian ONRC Business Registry (API + MCP)\n\nFree, read-only access to Romania's official business registry (**ONRC**):\nevery registered company, its CAEN activities, legal representatives, status,\nand 2025 financial statements — built from the state's own open-data dump and\nexposed over a tiny HTTP API **and** an MCP server.\n\n- **4,196,860** companies\n- **19.3M** CAEN activity records\n- **3.68M** legal representatives\n- **4.64M** status entries\n- **2025 financial statements** loaded\n\n## Live endpoints (free, no auth)\n\n**REST API** — `https://onrc-api.adrianhomelab.com`\n\n| Endpoint | Description |\n|---|---|\n| `GET /lookup_business?query=<name\\|CUI>&max_results=N` | Search companies by name or tax code (CUI). |\n| `GET /lookup_director?name=<name>&max_results=N` | Find companies by director / legal-representative name. |\n| `GET /docs` | Interactive OpenAPI docs (Swagger UI). |\n| `GET /health` | Liveness check. |\n\nThe landing page at `https://onrc-api.adrianhomelab.com/` documents the schema\nwith a worked example.\n\n**MCP server** — `https://hermes.adrianhomelab.com/mcp` (Streamable HTTP). Point\nany MCP client at that URL. Tools: `lookup_business`, `lookup_director`,\n`lookup_financials`, `extract_contacts`, `lookup_domain`.\n\n## Try it\n\n```bash\n# search by company name\ncurl \"https://onrc-api.adrianhomelab.com/lookup_business?query=DEDEMAN&max_results=3\"\n\n# search by CUI (tax code)\ncurl \"https://onrc-api.adrianhomelab.com/lookup_business?query=2816464\"\n\n# find companies by director name\ncurl \"https://onrc-api.adrianhomelab.com/lookup_director?name=popescu\"\n```\n\n```json\n{\n  \"query\": \"DEDEMAN\",\n  \"total\": 2,\n  \"results\": [\n    {\n      \"companyName\": \"DEDEMAN SRL\",\n      \"cui\": \"2816464\",\n      \"registrationCode\": \"J1992002621040\",\n      \"legalForm\": \"SRL\",\n      \"county\": \"Bacău\",\n      \"website\": \"www.dedeman.ro\",\n      \"caenActivities\": [ { \"code\": \"0125\", \"activity\": \"…\" } ],\n      \"directors\": [ \"PAVĂL I. DRAGOŞ\", \"PAVĂL ADRIAN\" ],\n      \"status\": [ { \"code\": \"1048\", \"name\": \"funcțiune\" } ]\n    }\n  ]\n}\n```\n\n## Where the data comes from\n\nThe registry is built from the official ONRC snapshot published on\n[data.gov.ro](https://data.gov.ro) — no scraping, no third-party vendor. The\nloaders stream the CKAN CSVs into SQLite and build an **FTS5** full-text index\nwith diacritic-insensitive folding, so `popescu` matches `Popéscu` and `PAVĂL`\nmatches `paval`.\n\n## Repository layout\n\n| File | Purpose |\n|---|---|\n| `api.py` | FastAPI wrapper — the read-only public REST surface (+ landing page). |\n| `server.py` | MCP server (Streamable HTTP) with all five tools. |\n| `monetization.py` | Telemetry + a dormant freemium/rate-limit scaffold. |\n| `load_onrc.py` | Download + load the ONRC CSV snapshot into SQLite. |\n| `load_nomenclatoare.py` | Decode CAEN / status code tables. |\n| `load_financiare.py` | Load the 2025 financial statements. |\n| `server.json` | MCP Registry metadata (published as `io.github.darksider4all/leadgen-mcp`). |\n| `smithery.yaml` | Smithery deployment config. |\n\n## Run locally\n\n```bash\npython -m venv venv\nvenv/bin/pip install -r requirements.txt\n\n# load the data (downloads the official snapshots — several GB)\nvenv/bin/python load_onrc.py --data-dir ./data --db ./data/onrc.db\n\n# start the REST API\nONRC_DB=./data/onrc.db venv/bin/python api.py\n\n# start the MCP server\nONRC_DB=./data/onrc.db venv/bin/python server.py --transport streamable-http --port 8766\n```\n\nThen hit `http://127.0.0.1:8767/docs`.\n\n## Notes on the data\n\n- **Diacritic-insensitive search** — Romanian `ă â î ș ț` are folded to their\n  ASCII forms on both the index and the query.\n- **CUI vs registration code** — a numeric `query` is matched against the CUI\n  (tax code) first, then the registration code.\n- **Read-only** — the public surface only exposes lookups; there are no write\n  paths.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 3873,
  "sha": "6c641148b8c61c3f829e147ca489dd34fd2e658a67da7c5f54b28698dfe8d650",
  "repo_slug": "darksider4all/leadgen-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_darksider4all_leadgen_mcp_2f34f808/readme"
}