Mr.Faun
<div align="center">
# Mr.Faun — MCP server
**Kto naprawdę stoi za spółką. / Who really stands behind the company.**
[](https://modelcontextprotocol.io)
[](#narzędzia)
[](LICENSE)
[](package.json)
</div>
---
## Co to jest
Mr.Faun to warstwa inteligencji o własności i powiązaniach spółek dla agentów AI. Serwer MCP zamienia publiczne rejestry w **narzędzia, które agent wywołuje w rozmowie**: wyszukiwanie podmiotów, śledzenie łańcuchów własności do beneficjenta rzeczywistego, screening sankcyjny, wykrywanie offshore i w pełni cytowane dossier.
Każda teza ma źródło. Każda krawędź grafu wskazuje wpis w rejestrze. Brak danych = brak pola, nigdy zmyślona wartość.
> 🇵🇱 Pierwszy rynek: **Polska** — KRS, biała lista VAT, CRBR, sprawozdania finansowe.
> Kolejne kraje na subdomenach (`pl.mrfaun.com`, `de.mrfaun.com`, …), każde z zamkniętym inwentarzem źródeł i adapterem z testem.
**Status:** pre-launch. Serwer jest kompletny (24 narzędzia, testy, Docker, CI); publiczne API Mr.Faun wchodzi pod `mrfaun.com`.
## Szybki start
```bash
npx -y @mrfaun/mcp-server
```
Serwer startuje po stdio i udostępnia narzędzia każdemu klientowi MCP: Claude Desktop, Cursor, Cline, Windsurf, własny runtime.
### Claude Desktop / Cursor
```json
{
"mcpServers": {
"mrfaun": {
"command": "npx",
"args": ["-y", "@mrfaun/mcp-server"],
"env": { "MRFAUN_API_KEY": "mf_..." }
}
}
}
```
`env` jest opcjonalny — bez klucza działasz na anonimowym free tierze. Klucz `mf_...`: `mrfaun.com → Konto → Klucze API`.
### Claude Code CLI
```bash
claude mcp add mrfaun -- npx -y @mrfaun/mcp-server
```
### Zdalnie (bez instalacji)
```json
{ "mcpServers": { "mrfaun": { "url": "https://mrfaun.com/api/mcp" } } }
```
## Narzędzia
24 narzędzia w sześciu grupach. Pełne opisy: [docs/TOOLS.md](docs/TOOLS.md).
| Grupa | Narzędzia |
|---|---|
| 🔍 **Szukanie** | `search_entities`, `semantic_search`, `find_similar`, `search_companies`, `lookup_by_identifier`, `resolve` |
| 📋 **Podmiot** | `get_entity`, `get_dossier`, `get_company_details`, `get_financials`, `lookup_company` |
| 🕸️ **Graf** | `trace_ownership_path`, `graph_neighbourhood`, `graph_path`, `check_offshore_exposure` |
| 🛡️ **Ryzyko** | `get_sanctions`, `list_jurisdictions`, `list_asset_coverage` |
| 📊 **Rynek** | `get_pulse`, `get_pricing` |
| 💳 **Płatności agentowe** | `buy_dossier`, `get_payment_link`, `claim_dossier`, `purchase_dossier` |
Wszystkie narzędzia są read-only poza `buy_dossier` / `purchase_dossier` (pieniądze ruszają się tylko po potwierdzeniu płatności) i `claim_dossier` (realizuje już opłaconą sesję). Identyfikatory płyną między narzędziami: `search_entities` → `get_dossier` → `trace_ownership_path` → `get_sanctions`.
### Przykład
> **Ty:** „Kto ostatecznie stoi za tą spółką? Sprawdź sankcje na całym łańcuchu."
>
> **Agent:** `search_entities({ query })` → `trace_ownership_path({ id })` → `get_sanctions({ id })` dla każdego kroku → łańcuch własności z cytowaniami i screeningiem na każdym poziomie.
## API REST
Ten sam zbiór danych jako REST: `https://mrfaun.com/api/v1/*`
Kontrakt: [docs/API.md](docs/API.md)
## Jak to działa
```
rejestry publiczne → ingest per kraj → wspólny model → API / MCP
(KRS, VAT, CRBR, (adapter + test (entities, (24 tools)
MSiG, REGON, 200 + próbka) links,
sankcje) documents)
```
Zasada wielokrajowości: **żaden kraj nie wchodzi bez zamkniętego inwentarza źródeł** (tabela źródło/URL/format/dostęp/licencja) i adaptera z testem HTTP 200 na próbce.
## Konfiguracja
| Zmienna | Domyślnie | Cel |
|---|---|---|
| `MRFAUN_API_KEY` | _(brak)_ | Klucz `mf_...` — autoryzacja jako Twój plan, podnosi limity |
| `MRFAUN_API_BASE` | `https://mrfaun.com` | Origin API (SSRF-guard: tylko hosty mrfaun.com, HTTPS) |
| `MRFAUN_TIMEOUT_MS` | `30000` | Timeout żądania |
## Rozwój
```bash
npm install
npm test # testy jednostkowe lib + manifestów
npm run smoke # smoke test serwera (tools/list)
node index.js # start (stdio)
```
Zależności: Node ≥ 18, `@modelcontextprotocol/sdk`. Zero sekretów w repo — klucz tylko przez `env`.
## Bezpieczeństwo
- `lib.js` trzyma allowlistę hostów (tylko HTTPS + mrfaun.com), odrzuca localhost, RFC1918 i metadata endpoint.
- Serwer działa lokalnie (stdio) i nie czyta plików, historii rozmów ani środowiska poza `MRFAUN_API_KEY` / `MRFAUN_API_BASE`.
## Licencja
MIT — patrz [LICENSE](LICENSE).
---
**Mr.Faun** · corporate intelligence, resolved & cited · [mrfaun.com](https://mrfaun.com)
TDQS
Scored across 24 tools
The set has three overlapping clusters — search (semantic_search/find_similar/search_entities/resolve), purchasing (buy_dossier/get_payment_link/purchase_dossier) and graph walks (trace_ownership_path/graph_neighbourhood/graph_path/check_offshore_exposure) — but each tool's description explicitly states when to prefer a sibling ('use this INSTEAD of buy_dossier', 'always pair with search_entities'), which resolves most ambiguity. Boundaries are inferable, though an agent skimming only names could easily pick the wrong purchase or graph tool.
Mostly snake_case verb_noun, but the verb vocabulary is inconsistent for closely related operations: buy_ vs purchase_ for two very different checkout paths, lookup_company vs lookup_by_identifier vs get_entity, and search_companies (UK registry) vs search_entities (whole corpus) whose nouns imply a scope distinction invisible in the names. 'resolve' and 'graph_path'/'graph_neighbourhood' break the pattern further.
At 24 tools this sits in the heavy band; the domain is genuinely broad (search, graph, sanctions, UK filings, financials, pricing, purchasing), so few tools look gratuitous. Still, four graph-walk tools and four search tools could plausibly be consolidated, and the extra weight raises selection cost for an agent.
Coverage across discovery, resolution, dossiers, ownership traversal, sanctions screening, UK statutory detail, financials, activity feed, coverage maps and both payment paths is strong with no obvious dead ends. Minor gaps: no watchlist/alert creation despite get_pulse framing itself as monitoring, no name-based sanctions screening (only per-entity), and no asset-level lookup despite list_asset_coverage.