Skip to main content
Glama
test_simple_tools.shβ€’1.01 kB
#!/bin/bash # Configuration simple pour tester les tools MCP AUTH_HOST=keycloak.192.168.49.2.nip.io OAUTH_CLIENT_ID=mcpweather-client OAUTH_CLIENT_SECRET=HFLjyBhlfn2WgQZWVBZ5ASItetLL04iW MCP_SERVER_URL=http://localhost:8082 echo "πŸ” Test d'obtention du token..." TOKEN_RESPONSE=$(curl -X POST -k -s \ -d "client_id=${OAUTH_CLIENT_ID}" \ -d "client_secret=${OAUTH_CLIENT_SECRET}" \ -d "grant_type=client_credentials" \ "https://${AUTH_HOST}/realms/master/protocol/openid-connect/token") echo "RΓ©ponse token: $TOKEN_RESPONSE" TOKEN=$(echo "$TOKEN_RESPONSE" | jq -r .access_token 2>/dev/null) if [ "$TOKEN" = "null" ] || [ -z "$TOKEN" ]; then echo "❌ Impossible d'obtenir le token" exit 1 fi echo "βœ… Token obtenu" echo "πŸ“‹ Test de requΓͺte MCP tools/list..." curl -X POST -s \ -H "Authorization: Bearer $TOKEN" \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools/list", "params": {} }' \ "${MCP_SERVER_URL}" | jq '.'

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TJarriault/mcp-weather-sample'

If you have feedback or need assistance with the MCP directory API, please join our Discord server