ⓘ Sous PowerShell, curl est un alias de Invoke-WebRequest — utiliser la syntaxe ci-dessous.
# Santé du serveur (GET)
Invoke-WebRequest -Uri http://127.0.0.1:5056/health | Select-Object -ExpandProperty Content
# Info MCP (GET)
Invoke-WebRequest -Uri http://127.0.0.1:5056/mcp | Select-Object -ExpandProperty Content
# Liste des services REST (GET)
Invoke-WebRequest -Uri http://127.0.0.1:5056/api/services | Select-Object -ExpandProperty Content
# get_services (POST JSON-RPC)
Invoke-WebRequest -Uri http://127.0.0.1:5056/mcp -Method POST -ContentType "application/json" -Body '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_services","arguments":{}}}' | Select-Object -ExpandProperty Content
# get_pricing (POST JSON-RPC)
Invoke-WebRequest -Uri http://127.0.0.1:5056/mcp -Method POST -ContentType "application/json" -Body '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_pricing","arguments":{}}}' | Select-Object -ExpandProperty Content
# search_services (POST JSON-RPC)
Invoke-WebRequest -Uri http://127.0.0.1:5056/mcp -Method POST -ContentType "application/json" -Body '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"search_services","arguments":{"query":"audit"}}}' | Select-Object -ExpandProperty Content
ⓘ curl.exe (inclus dans Windows 10/11) contourne l'alias PowerShell — guillemets échappés obligatoires.
# Santé du serveur (GET)
curl.exe http://127.0.0.1:5056/health
# Info MCP (GET)
curl.exe http://127.0.0.1:5056/mcp
# Liste des services REST (GET)
curl.exe http://127.0.0.1:5056/api/services
# get_services (POST JSON-RPC)
curl.exe -s -X POST http://127.0.0.1:5056/mcp -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/call\",\"params\":{\"name\":\"get_services\",\"arguments\":{}}}"
# get_pricing (POST JSON-RPC)
curl.exe -s -X POST http://127.0.0.1:5056/mcp -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"get_pricing\",\"arguments\":{}}}"
# search_services (POST JSON-RPC)
curl.exe -s -X POST http://127.0.0.1:5056/mcp -H "Content-Type: application/json" -d "{\"jsonrpc\":\"2.0\",\"id\":3,\"method\":\"tools/call\",\"params\":{\"name\":\"search_services\",\"arguments\":{\"query\":\"audit\"}}}"