Skip to main content
Glama
urfanazad

BigQuery FinOps MCP Server

by urfanazad
base.py1.36 kB
from abc import ABC, abstractmethod from typing import Any, Dict, List class BaseDataSource(ABC): """ Abstract base class for a FinOps data source. Defines the common interface for all data sources. """ @abstractmethod async def connect(self) -> None: """Connect to the data source.""" pass @abstractmethod async def get_cost_summary(self) -> Dict[str, Any]: """Get overall cost summary.""" pass @abstractmethod async def get_expensive_queries(self) -> Dict[str, Any]: """Get list of expensive queries.""" pass @abstractmethod async def get_project_costs(self) -> Dict[str, Any]: """Get cost breakdown by project.""" pass @abstractmethod async def get_cost_trends(self) -> Dict[str, Any]: """Get historical cost trends.""" pass @abstractmethod async def analyze_query_cost(self, query: str, dry_run: bool) -> Dict[str, Any]: """Analyze the cost of a query.""" pass @abstractmethod async def get_cost_by_user(self, days: int) -> Dict[str, Any]: """Get cost breakdown by user.""" pass @abstractmethod async def natural_language_to_sql(self, question: str) -> Dict[str, Any]: """Translate a natural language question into a SQL query.""" pass

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/urfanazad/BQ_MCP_OPTIMISER'

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