Créer une clé d'API pour l'opérateur

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://tech.covoiturage.beta.gouv.fr/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
"API RPC - Documentation technique MCP server": {
  "url": "https://tech.covoiturage.beta.gouv.fr/mcp"
}
Close
POST /auth/credentials

La clé d'API est composée d'une access_key et d'un secret_key. Ces deux clés sont nécessaires pour s'authentifier auprès de l'API RPC.

Responses

  • 201 application/json

    La clé d'API a été créée

    Hide response attributes Show response attributes object
    • access_key string

      la clé d'accès à l'API RPC

    • secret_key string

      le secret de la clé d'accès à l'API RPC

  • 401 application/json

    Non authentifié. Le token applicatif est manquant ou invalide.

  • 403 application/json

    Non autorisé

POST /auth/credentials
curl \
 --request POST 'https://api.covoiturage.beta.gouv.fr/v3.3/auth/credentials' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (201)
{
  "access_key": "9dc21a6c-bc33-4583-82cb-e96f966d4faf",
  "secret_key": "1a2b3c4d5e6f7g8h9i0j"
}
Response examples (401)
{
  "id": 1,
  "jsonrpc": "2.0",
  "error": {
    "data": "Unauthorized application",
    "code": -32501,
    "message": "Unauthorized Error"
  }
}
Response examples (403)
{
  "id": 1,
  "jsonrpc": "2.0",
  "error": {
    "data": "Invalid permissions",
    "code": -32503,
    "message": "Forbidden Error"
  }
}