Logo vun FOCUS MCP Server

FOCUS MCP Server

Organisatioun
glassity

MCP server for FinOps cloud cost analysis using FOCUS billing data. Query AWS, Azure & GCP costs with AI assistants like Claude.

Editeurglassity
Repositoryfocus-mcp
SproochPython
Forks
2
Stären
11
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzApache-2.0
Linken
  • Tools mat KI-Workflows verbannen

    FOCUS MCP Server stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    11 Stären an 2 Forks aus dem verlinkte Repository.

FOCUS MCP Server

Ask your AI assistant what your cloud actually costs. This MCP (Model Context Protocol) server connects Claude, or any other MCP client, to your FOCUS billing data, so questions like these become one-line prompts instead of hand-written SQL:

  • "What are my highest-cost services by region this month?"
  • "Show me commitment discount utilization trends."
  • "Which accounts have unusual spending patterns?"
  • "Explain the difference between BilledCost and EffectiveCost."

Under the hood, DuckDB queries your Parquet exports directly, whether they sit on local disk, S3, or GCS. There is no data warehouse to stand up. The server bundles 254 queries curated from the official FOCUS use-case catalog, as a separate collection per specification version (36 for v1.0, 41 for v1.1, 53 for v1.2, 58 for v1.3, 66 for v1.4), and each query cites the page it came from.

What is FOCUS?

FOCUS (FinOps Open Cost & Usage Specification) is the open standard for cloud billing data. AWS, Microsoft, and Google Cloud export it natively, so one schema and one set of queries work across providers.

Quick start

1. Get FOCUS data

Each provider has an official export path:

The server reads Parquet with Hive partitioning:

/path/to/your/focus/data/
├── billing_period=2025-05/
│   ├── file1.parquet
│   └── file2.parquet
├── billing_period=2025-06/
│   └── ...

2. Run the server

The quickest path needs no container. uvx fetches and runs the published package in one step:

bash
claude mcp add focus -e FOCUS_DATA_LOCATION=/path/to/your/focus/data -- uvx focus-mcp

For Claude Desktop, add this to claude_desktop_config.json:

json
{
  "mcpServers": {
    "focus": {
      "command": "uvx",
      "args": ["focus-mcp"],
      "env": {
        "FOCUS_DATA_LOCATION": "/path/to/your/focus/data",
        "FOCUS_VERSION": "1.0"
      }
    }
  }
}

Reading GCS with Application Default Credentials needs the gcs extra, which uvx installs when you name it:

bash
claude mcp add focus -e FOCUS_DATA_LOCATION=gs://your-bucket/focus \
  -- uvx --from 'focus-mcp[gcs]' focus-mcp

Docker remains available and is the better fit when you want a pinned, attested image:

Images are published to Docker Hub and GitHub Container Registry on every release:

bash
docker pull glassity/focus-mcp:latest          # Docker Hub
docker pull ghcr.io/glassity/focus-mcp:latest  # GHCR

For Claude Code, one command:

bash
claude mcp add focus -- docker run -i --rm \
  -v /path/to/your/focus/data:/data:ro \
  -e FOCUS_DATA_LOCATION=/data \
  glassity/focus-mcp:latest

For Claude Desktop, add this to claude_desktop_config.json:

json
{
  "mcpServers": {
    "focus": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-v", "/path/to/your/focus/data:/data:ro",
        "-e", "FOCUS_DATA_LOCATION=/data",
        "-e", "FOCUS_VERSION=1.0",
        "glassity/focus-mcp:latest"
      ]
    }
  }
}

For S3 or GCS data, drop the volume mount and point FOCUS_DATA_LOCATION at the bucket. See Data locations for the credential options.

3. Ask something

Start your client and try:

Show me what FOCUS data is loaded.

The assistant calls get_data_info and reports row counts, date ranges, and providers. From there, ask in plain language:

Run the service costs by region analysis for the last 3 months.
Show me the top 10 most expensive services across all accounts.
Find unused capacity reservations I can optimize.
Compare costs across providers and regions.
What columns are available in FOCUS v1.4?

