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
- Discovers apps by walking
flux/and finding ownership signals (HelmReleases, Kustomizations, Deployments, Services) - Extracts workloads, services, ingress hosts, and refs per app
- Resolves edges between apps from cross-references
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f32a833b910bae0ef593579405400e2a92892d4b621e6e1ed2848c9e5b190833
|
|
| MD5 |
25509cc0467640d6803250524dbcf19b
|
|
| BLAKE2b-256 |
cfb09dd8eaf12676ac2b24d2c5de8f192438dc18d2957378f730ccac243e4afb
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
325b68fced230256cd52ba192ec18edf52a5b712ef49de2fb731fb0be7203806
|
|
| MD5 |
befb60bb1ae8eb02d0ab1e9376862e48
|
|
| BLAKE2b-256 |
4304ca29ed66bea74d7e56b3181d354fdd6131193a5875384ea6d5a9b21cc062
|