Skip to main content

INSEE MCP Server

Serveur MCP (Model Context Protocol) pour accéder aux données de l'INSEE via l'API SIRENE, BDM et les nomenclatures officielles.

⚡ Installation en une ligne

Avec uv (recommandé)

# Installation et lancement direct
API_KEY="your_insee_api_key" uv run --with insee-mcp insee-mcp

Configuration MCP standard

Ajoutez ceci à votre configuration MCP (ex: Claude Desktop) :

{
  "mcpServers": {
    "insee": {
      "command": "uv",
      "args": ["run", "--with", "insee-mcp", "insee-mcp"],
      "env": {
        "API_KEY": "votre_clé_api_insee"
      }
    }
  }
}

Avec pipx

API_KEY="your_insee_api_key" pipx run --spec git+https://github.com/KerryanOPMace/mcp-insee.git insee-mcp

🚀 Installation rapide

Installation directe (recommandée)

# Installation directe depuis GitHub
pip install git+https://github.com/KerryanOPMace/mcp-insee.git

# Configurer votre clé API INSEE
export API_KEY="votre_clé_api_insee"

# Lancer le serveur
insee-mcp

Installation avec pipx (isolée)

# Installation avec pipx (environnement isolé)
pipx install git+https://github.com/KerryanOPMace/mcp-insee.git

# Configurer la clé API
export API_KEY="votre_clé_api_insee"

# Lancer le serveur
insee-mcp

Installation pour développeurs

# Cloner le repository
git clone https://github.com/KerryanOPMace/mcp-insee.git
cd mcp-insee

# Installer en mode développement
pip install -e .

🔑 Configuration

Clé API INSEE

Vous devez obtenir une clé API sur le portail API de l'INSEE et la configurer :

Linux/Mac :

export API_KEY="votre_clé_api_insee"

Windows (PowerShell) :

$env:API_KEY="votre_clé_api_insee"

Windows (CMD) :

set API_KEY=votre_clé_api_insee

🛠️ Outils disponibles

  • search_company : Recherche d'entreprises dans la base SIRENE
    • Par SIREN, SIRET ou nom d'entreprise
    • Recherche approximative disponible

🌐 Accès au serveur

Une fois lancé, le serveur MCP est accessible à :

  • URL : http://127.0.0.1:8000/mcp
  • Transport : Streamable HTTP

🧪 Test du client

from fastmcp import Client
import asyncio

async def test():
    client = Client("http://127.0.0.1:8000/mcp")
    async with client:
        # Lister les outils
        tools = await client.list_tools()
        print(tools)
        
        # Rechercher une entreprise
        result = await client.call_tool("search_company", {
            "siret": "44302124100072"
        })
        print(result)

asyncio.run(test())

📋 Prérequis

  • Python 3.8+
  • Clé API INSEE valide
  • Accès internet pour les requêtes API

📄 Licence

MIT License

Metadata

Release files for insee-mcp 0.1.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for insee-mcp 0.1.12
File Size Uploaded Provenance
insee_mcp-0.1.12.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for insee-mcp 0.1.12
File Interpreter ABI Platform
insee_mcp-0.1.12-py3-none-any.whl Python 3 none any Details

Total release size: 10.0 kB

Release files / insee_mcp-0.1.12.tar.gz

Download URL insee_mcp-0.1.12.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
852ce132dba787f0518ab36595ba3512b56bdaba496efeb06a4fc8745b29757f
BLAKE2b-256 checksum
How to use checksums
51af13d4cf0f15bb7eec89ac92404f00e46d335715e12b229c70718179a9c911
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / insee_mcp-0.1.12-py3-none-any.whl

Download URL insee_mcp-0.1.12-py3-none-any.whl
Size 5.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e0dc7bea3b88c1cea2fa5e428f672be1e0cd467f4eb80d61dbf2ffe06438754
BLAKE2b-256 checksum
How to use checksums
e3321d2efafc00dda1757e34808bd0ee0a1d70c39ee3833c890b7d6b2aaee203
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Security for insee-mcp 0.1.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page