Tools

Eight tools, in two groups.

Data and query:

ToolWhat it does
get_data_infoInspect the loaded data: row counts, date ranges, providers
list_use_casesBrowse the predefined analysis queries for your FOCUS version
get_use_caseOne query in detail: SQL, parameters, citation to the spec
execute_queryRun a predefined query or custom SQL against your data

Schema and specification:

ToolWhat it does
list_columnsAll FOCUS columns with type and requirement level
get_column_detailsFull definition of one column
list_attributesFOCUS formatting standards and conventions
get_attribute_detailsFull requirements of one attribute

The schema tools answer from the FOCUS specification itself, so the assistant can explain what a column means as well as query it.

Query library

Every query is extracted from the official FOCUS use-case catalog and carries a citation back to its source page:

  • FOCUS v1.0: 36 queries
  • FOCUS v1.1: 41 queries
  • FOCUS v1.2: 53 queries
  • FOCUS v1.3: 58 queries
  • FOCUS v1.4: 66 queries

Coverage includes cost allocation, commitment discount tracking, anomaly detection, budget reconciliation, and provider comparison. FOCUS_VERSION selects which set is active; match it to what your provider exports. The specification runs ahead of the exports - AWS Data Exports currently delivers FOCUS 1.0 and 1.2 - so the 1.3 and 1.4 collections are ready for the day a provider ships them.

Data locations

Local files

bash
export FOCUS_DATA_LOCATION="/path/to/your/focus/data"

A downloaded copy of an AWS Data Export (aws s3 sync, a mounted volume) is loaded through the manifests it was copied with, exactly as the bucket itself would be — see below.

Amazon S3

bash
export FOCUS_DATA_LOCATION="s3://your-bucket/focus-exports"
export AWS_REGION="us-west-2"        # defaults to us-east-1

Point the location at the export root, the prefix holding both data/ and metadata/. AWS Data Exports list every file of their latest delivery in a per-billing-period manifest under metadata/, and the server loads those files when the manifests are there: superseded chunks and re-delivered periods left behind on the prefix are ignored instead of double-counted. Locations without manifests — a BigQuery export, a directory of Parquet files — are read by globbing every Parquet file underneath them. get_data_info reports which of the two was used, and the file list is refreshed every few minutes so new deliveries need no restart.

Authentication uses the standard AWS credential chain, in order: IAM role (automatic on EC2/ECS/Lambda), AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY environment variables, AWS_PROFILE, then ~/.aws/credentials.

bash
export AWS_PROFILE="billing-reader"   # use a specific profile

Some buckets store keys with a leading slash; if listing fails, try a double slash after the bucket name: s3://your-bucket//focus/path.

When running in Docker, pass credentials as -e variables or mount the profile read-only:

bash
docker run -i --rm \
  -v "$HOME/.aws:/home/mcp/.aws:ro" \
  -e FOCUS_DATA_LOCATION="s3://your-bucket/focus-exports" \
  -e AWS_REGION="us-west-2" \
  -e AWS_PROFILE="billing-reader" \
  glassity/focus-mcp:latest

Google Cloud (GCS + BigQuery FOCUS export)

Google Cloud exports billing natively in FOCUS format: Billing → Billing export → FOCUS usage cost (Preview) writes a FOCUS table to BigQuery. Export it to Parquet in a GCS bucket:

sql
EXPORT DATA OPTIONS (
  uri = 'gs://your-bucket/focus-export/*.parquet',
  format = 'PARQUET',
  overwrite = true
) AS
SELECT * FROM `your-project.your_focus_dataset.your_focus_table`;

Schedule that statement as a BigQuery scheduled query to keep the bucket fresh; this also archives your data past the FOCUS export's 2-year TTL. Then:

bash
export FOCUS_DATA_LOCATION="gs://your-bucket/focus-export"

