kyb-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@kyb-mcp Find the company Qonto, open a dossier for it and run the KYB review prompt."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
kyb-mcp
A KYB (Know Your Business) workbench exposed over the Model Context Protocol. It searches the French company registry (SIRENE / RNE through the free recherche-entreprises.api.gouv.fr API), keeps review dossiers in PostgreSQL, and exposes all of it to Claude Code, claude.ai or any MCP client.
Built on the MCP Python SDK v2 (protocol revision 2026-07-28) as a learning project that uses every protocol primitive on purpose: tools, resources, prompts, completions, elicitation, sampling, progress, change notifications, stdio and Streamable HTTP.
┌────────────┐ stdio / Streamable HTTP ┌──────────────────────────┐ https ┌────────────────────────┐
│ MCP client │ ◄───────────────────────► │ kyb-mcp (MCPServer) │ ────────► │ recherche-entreprises │
│ Claude Code│ tools · resources · │ tools/ resources.py │ 5 req/s │ .api.gouv.fr (public) │
│ claude.ai │ prompts · completions │ prompts.py core.py │ └────────────────────────┘
│ Inspector │ elicit · sample · │ db/repo.py (port) │ SQL ┌────────────────────────┐
└────────────┘ progress · notify │ ├ InMemoryDossierRepo │ ────────► │ PostgreSQL │
│ └ PostgresDossierRepo │ │ (Compose local / Neon) │
└──────────────────────────┘ └────────────────────────┘Quick start
uv sync
uv run kyb-mcp # stdio server, in-memory dossiers, no config needed
uv run mcp dev src/kyb_mcp/server.py # same server inside the MCP Inspector (needs Node)Register it in Claude Code (stdio):
claude mcp add kyb -- uv run --directory /absolute/path/to/kyb-mcp kyb-mcpThen try: "Find the company Qonto, open a dossier for it and run the KYB review prompt."
Related MCP server: mcp-insee-entreprises
What the server exposes
Primitive | Name | What it teaches |
Tool |
| Typed inputs ( |
Tool |
| Lifespan-held store, |
Tool |
| Elicitation through a |
Tool |
| Sampling: |
Tool |
|
|
Resource |
| URI templates, |
Prompt |
| Multi-message prompts with an |
Completion |
| Server-side autocomplete fed by recently seen companies |
All tool calls to the registry go through one httpx.AsyncClient with a token bucket (5 req/s, the public
limit is 7) and a 60 s cache. Directors' birth dates are dropped before anything leaves the process.
Configuration
Variable | Default | Purpose |
| unset → in-memory | PostgreSQL DSN for durable dossiers |
| localhost only | Host allowlist for HTTP behind a real hostname (comma-separated) |
| none | Browser origins (CORS twin) |
| per-process random | Shared key for multi-instance HTTP (elicitation / sampling retries) |
| 5 | Upstream rate limit |
| unset | Disable DNS-rebinding checks when the proxy owns |
Streamable HTTP, Docker, Compose
uv run uvicorn kyb_mcp.http:app --port 8000 # http://127.0.0.1:8000/mcp (+ /healthz)
claude mcp add --transport http kyb-http http://127.0.0.1:8000/mcp
docker compose up -d --build # PostgreSQL 16 (host port 5433) + server on :8000Tagged releases publish ghcr.io/igitscor/kyb-mcp with an SBOM and provenance attestation
(.github/workflows/image.yml).
Deploy (Vercel Hobby + Neon, no credit card)
npm i -g vercel@latest && vercel loginwith your personal account, thenvercel link.Create a free Neon project and add its DSN:
vercel env add DATABASE_URL production.vercel env add KYB_REQUEST_STATE_KEY productionwithpython -c "import secrets; print(secrets.token_hex(32))".vercel deploy --prod. The entrypoint iskyb_mcp.http:app(see[tool.vercel]inpyproject.toml).Point Claude Code at
https://<project>.vercel.app/mcp, or add it as a claude.ai custom connector.
Why this host and database: ADR 0004.
Development
uv run pytest # 23 offline tests (respx mocks the registry)
docker compose up -d db && KYB_TEST_DATABASE_URL=postgresql://kyb:kyb@localhost:5433/kyb uv run pytest tests/test_repo_postgres.py
uv run ruff check && uv run ruff format --check && uv run pyrightCI runs the same on every push with a PostgreSQL service container, then builds the Docker image and
smoke-tests /healthz and server/discover.
Design notes
ADR 0001: why SDK v2 / protocol 2026-07-28, and what changed from FastMCP.
ADR 0002: PostgreSQL behind a repository port, in-memory adapter for zero-setup runs.
ADR 0003: stateless HTTP, DNS-rebinding protection, shared request-state key.
ADR 0004: hosting comparison and the no-card constraint.
SECURITY.md: data handling, transport exposure, what is not protected yet.
Learning path (how this repo was built)
Stage | Files | Concepts |
1 |
| stdio, |
2 |
| URI templates, MIME types, embedded resources, completions |
3 |
| lifespan, typed |
4 |
| elicitation and sampling via |
5 |
| in-memory |
6 |
| Streamable HTTP, transport security, containers |
7 |
| serverless deployment, Neon |
Next steps
OAuth 2.1 resource server (
AuthSettings+TokenVerifier) before exposing write tools publicly.OpenTelemetry exporter: the SDK already emits a span per request; add
opentelemetry-sdkand an OTLP endpoint.Publish to the official MCP Registry with
mcp-publisher.
License
MIT. Registry data is public data from INSEE / INPI under the Licence Ouverte 2.0.
Available Tools
11 toolsadd_noteAdd a noteA
Append a note to a dossier.
Inputs: body (required), dossier_id (required). Returns: A company under KYB review, with its running notes.
archive_dossierArchive dossierADestructiveIdempotent
Archive a dossier after the user confirms in their client.
Inputs: dossier_id (required). Returns: result
bulk_checkBulk check SIRENsARead-only
Look up many SIRENs at once, reporting progress. Respects the registry rate limit (~5/s).
Inputs: sirens (required). Returns: found, failed, missing
create_dossierOpen a dossierB
Open a KYB dossier for a company. Verifies the SIREN exists in the registry first.
Inputs: siren (required), note. Returns: A company under KYB review, with its running notes.
draft_risk_summaryDraft risk summaryA
Ask the client's own model for a first-draft risk summary and store it as an AI note.
Requires a client that supports sampling. The draft is a starting point for the analyst, never a decision.
Inputs: dossier_id (required). Returns: A company under KYB review, with its running notes.
find_by_personFind companies by personARead-onlyIdempotent
Companies where a person is listed as a director or elected official (dirigeant / élu).
Registry matching is by name only; a common name returns homonyms. Treat hits as leads to confirm, never as proof of identity.
Inputs: last_name (required), page, first_names, only_active. Returns: A page of search hits.
get_companyGet companyARead-onlyIdempotent
Full registry record for one company: identity, head office, directors, latest financials.
Inputs: siren (required). Returns: Full company record used for a KYB review.
get_dossierGet dossierARead-only
One dossier with all its notes.
Inputs: dossier_id (required). Returns: A company under KYB review, with its running notes.
list_dossiersList dossiersARead-only
Dossiers most recently updated first.
Inputs: status. Returns: result
search_companiesSearch companiesARead-onlyIdempotent
Search French companies, associations and public bodies in the official registry (SIRENE/RNE).
Returns a page of summaries with SIREN, status, activity, head office and headcount band.
Use `get_company` on a SIREN for directors and financials.
Inputs: query (required), page, naf_code, per_page, +3 more. Returns: A page of search hits.
set_statusSet dossier statusBIdempotent
Move a dossier through the review workflow.
Inputs: status (required), dossier_id (required), reason. Returns: A company under KYB review, with its running notes.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct resource or action: registry lookup (search, get, find, bulk) is clearly separated from dossier workflow (create, list, get, note, status, archive, draft). No two tools overlap meaningfully, and the descriptions reinforce the boundaries.
Names are uniformly snake_case and mostly follow a verb_noun pattern (get_company, create_dossier, list_dossiers, archive_dossier). Minor deviations like find_by_person and bulk_check are still predictable and do not harm usability.
11 tools is well-scoped for a KYB server: registry research and dossier management each get enough coverage without redundancy. Every tool serves a clear step in the workflow.
The toolset covers the core KYB lifecycle: company research, dossier creation, note-taking, status progression, and archival. Minor gaps such as no delete/unarchive or document attachment are workable for the apparent domain.
Maintenance
Related MCP Connectors
AML Onboard case workflows for UK limited companies, as a remote MCP server.
Keyless French company checks (Sirene, BODACC, VIES, sanctions), DPE compliance, product recalls
KYC automation from authoritative public sources. Requires an Encompass licence.
Verify French and UK companies, EU VAT and IBANs; screen OFAC, UN, EU and UK sanctions lists.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Datagouv APIs, primarily allowing users to search for up-to-date information about companies registered in France.11-
- FlicenseNot gradedqualityDmaintenanceMCP server to query the INSEE SIRENE API and search for French companies, supporting searches by SIREN, SIRET, and advanced filters like name, location, and activity.1-
- AlicenseAqualityDmaintenanceFrench compliance and KYC MCP server offering VAT validation (VIES), BODACC legal announcements, and company risk scoring using open data.4MIT
- AlicenseAqualityCmaintenanceEnables MCP clients to look up French companies in official open data, retrieving identity, status, legal form, address, VAT number and latest published accounts from the API Recherche d'entreprises. Also surfaces BODACC legal announcements such as insolvency proceedings, deregistrations, accounts filings and modifications, with no API key and read-only access.3MIT