Référence API & M2M
Intégrez Mekago à votre système via l'API JSON-RPC 2.0.
Démarrage rapide
L'API Mekago utilise le protocole JSON-RPC 2.0 sur HTTP avec authentification OAuth 2.0.
Obtenir vos identifiants
Pour obtenir vos client_id et client_secret, utilisez le tool MCP api-key-create depuis Claude Desktop avec un compte garagiste ou administrateur. Une page web de gestion des clés API arrivera prochainement.
- Connectez-vous à Claude Desktop avec votre compte garagiste ou admin
- Demandez : « Crée une clé API pour mon DMS »
- Copiez le client_secret affiché — il ne sera plus visible après
Authentification
Échangez vos identifiants contre un token d'accès (durée de vie : 900 secondes, pas de refresh token) :
curl -X POST https://www.mekago.fr/mcp/oauth/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "grant_type=client_credentials" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET"
Poignée de main
Toutes les méthodes JSON-RPC exigent le token, initialize compris. Sans header Authorization, le serveur répond 401 avec un header WWW-Authenticate qui pointe vers les métadonnées OAuth :
curl -X POST https://www.mekago.fr/mcp \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "initialize",
"params": {
"protocolVersion": "2025-06-18",
"capabilities": {},
"clientInfo": { "name": "my-dms", "version": "1.0.0" }
},
"id": 1
}'Appeler l'API
Une fois la poignée de main acceptée, utilisez le même token pour appeler les tools :
curl -X POST https://www.mekago.fr/mcp \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "customer-vehicles-list",
"arguments": {}
},
"id": 1
}'