Metadata-Version: 2.4
Name: permisapi-mcp
Version: 0.1.0
Summary: MCP server pour PermisAPI : permettez a Claude / ChatGPT / Cursor de consulter les permis de construire France en langage naturel.
Project-URL: Homepage, https://permisapi.fr/mcp
Project-URL: Documentation, https://permisapi.fr/mcp
Project-URL: Setup, https://github.com/Evan-Crx/permisapi/blob/master/docs/MCP_SETUP.md
Author-email: Evan Caroux <evan@permisapi.fr>
License: MIT
Keywords: anthropic,chatgpt,claude,construire,france,mcp,permis,real-estate,sitadel
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: French
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: mcp>=1.0.0
Requires-Dist: permisapi-client>=0.6.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=7.4; extra == 'dev'
Description-Content-Type: text/markdown

# permisapi-mcp

Serveur **MCP** (Model Context Protocol, Anthropic) pour [PermisAPI](https://permisapi.fr).

Permet à **Claude Desktop**, **Cursor**, **Windsurf** ou tout client MCP-compatible de consulter les **311 000 permis de construire France** en langage naturel.

## Installation

```bash
pip install permisapi-mcp
```

Vous avez besoin d'une clé API PermisAPI (gratuite pour commencer) :
[https://permisapi.fr/#pricing](https://permisapi.fr/#pricing)

## Configuration Claude Desktop

Éditez `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) ou `%APPDATA%\Claude\claude_desktop_config.json` (Windows) :

```json
{
  "mcpServers": {
    "permisapi": {
      "command": "permisapi-mcp",
      "env": {
        "PERMISAPI_KEY": "pk_live_VOTRE_CLE"
      }
    }
  }
}
```

Redémarrez Claude Desktop. Vous pouvez maintenant demander :

> *« Liste les permis de logement déposés à Bordeaux ce mois avec un score MDB > 70 »*
>
> *« Trouve-moi des opportunités MDB autour de la rue de Passy à Paris »*
>
> *« Quel est le zonage PLU du permis PC07404021K1 ? »*

## Configuration Cursor / Windsurf / autres clients

Voir le guide complet : [https://permisapi.fr/mcp](https://permisapi.fr/mcp)

## Tools disponibles (6)

| Tool | Endpoint | Plan requis |
|---|---|:---:|
| `search_permits` | GET /v1/permits | Free |
| `get_permit_details` | GET /v1/permits/{num_pa} | Free |
| `find_dvf_neighbors` | GET /v1/permits/{num_pa}/dvf | Pro |
| `get_mdb_score` | GET /v1/permits/{num_pa}/score | Pro |
| `get_plu_zoning` | GET /v1/permits/{num_pa}/plu | Pro |
| `get_risks` | GET /v1/permits/{num_pa}/risks | Pro |

## Sécurité

- La clé API reste **côté user** (env var locale, jamais transmise au LLM)
- Le LLM voit uniquement les arguments des tools (pas la clé)
- Validation stricte des inputs (regex sur `num_pa`, ranges Pydantic)
- Pas de side-effects : tous les tools sont **read-only** (GET uniquement)

## Licence

MIT.

## Support

evan@permisapi.fr — réponse 24-72h.
