<?php
declare(strict_types=1);
namespace Butschster\ContextGenerator\Lib\HttpClient\Exception;
class HttpException extends \RuntimeException
{
public static function requestFailed(string $url, int $statusCode): self
{
return new self(\sprintf('Failed to request URL "%s". Server returned status code %d', $url, $statusCode));
}
public static function missingRedirectLocation(): self
{
return new self('Received a redirect response but no Location header was found');
}
public static function clientNotAvailable(): self
{
return new self('HTTP client not available. Install psr/http-client implementation (like guzzlehttp/guzzle)');
}
}
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/context-hub/generator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server