Skip to main content
Glama
thomas-servais

mcp-recherche-entreprise

Serveur MCP data.gouv.fr

Un serveur MCP (Model Context Protocol) pour accéder aux données de data.gouv.fr, la plateforme française de données ouvertes.

🚀 Fonctionnalités

Ce serveur MCP fournit actuellement l'outil suivant pour interagir avec l'API recherche-entreprises.api.gouv.fr :

Recherche d'entreprises

  • search_companies : Rechercher des entreprises via l'API recherche-entreprises.api.gouv.fr

Related MCP server: INSEE MCP Server

📋 Prérequis

  • Node.js 18+

  • npm ou yarn

🛠️ Installation

  1. Clonez le repository :

git clone <repository-url>
cd mcp-data-gouv-server
  1. Installez les dépendances :

npm install
  1. Copiez le fichier d'exemple d'environnement :

cp env.example .env
  1. Compilez le projet :

npm run build

🚀 Utilisation

Mode développement

npm run dev

Mode production

npm run build
npm start

🔧 Configuration

Le serveur utilise les variables d'environnement suivantes (optionnelles) :

  • API_RATE_LIMIT : Limite de taux pour les requêtes API

  • API_TIMEOUT : Timeout pour les requêtes API en millisecondes

📖 API des outils

search_companies

Rechercher des entreprises via l'API recherche-entreprises.api.gouv.fr.

Paramètres :

  • query (requis) : Recherche libre (nom, SIREN, SIRET, etc.)

  • page (optionnel) : Numéro de page (défaut: 1)

  • page_size (optionnel) : Nombre de résultats par page (défaut: 10)

  • activite_principale (optionnel) : Code NAF/APE

  • code_postal (optionnel) : Code postal (5 chiffres ou liste séparée par des virgules)

  • tranche_effectif_salarie (optionnel) : Tranche d'effectif salarié INSEE

  • est_association (optionnel) : Est une association

  • est_bio (optionnel) : Uniquement les entreprises certifiées bio

  • est_organisme_formation (optionnel) : Uniquement les organismes de formation

  • est_qualiopi (optionnel) : Uniquement les entreprises certifiées Qualiopi

🔗 Intégration avec un client MCP

Pour utiliser ce serveur avec un client MCP, ajoutez la configuration suivante à votre fichier de configuration MCP :

{
  "mcpServers": {
    "data-gouv": {
      "command": "node",
      "args": ["/path/to/mcp-data-gouv-server/dist/server.js"],
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

📝 Exemples d'utilisation

Recherche d'entreprises par nom

search_companies({
  "query": "Apple",
  "page_size": 5
})

Recherche d'entreprises par code postal

search_companies({
  "query": "",
  "code_postal": "75001",
  "page_size": 10
})

Recherche d'entreprises par activité

search_companies({
  "query": "",
  "activite_principale": "62.02A",
  "page_size": 5
})

Recherche d'associations

search_companies({
  "query": "association",
  "est_association": true,
  "page_size": 10
})

🧪 Tests

Le projet inclut des scripts de test pour vérifier le bon fonctionnement :

# Test des APIs
npm run test:apis

# Test de l'intégration avec Cursor
npm run test:cursor

🤝 Contribution

Les contributions sont les bienvenues ! N'hésitez pas à :

  1. Fork le projet

  2. Créer une branche pour votre fonctionnalité

  3. Commiter vos changements

  4. Pousser vers la branche

  5. Ouvrir une Pull Request

📄 Licence

Ce projet est sous licence ISC.

🔗 Liens utiles

Available Tools

1 tool
search_companiesB

Rechercher des entreprises via l'API recherche-entreprises.api.gouv.fr

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesRecherche par nom (optionnel)
est_bioNoUniquement les entreprises ayant un établissement certifié par l'agence bio (optionnel)
code_postalNoCode postal de 5 chiffres (optionnel, 1 ou plusieurs codes postaux, liste séparée par des virgules)
departementNodepartement français sur 2 chiffres (optionnel, 1 ou plusieurs, liste séparée par des virgules)
est_qualiopiNoUniquement les entreprises ayant ayant une certification de la marque « Qualiopi »
est_associationNoEst une association (optionnel)
activite_principaleNoCode NAF/APE (optionnel)
categorie_entrepriseNoCatégorie d'entreprise (optionnel : PME, ETI, GE)
est_organisme_formationNoUniquement les entreprises ayant un établissement organisme de formation
tranche_effectif_salarieNoTranche d'effectif salarié INSEE (optionnel : 00 : 0 salarié, 01 : 1 ou 2 salariés, 02 : 3 à 5 salariés, 03 : 6 à 9 salariés, 11 : 10 à 19 salariés, 12 : 20 à 49 salariés, 21 : 50 à 99 salariés, 22 : 100 à 199 salariés, 31 : 200 à 249 salariés, 32 : 250 à 499 salariés, 41 : 500 à 999 salariés, 42 : 1 000 à 1 999 salariés, 51 : 2 000 à 4 999 salariés, 52 : 5 000 à 9 999 salariés, 53 : 10 000 salariés et plus)

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden of behavioral disclosure. It only identifies the data source and action; it does not mention whether the operation is read-only, whether authentication is needed, rate limits, pagination, or what the response contains. 'Rechercher' implies a read operation, but that is not explicitly disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that states the tool's purpose and data source without filler. It is appropriately front-loaded, though it is minimal enough that it omits behavioral context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 10 parameters, no annotations, and no output schema, this one-sentence description is under-specified. It does not explain response format, pagination behavior, error cases, or any operational constraints. The source API reference is useful, but the description is not complete enough for an agent to invoke this tool with confidence in non-obvious scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 10 parameters, which sets the baseline at 3. The tool description itself adds no parameter-level meaning. There is also an internal schema inconsistency where 'query' is required but described as optional, though this is a schema issue rather than a description issue.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action ('Rechercher des entreprises') and identifies the underlying API (recherche-entreprises.api.gouv.fr), so an agent knows it performs company search. It does not need to distinguish from siblings because no sibling tools are listed, but the phrasing is still somewhat generic beyond the API reference.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies this tool is used when searching for companies via the French recherche-entreprises API, but it gives no explicit context, prerequisites, or exclusions. Because no sibling tools are provided, the lack of alternative-selection guidance is less damaging, but the guidance is still only implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedsearch_companies

TDQS

B3.4/5.0

Scored across 1 tool

Disambiguation5/5

With only a single tool, there is no possibility of confusion or overlap in functionality. The purpose of 'search_companies' is unambiguous.

Naming Consistency5/5

The sole tool name follows a clear verb_noun pattern ('search_companies'), which is consistent and predictable. Even with one tool, the naming style is sound.

Tool Count3/5

A single tool feels thin for a server, but the purpose ('recherche-entreprise') is narrowly scoped to company search. It is borderline acceptable, though additional tools would round out the offering.

Completeness3/5

The tool covers the core search operation, but lacks related functionality such as retrieving a company by SIREN or fetching detailed records. Agents can perform basic lookups but hit dead ends for more specific queries.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    F
    maintenance
    Enables interaction with the French business search API from data.gouv.fr, allowing users to search for French companies by text or geographical criteria and access essential business information.
    2
    11 npm
    19
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables AI agents to search and retrieve detailed profiles of 25 million French companies from the official government registry, including directors, activity codes, and establishment data, without requiring an API key.
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables querying French companies and establishments via SIREN or geographic proximity using the official French business register API.
    1 npm
    MIT