Skip to main content

flux-topology

An MCP server that builds a dependency and topology graph of a Kubernetes/FluxCD GitOps repository by static analysis, so AI agents can reason about service relationships without cluster access.

Install

pip install flux-topology

Configure MCP

Add to your opencode.json:

{
  "mcp": {
    "flux-topology": {
      "type": "local",
      "command": ["flux-topology", "mcp"],
      "enabled": true
    }
  }
}

The server reads from flux/ in the working directory. Run opencode from your GitOps repo root.

Tools

Tool Description
fluxtop_map Top-level view: domains, hub apps by edge count, warnings
fluxtop_trace BFS blast radius from any app with typed edges
fluxtop_find_refs Regex search for references across all apps
fluxtop_app_card Full card for one app: workloads, services, edges
fluxtop_check_freshness Check if the topology cache is up to date

CLI

# Build the topology cache (.fluxtop/)
flux-topology build

# Run the MCP server (for AI agents)
flux-topology mcp

How it works

  1. Discovers apps by walking flux/ and finding ownership signals (HelmReleases, Kustomizations, Deployments, Services)
  2. Extracts workloads, services, ingress hosts, and refs per app
  3. Resolves edges between apps from cross-references
  4. Caches everything in .fluxtop/ — rebuilt only when source files change

No cluster access required. Pure static analysis of YAML files.

Development

git clone https://github.com/daveri/flux-topology-mcp.git
cd flux-topology-mcp
pip install -e ".[dev]"
pytest

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flux_topology-0.1.0.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flux_topology-0.1.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file flux_topology-0.1.0.tar.gz.

File metadata

  • Download URL: flux_topology-0.1.0.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.0

File hashes

Hashes for flux_topology-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f32a833b910bae0ef593579405400e2a92892d4b621e6e1ed2848c9e5b190833
MD5 25509cc0467640d6803250524dbcf19b
BLAKE2b-256 cfb09dd8eaf12676ac2b24d2c5de8f192438dc18d2957378f730ccac243e4afb

See more details on using hashes here.

File details

Details for the file flux_topology-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: flux_topology-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.0

File hashes

Hashes for flux_topology-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 325b68fced230256cd52ba192ec18edf52a5b712ef49de2fb731fb0be7203806
MD5 befb60bb1ae8eb02d0ab1e9376862e48
BLAKE2b-256 4304ca29ed66bea74d7e56b3181d354fdd6131193a5875384ea6d5a9b21cc062

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.2

2 files

0.3.1

2 files

0.2.4

2 files

0.2.2

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page