We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dbt-labs/dbt-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
from pathlib import Path
import yaml
def try_read_yaml(file_path: Path) -> dict | None:
try:
suffix = file_path.suffix.lower()
if suffix not in {".yml", ".yaml"}:
return None
alternate_suffix = ".yaml" if suffix == ".yml" else ".yml"
alternate_path = file_path.with_suffix(alternate_suffix)
if file_path.exists():
return yaml.safe_load(file_path.read_text())
if alternate_path.exists():
return yaml.safe_load(alternate_path.read_text())
except Exception:
return None
return None