Authentication is tried in this order:

  1. HMAC keys: set GCS_HMAC_KEY_ID and GCS_HMAC_SECRET (create with gcloud storage hmac create <service-account-email>). This path uses DuckDB's native GCS support over the S3-interoperability API and needs no extra dependencies.
  2. Application Default Credentials: included in the Docker image; from a source checkout, install the extra with uv sync --extra gcs. Then authenticate however you normally do: gcloud auth application-default login, a service-account JSON via GOOGLE_APPLICATION_CREDENTIALS, or workload identity on GCE/GKE.
  3. No credentials: public buckets only.

Two methods exist because DuckDB's built-in GCS support only speaks HMAC; ADC comes from the optional gcsfs dependency. Credentials are only ever read inside the server process and are never exposed to MCP clients.

Configuration

VariableDefaultDescription
FOCUS_DATA_LOCATIONdata/focus-exportWhere the Parquet lives: a local path, s3://…, or gs://…
FOCUS_VERSION1.0FOCUS specification version: 1.0, 1.1, 1.2, 1.3 or 1.4. Selects which query collection loads
AWS_REGIONus-east-1Region for S3 access
AWS_PROFILE(unset)AWS profile for S3 authentication
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY(unset)Static AWS credentials, if not using a role or profile
GCS_HMAC_KEY_ID / GCS_HMAC_SECRET(unset)HMAC credentials for GCS
GOOGLE_APPLICATION_CREDENTIALS(unset)Service-account JSON for GCS via ADC

Development

bash
git clone https://github.com/glassity/focus-mcp.git
cd focus-mcp

uv sync                 # install, including dev tools
uv sync --extra gcs     # + GCS ADC support

export FOCUS_DATA_LOCATION="/path/to/your/focus/data"
uv run focus-mcp

Point a client at the source checkout instead of the Docker image:

json
{
  "mcpServers": {
    "focus": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/focus-mcp", "focus-mcp"],
      "env": {
        "FOCUS_DATA_LOCATION": "/path/to/your/focus/data",
        "FOCUS_VERSION": "1.0"
      }
    }
  }
}

Build and run your own image:

bash
docker build -t focus-mcp:custom .
docker run -i --rm \
  -v "/path/to/your/focus/data:/data:ro" \
  -e FOCUS_DATA_LOCATION=/data \
  focus-mcp:custom

See CONTRIBUTING.md for conventions and checks before opening a pull request.

Roadmap

  • Automated query synchronization from the FOCUS specification, so new use-case pages land here without manual extraction
  • Richer response formatting: citations and educational context inline in query results
  • Validation of every use-case query against real provider exports (AWS ships FOCUS 1.0 and 1.2 today; 1.3+ as providers adopt them)
  • Evaluate moving column and attribute definitions to MCP resources
  • Surface conformance-gap notes from the spec in tool responses

Security

Report vulnerabilities to the address in SECURITY.md, not the issue tracker. Know the trust model: execute_query runs SQL that the AI assistant writes, inside the server process. Your Parquet files are a query source, not a writable database, and every example here mounts them :ro; keep that. Run the Docker image rather than a bare process if you want a hard boundary, and give the server only the object-store credentials it needs, scoped to the billing bucket.

License

Apache-2.0. Copyright Glassity. See LICENSE.


Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "glassity-focus-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "focus-mcp"
      ]
    }
  }
}

FOCUS MCP Server MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal FOCUS MCP Server verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

FOCUS MCP Server als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu FOCUS MCP Server an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "glassity-focus-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "focus-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu FOCUS MCP Server. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu FOCUS MCP Server.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat FOCUS MCP Server?
FOCUS MCP Server
Jo. Ech hunn et gelies.
Dat hunn ech mat FOCUS MCP Server fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server FOCUS MCP Server benotzt?

FOCUS MCP Server ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech FOCUS MCP Server MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir FOCUS MCP Server mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat FOCUS MCP Server MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann FOCUS MCP Server verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech FOCUS MCP Server MCP mat TypingMind?

FOCUS MCP Server leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt FOCUS MCP Server MCP an TypingMind zur Verfügung?

FOCUS MCP Server stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir FOCUS MCP Server MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann FOCUS MCP Server eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