Skip to main content
Glama
urfanazad

BigQuery FinOps MCP Server

by urfanazad

Azure/BQ MCP Optimiser

The Azure/BQ MCP Optimiser is a powerful, extensible MCP server designed to provide FinOps and performance insights for both Google BigQuery and Microsoft Azure SQL Server. It features a modular architecture that allows for easy expansion to other data sources and includes an AI-powered tool to translate natural language questions into SQL queries.

Key Features

  • Dual Data Source Support: Connect to either Google BigQuery or Azure SQL Server by simply changing an environment variable.

  • Live Performance Monitoring: Get real-time insights into your database's performance, including cost analysis for BigQuery and resource usage (CPU, DTU) for Azure SQL.

  • Expensive Query Analysis: Identify the most resource-intensive queries in your database to pinpoint optimization opportunities.

  • AI-Powered Querying: Translate natural language questions into SQL queries using Azure OpenAI.

  • Extensible Architecture: The modular design, built around a BaseDataSource class, makes it easy to add support for other databases in the future.

  • Robust and Production-Ready: With structured logging and comprehensive error handling, the server is built to be reliable and easy to maintain.

Related MCP server: FOCUS MCP Server

Getting Started

1. Prerequisites

  • Python 3.8+

  • An active Google Cloud Platform account (for BigQuery) or Microsoft Azure account (for Azure SQL).

2. Installation

Clone the repository and install the required dependencies:

git clone <your-repo-url>
cd <your-repo-name>
pip install -r requirements.txt

3. Configuration

The application is configured using an .env file. A sample .env file is included in the repository. Rename it from .env.sample to .env and fill in the required values.

a. Choose Your Data Source

First, set the DATA_SOURCE_TYPE variable to either "bigquery" or "azuresql".

DATA_SOURCE_TYPE="bigquery"

b. Configure BigQuery

If you are using BigQuery, you will need to provide the following:

  • GCP_PROJECT_ID: Your Google Cloud project ID.

  • GOOGLE_APPLICATION_CREDENTIALS: The path to your GCP service account key file.

c. Configure Azure SQL

If you are using Azure SQL, you will need to provide the following:

  • AZURE_SQL_SERVER, AZURE_SQL_DATABASE, AZURE_SQL_USERNAME, AZURE_SQL_PASSWORD: Your Azure SQL database connection details.

  • AZURE_SUBSCRIPTION_ID, AZURE_RESOURCE_GROUP: Your Azure subscription and resource group names.

  • AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET: Your Azure service principal credentials.

  • AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT_NAME: Your Azure OpenAI service details.

4. Verify Your Configuration

Before running the server, you can use the verify_env.py script to check that your environment is configured correctly:

python verify_env.py

5. Run the Server

Once your configuration is verified, you can start the MCP server:

python mcp_server.py

Available Tools

The following tools are available through the MCP server:

  • get_cost_summary: Get a summary of your database's performance and cost.

  • get_expensive_queries: Get a list of the most resource-intensive queries.

  • get_project_costs: Get a breakdown of costs by project (for BigQuery) or database size (for Azure SQL).

  • get_cost_trends: Get historical data on cost or resource usage.

  • analyze_query_cost: Get an estimated execution plan for a query.

  • get_cost_by_user: Get a breakdown of database usage by user.

  • natural_language_to_sql: Translate a natural language question into a SQL query (Azure SQL only).

F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    C
    quality
    D
    maintenance
    Enables interaction with Google Cloud services including billing cost analysis, log querying, and metrics monitoring through natural language commands. Provides comprehensive tools for managing GCP resources, analyzing costs, detecting anomalies, and retrieving operational insights.
    Last updated
    40
    1
    Apache 2.0
  • A
    license
    -
    quality
    D
    maintenance
    Enables AI assistants to analyze cloud billing data in FOCUS format through natural language queries. Provides 36+ predefined cost analysis queries, custom SQL execution, and schema documentation for multi-cloud cost optimization and FinOps practices.
    Last updated
    11
    Apache 2.0
  • A
    license
    A
    quality
    A
    maintenance
    Enables analyzing AWS cloud costs through natural language queries, providing cost summaries, anomaly detection, idle resource identification, rightsizing recommendations, and tagging compliance via Claude.
    Last updated
    10
    27
    MIT

View all related MCP servers

Related MCP Connectors

  • Ask AI about your ads — query Meta, TikTok, and Google Ads performance in natural language.

  • Ask your app anything — revenue, errors, read-cost, growth — and get rendered charts back.

  • Verified cloud cost forecasting for AI agents. AWS, GCP, Azure pricing matrix.

View all MCP Connectors

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_AZURE_MCP'

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