Skip to main content
Glama
victor-velazquez-ai

Enterprise MCP Template

health

Check server status, verify configuration, and retrieve version information to monitor system health and ensure operational readiness.

Instructions

Health check for the MCP server. Returns server status, configuration validity, and version information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The 'health' MCP tool is registered with @mcp.tool() and implemented as the 'health' function, which returns diagnostic information about the server status and configuration.
    @mcp.tool()
    def health() -> Dict[str, Any]:
        """
        Health check for the MCP server.
        Returns server status, configuration validity, and version information.
        """
        config = get_config()
        oauth_ready = _auth_provider is not None
        account_preconfigured = bool(config.upstream.build_api_base_url())
    
        return {
            "status": HealthStatus.HEALTHY.value,
            "server": config.server.server_name,
            "version": __version__,
            "timestamp": datetime.now(timezone.utc).isoformat(),
            "oauth_enabled": oauth_ready,
            "api_preconfigured": account_preconfigured,
            "authentication_mode": "oauth" if oauth_ready else ("preconfigured" if account_preconfigured else "not_configured"),
            "ready_for_use": oauth_ready or account_preconfigured,
        }

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/victor-velazquez-ai/enterprise-mcp-template'

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