nowe-firmy-mcp
README.md
# nowe-firmy-mcp
**English** · [Polski](README.pl.md)
**MCP server for the Polish business registry (CEIDG).** Query **5.81 million** sole
proprietorships — including companies registered today and businesses that have **not started
operating yet** — from Claude, Cursor, or any MCP client.
- Refreshed daily at **07:00 Europe/Warsaw**
- Search by name, NIP, city, **PKD** code, industry, voivodeship and CEIDG status
- Filter by contact availability (phone / e-mail / website)
- Company dossier by NIP or REGON, with full PKD description
- Mini-CRM: save leads to lists, set pipeline stage and notes (paid plans)
```
Endpoint https://nowe-firmy.pl/api/mcp
Transport stateless Streamable HTTP, JSON-RPC 2.0
Auth Authorization: Bearer <key> or x-api-key: <key>
```
---
## What is CEIDG?
**CEIDG** (Central Register and Information on Economic Activity) is Poland's official registry of
**sole proprietorships** — `JDG`, one-person businesses. It is *not* the company register: limited
companies, partnerships and joint-stock companies live in **KRS**. If you sell to small Polish
businesses, CEIDG is the register that matters, and it publishes entries **on the day of
registration**, often with a start date days or weeks in the future.
The official CEIDG data warehouse ([API documentation](https://akademia.biznes.gov.pl/portal/004856), v3) is free and returns a
single record at a time. This server is a daily-refreshed mirror of the whole registry (5.81M
entries as of 2026-12-03) exposed as **MCP tools** for AI agents, plus filters the official API
does not offer.
## Why this server
| Need | What you get here |
|---|---|
| "Who registered this week in my industry?" | `datePreset: "last7"` + PKD / industry / voivodeship filters |
| "Who is about to open?" | `datePreset: "upcoming"` — businesses with a **future start date** |
| "Only companies I can actually call" | `hasPhone` / `hasEmail` / `hasWebsite` filters |
| "Give my agent this data, not a CSV" | 10 MCP tools, resources and prompts; works with Claude, Cursor, n8n |
| "Keep the leads I pick" | Mini-CRM lists, pipeline stages, notes (paid plans) |
| "Freshness" | Full refresh daily at **07:00 Europe/Warsaw** |
---
## Sponsors
Open-source work on this server is funded by our products:
<p align="center">
<a href="https://bazafirm.online/?utm_source=github&utm_medium=repo&utm_campaign=nowe-firmy-mcp"><img src="assets/sponsors/bazafirm-online.png" alt="BazaFirm.online — Polish B2B company database" height="56"></a>
<a href="https://fabrykaleadow.pl/?utm_source=github&utm_medium=repo&utm_campaign=nowe-firmy-mcp"><img src="assets/sponsors/fabryka-leadow.png" alt="Fabryka Leadów — ready-to-export Polish B2B databases" height="56"></a>
<a href="https://prospekting.pl/?utm_source=github&utm_medium=repo&utm_campaign=nowe-firmy-mcp"><img src="assets/sponsors/prospekting.png" alt="Prospekting.pl — CEIDG prospecting feed for Google Sheets" height="56"></a>
</p>
---
## 60-second smoke test
Get a key in the panel (**API & MCP**) and call the server with `curl`:
```bash
export NF_KEY="nf_live_your_key"
curl -sS https://nowe-firmy.pl/api/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $NF_KEY" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```
A free key returns five tools (`firms:read`). A paid key returns ten, including Mini-CRM.
Search for companies registered in the last 7 days, in IT, with a phone number:
```bash
curl -sS https://nowe-firmy.pl/api/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $NF_KEY" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
"name":"search_new_companies",
"arguments":{"pkdSections":["62"],"datePreset":"last7","hasPhone":true,"limit":5}}}'
```
The result is in `result.structuredContent.companies[]`, with `count` and `hasMore`
(plus `nextCursor` for the next page).
---
## Connect a client
### Claude Desktop
`~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
```json
{
"mcpServers": {
"nowe-firmy": {
"type": "http",
"url": "https://nowe-firmy.pl/api/mcp",
"headers": { "Authorization": "Bearer nf_live_your_key" }
}
}
}
```
Restart Claude Desktop. The tool menu should list the company tools
(`search_new_companies`, `get_company_dossier`, `resolve_industry_pkd`, `get_market_facets`).
### Cursor
`.cursor/mcp.json` in your project:
```json
{
"mcpServers": {
"nowe-firmy": {
"url": "https://nowe-firmy.pl/api/mcp",
"headers": { "Authorization": "Bearer nf_live_your_key" }
}
}
}
```
### n8n (no MCP client needed)
Use an **HTTP Request** node — the server is plain JSON-RPC:
```
POST https://nowe-firmy.pl/api/mcp
Content-Type: application/json
Authorization: Bearer <key>
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{
"name":"search_new_companies",
"arguments":{"pkdSections":["62"],"hasEmail":true,"limit":5}}}
```
Importable example: [`examples/n8n/workflow.json`](examples/n8n/workflow.json).
More clients (Python, TypeScript) live in [`examples/`](examples/).
---
## Example prompts
Paste these into Claude, Cursor or any MCP client after connecting the server:
- "Find IT companies (`PKD 62`) that started operating in Mazowieckie in the last 7 days and declared a phone number."
- "Show businesses in my industry that are registered but have **not started operating yet** (next 30 days)."
- "Open the dossier for NIP `<nip>` and summarise the PKD profile."
- "Save the 10 best matches to a Mini-CRM list called `Q1 outbound` and set their stage to `TO_CONTACT`."
- "Which voivodeships have the most new registrations in my PKD this month?"
---
## Tools
| Tool | Scope | What it does |
|---|---|---|
| `search_new_companies` | `firms:read` | Search visible companies: phrase, PKD, industry, voivodeship, status, date preset, contact availability, cursor pagination |
| `get_company_dossier` | `firms:read` | Full dossier by `companyId`, NIP or REGON, with PKD details and CRM state |
| `resolve_industry_pkd` | `firms:read` | Turn "accounting office" or "programista" into PKD codes and industry slugs |
| `get_market_facets` | `firms:read` | Database statistics: total count, 16 voivodeships, CEIDG statuses, PKD sections |
| `get_account_quota` | `firms:read` | Your plan, daily quota, remaining calls and key scopes |
| `list_crm_lists` | `crm:read` | Mini-CRM lists, plan limits and saved views |
| `get_crm_list_companies` | `crm:read` | Companies on a list with their CRM stage, row colour and note |
| `save_companies_to_crm_list` | `crm:write` | Add up to 50 companies (by IDs or NIPs) to a list, or create a list |
| `update_company_crm_lead` | `crm:write` | Set pipeline stage, row colour and a note (max 500 chars) |
| `remove_companies_from_crm_list` | `crm:write` | Remove up to 50 companies from a list |
Full argument reference: [`docs/tools.md`](docs/tools.md).
**MCP resources:** `nowefirmy://taxonomy/filters` (voivodeships, PKD, industries, statuses),
`nowefirmy://account/quota` (plan and limits).
**Prompts:** `daily_b2b_prospecting`, `prepare_cold_outreach`, `regional_market_snapshot`.
---
## Limits
| Plan | Tool calls / day | Rows per response | Mini-CRM | Key scopes |
|---|---|---|---|---|
| Free | 50 | 5 | — | `firms:read` |
| Monthly | 500 | 50 | yes | `firms:read`, `crm:read`, `crm:write` |
| Yearly / Lifetime | 1 500 | 50 | yes | `firms:read`, `crm:read`, `crm:write` |
- Burst limit: **25 tool calls per minute** (and 60 requests per minute overall, tools included).
- Headers on every call: `X-RateLimit-Limit`, `X-RateLimit-Remaining`,
`X-Quota-Daily-Limit`, `X-Quota-Daily-Remaining`.
- Exceeding the daily quota returns JSON-RPC error `-32029`.
- A tool error (`isError: true`) **refunds** the daily unit — you do not pay for validation errors.
- API keys: 1 on Free, 5 on paid plans.
Details: [`docs/limits-and-plans.md`](docs/limits-and-plans.md).
---
## Data: what it is and what it is not
- **5 811 942** visible CEIDG entries (measured 2026-12-03), refreshed daily at 07:00.
- **200–500** new registrations on a typical business day (weekends are lower).
- The server returns only entries marked as visible under our RODO procedure.
- **Contact details are declared by the entrepreneur in CEIDG. We do not verify them.**
Roughly **21%** of entries declare a phone or e-mail — filters let you ask only for those.
- The Free plan is for **evaluation**: 5 records per call, not production lead workflows.
Paid plans return up to 50 rows per call and the Mini-CRM tools.
- Field-level access is enforced server-side and differs between plans.
- **`datePreset: "upcoming"`** returns businesses with a future start date — registered, not yet
operating. This is the field most lead databases do not expose.
Data model, statuses and RODO notes: [`docs/data-model.md`](docs/data-model.md).
---
## FAQ
**Is there an official CEIDG API?**
Yes — `dane.biznes.gov.pl` (v3), free, maintained by the state. It returns records by NIP/REGON and
limited search. This server adds a daily-refreshed full mirror, PKD/industry/location filters,
"upcoming" businesses and MCP transport.
**Do I need an API key?**
Yes. Create a free key in the panel (**API & MCP**): 50 tool calls per day, 5 records per response.
**Does it work with Claude Desktop and Cursor?**
Yes — copy-paste configuration is in this README, and there are Python, TypeScript and n8n examples
in [`examples/`](examples/).
**Can I find companies that have not started operating yet?**
Yes, within a 30-day window: `datePreset: "upcoming"` returns businesses whose start date is
between today and today + 30 days — registered, not yet open. The window is capped to skip corrupt
CEIDG dates (typos like 2923 or 2040).
**Are phone numbers and e-mails verified?**
No. They are declared by the entrepreneur in CEIDG. Roughly 21% of entries declare a phone or
e-mail; filters let you search only those. Treat contact data as unverified until you reach the
person.
**Is this KRS or CEIDG?**
CEIDG only — sole proprietorships. Companies registered in KRS (sp. z o.o., S.A., partnerships)
are out of scope for this server.
**What are the limits?**
25 tool calls per minute (60 requests/min overall), plus a daily quota: 50 (Free), 500 (Monthly), 1 500 (Yearly/Lifetime).
Exceeding the daily quota returns JSON-RPC `-32029`; validation errors are refunded.
**Can I use the data commercially?**
The data describes real businesses, many of them natural persons. Use it with a lawful basis,
do not resell or bulk-copy the registry, and honour opt-outs. See
[data model & RODO](docs/data-model.md).
---
## Errors
| Symptom | Cause | Fix |
|---|---|---|
| `401` | Missing, invalid or expired key | Create a key in **Panel → API & MCP** |
| `403` | Organization blocked or disallowed `Origin` | Check the organization status; browser clients must call from `nowe-firmy.pl` |
| Empty `tools/list` | Key has no valid scopes (old keys) | Create a new key — new keys get `firms:read` by default |
| `-32029` | Daily quota exhausted | Wait until the next day (Europe/Warsaw) or upgrade |
| `429` / `-32029` | Tool burst (25/min) or daily quota exhausted | Back off; check `X-Quota-Daily-Remaining` |
| `-32002` (HTTP 200) | Key lacks the required scope | Use a key with `crm:read` / `crm:write` |
| `-32602` | Invalid arguments | Check `docs/tools.md` — validation errors are refunded |
Full list: [`docs/errors.md`](docs/errors.md).
---
## Documentation
- [Quick start](docs/quickstart.md) — from zero to the first result
- [Tools reference](docs/tools.md) — every argument and output shape
- [Data model](docs/data-model.md) — CEIDG fields, statuses, masking, RODO
- [Limits and plans](docs/limits-and-plans.md) — quotas, headers, keys
- [Errors](docs/errors.md) — JSON-RPC codes and retry rules
## Support
Open an [issue](https://github.com/zordonintelligence/nowe-firmy-mcp/issues) for bugs and
integration questions. Security reports: see [SECURITY.md](SECURITY.md) — please do not open a
public issue for vulnerabilities.
## License
Code and examples: **MIT**. Documentation: **CC BY 4.0**.
Publisher: Zordon Intelligence sp. z o.o. (KRS 0001190915, NIP 7252358503).
---
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues