Skip to main content
Glama
martinchen448

SearXNG MCP Server

health_check

Verify the SearXNG search instance is operational and accessible. Use this tool to diagnose connection issues and ensure the search service is available before performing web searches.

Instructions

Check the health status of the SearXNG instance.

This tool verifies that the SearXNG instance is running and accessible. Useful for diagnostics and ensuring the search service is operational before performing searches.

Use this when you need to:

  • Verify the SearXNG instance is accessible

  • Diagnose connection issues

  • Check service availability before searching

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • Registration of the 'health_check' tool in the list_tools handler, including its schema (empty input) and description.
    Tool( name="health_check", description="""Check the health status of the SearXNG instance. This tool verifies that the SearXNG instance is running and accessible. Useful for diagnostics and ensuring the search service is operational before performing searches. Use this when you need to: - Verify the SearXNG instance is accessible - Diagnose connection issues - Check service availability before searching""", inputSchema={ "type": "object", "properties": {}, }, ),
  • MCP server tool handler for 'health_check': calls client.health_check() and returns the result as JSON-formatted TextContent.
    elif name == "health_check": health = await client.health_check() return [ TextContent( type="text", text=json.dumps(health, indent=2), ) ]
  • Core implementation of health_check in SearXNGClient: performs GET request to /healthz endpoint and returns status dictionary.
    async def health_check(self) -> Dict[str, Any]: """Check the health status of the SearXNG instance. Returns: Dictionary containing health status information Raises: httpx.HTTPError: If the request fails """ url = urljoin(self.base_url, "/healthz") try: response = await self.client.get(url) response.raise_for_status() return {"status": "ok", "message": "SearXNG instance is healthy"} except httpx.HTTPError as e: return { "status": "error", "message": f"Health check failed: {str(e)}", }

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/martinchen448/searxng-mcp-server'

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