Skip to main content
Glama
README.md
# f5xc-mcp

> **Fastest install:** paste this repo URL into your AI agent (Claude Code, Cursor, Codex, Hermes...) and say *"install this MCP server"*. It will follow [llms-install.md](llms-install.md).

Unofficial, read-only MCP server for F5 Distributed Cloud (XC) — inspect config objects, query access logs and security events from Claude Code or any MCP client.

> **Disclaimer:** This project is not affiliated with or endorsed by F5, Inc. "F5" is a trademark of F5, Inc.

## Read-Only Design

- **Read-only HTTP methods:** Sends only `GET` requests, plus `POST` requests strictly to the log and event query endpoints (`access_logs` and `app_security/events`). It never creates, modifies, or deletes objects.
- **Redaction & size cap:** Secret-looking fields (tokens, keys, passwords, certificates, blindfolded values) are automatically redacted, and responses are capped at ~50 KB.

## Tools

**Start here (high-level)**

| Tool | What it answers |
| --- | --- |
| `traffic_overview(lb, minutes)` | What's happening on this load balancer? Totals, req/min, top codes, IPs, paths, hosts, countries, ASNs |
| `compare_windows(field, lb, minutes, baseline_minutes_ago)` | What changed vs yesterday (or any baseline)? |
| `lb_summary(name)` | How is this LB protected/routed? WAF, rate limits, policies, bot, IP reputation, cert, VIP |
| `ip_lookup(ip, minutes)` | What is this client doing? LBs hit, codes, paths, security events |
| `audit_logs(minutes, object_filter, user)` | Who changed what, when |
| `alerts()` | Active F5 XC alerts |
| `cert_expiry(namespace="all")` | Which certificates expire soon or are unhealthy |

**Detail / building blocks:** `list_namespaces`, `list_objects`, `get_object`, `access_log_aggregate`, `access_log_search`, `security_events`, `raw_get` (GET-only), and `report_issue` (drafts a bug report you paste to the maintainer; no GitHub account needed).

**MCP prompts** (clients that support them): `investigate_spike`, `review_protection`, `who_changed`.

**No MCP? Use the CLI** — same tools from any shell, script or agent: `f5xc-mcp tools`, `f5xc-mcp call traffic_overview lb=my-lb minutes=15`, `f5xc-mcp doctor`.

## Documentation

| Doc | For |
| --- | --- |
| [docs/tools.md](docs/tools.md) | Every tool: parameters, examples, CLI equivalents |
| [docs/queries.md](docs/queries.md) | Query syntax, valid field names, recipe cookbook |
| [docs/playbooks.md](docs/playbooks.md) | Step-by-step investigations (spike, rate limit, WAF, who changed, IP, certs) |
| [docs/clients.md](docs/clients.md) | Setup for Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Hermes, Claude Desktop, CLI |
| [docs/troubleshooting.md](docs/troubleshooting.md) | TLS/corporate CA, 401/403, empty results, `doctor` |
| [docs/security.md](docs/security.md) | Read-only model, redaction, what data goes where |
| [llms-install.md](llms-install.md) | Install guide that AI agents follow |

## Prerequisites

- [`uv`](https://docs.astral.sh/uv/) installed (`uvx` ships with `uv`).

## Credentials

Always use your **own** personal credential so F5 XC RBAC and audit logs reflect your account:

- **Option A — API Token:** F5 XC Console -> **Administration** (or **Account**) -> **Personal Management** -> **Credentials** -> **Add Credentials** -> select **API Token**, set an expiry, and copy the value.
- **Option B — API Certificate (`.p12`):** From the same **Credentials** page, create an **API Certificate**, set a password, and download the `.p12` file.

### Environment Variables

| Variable | Required | Description |
| --- | --- | --- |
| `F5XC_API_URL` | Yes | Tenant console URL: `https://<tenant>.console.ves.volterra.io` |
| `F5XC_API_TOKEN` | Option A | API token value. Token wins if both token and `.p12` are set. |
| `F5XC_P12_PATH` | Option B | Path to the `.p12` client certificate file. |
| `F5XC_P12_PASSWORD` | Option B | Password for the `.p12` certificate file. |
| `F5XC_NAMESPACE` | No | Optional default namespace when omitted from tool calls. |
| `F5XC_CA_BUNDLE` | No | Extra CA .pem to trust (added to public CAs). For TLS-inspecting networks. |
| `F5XC_TLS_TRUST` | No | `system` (default, OS store) or `certifi` (bundled public CAs only). |
| `F5XC_PRETTY` | No | Set to `1` for indented JSON output (default is compact, fewer tokens). |
| `F5XC_MCP_SUPPORT_CONTACT` | No | Who `report_issue` addresses (default: the maintainer). |

## Install

### Claude Code (auto-updating)

```bash
claude mcp add f5xc --scope user \
  -e F5XC_API_URL=https://<tenant>.console.ves.volterra.io \
  -e F5XC_API_TOKEN=<your-token> \
  -e F5XC_NAMESPACE=<default-namespace> \
  -e UV_SYSTEM_CERTS=1 -e UV_NATIVE_TLS=1 \
  -- uvx --refresh --from https://github.com/Shobitm/f5xc-mcp/archive/refs/heads/main.zip f5xc-mcp
```

### Generic MCP Config (Claude Desktop / Cursor / others)

```json
{
  "mcpServers": {
    "f5xc": {
      "command": "uvx",
      "args": [
        "--refresh",
        "--from",
        "https://github.com/Shobitm/f5xc-mcp/archive/refs/heads/main.zip",
        "f5xc-mcp"
      ],
      "env": {
        "F5XC_API_URL": "https://<tenant>.console.ves.volterra.io",
        "F5XC_API_TOKEN": "<your-token>",
        "F5XC_NAMESPACE": "<default-namespace>",
        "UV_SYSTEM_CERTS": "1",
        "UV_NATIVE_TLS": "1"
      }
    }
  }
}
```

## Updates

`--refresh` makes `uvx` re-check the repository on every start, so you always run the latest `main`.

To pin a specific version instead, point to a tag such as `https://github.com/Shobitm/f5xc-mcp/archive/refs/tags/v0.2.0.zip` and drop `--refresh`.

## Example Prompts

- "List HTTP load balancers in namespace X"
- "Top 20 source IPs hitting load balancer Y in the last 30 minutes"
- "Show 429s by authority over the last hour"
- "Any WAF events in the last 24h, grouped by source IP?"
- "Show the rate limiter config on LB Y"

## Query Tip

The access-log `query` parameter is a label selector, for example:

```text
{vh_name="ves-io-http-loadbalancer-<lb-name>",rsp_code="429"}
```

## Corporate networks (TLS inspection / company CA)

Many company networks re-sign HTTPS with their own root CA. Symptoms: `CERTIFICATE_VERIFY_FAILED`, `self-signed certificate in certificate chain`, or `uvx` failing to download.

**Do not** point `SSL_CERT_FILE` / `REQUESTS_CA_BUNDLE` at a file containing only your company CA. Those variables *replace* the trusted CA list, so GitHub, PyPI and other public sites start failing.

What this server does instead:

- **Download (uvx):** set `UV_SYSTEM_CERTS=1` (newer uv) and `UV_NATIVE_TLS=1` (older uv) so uv uses your OS certificate store, where IT usually installs the company CA. The install commands below already include them. Installing from the GitHub zip means git's own CA settings don't matter.
- **F5 API calls:** the server trusts the OS certificate store by default (via `truststore`), so a company CA installed by IT just works.
- **CA not in the OS store?** Set `F5XC_CA_BUNDLE=/path/to/company-root.pem`. It is **added** to the public CAs, never substituted.
- **Diagnose:** run `f5xc-mcp doctor` (see below). It shows who signed the certificate your network presents, whether TLS verifies, and whether your credential works.

## Doctor

```
F5XC_API_URL=https://<tenant>.console.ves.volterra.io F5XC_API_TOKEN=<token> \
  UV_SYSTEM_CERTS=1 UV_NATIVE_TLS=1 uvx --refresh --from https://github.com/Shobitm/f5xc-mcp/archive/refs/heads/main.zip f5xc-mcp doctor
```

Checks: config, DNS, certificate issuer seen from your network, TLS verification, authentication. Paste its output into `report_issue` or Teams if you're stuck.

## Reporting Bugs

Just tell your assistant "the F5 tool is broken, report it". It calls `report_issue` and shows a ready-to-paste message; send it on Teams (or open a GitHub issue if you prefer). Tokens and secrets are never included.

## Troubleshooting

- **`401`:** Bad or expired API token / certificate.
- **`403`:** Your user lacks the required role in that namespace.
- **Empty results:** Check the `namespace`, selector labels, and `minutes` time window.

## License

[MIT](LICENSE)

TDQS

B3.4/5.0

Scored across 15 tools

Disambiguation4/5

Most tools have distinct purposes: config listing/get, raw read access, log search/aggregate, traffic overview, security events, audit, alerts, and specialized summaries. The access-log analytics tools overlap somewhat (traffic_overview, access_log_aggregate, compare_windows, security_events), but their descriptions and selector patterns make the intended use cases reasonably clear. raw_get overlaps with get_object/list_objects but is explicitly positioned as a read-only escape hatch.

Naming Consistency4/5

All tool names use consistent snake_case, with clear domain abbreviations such as lb and cert. The set is not a strict verb_noun pattern throughout—several tools are descriptive noun phrases like traffic_overview, lb_summary, cert_expiry, and alerts—but the convention remains predictable and readable.

Tool Count5/5

Fifteen tools is at the upper end of the typical 3-15 range but fits the broad F5 XC scope covering config visibility, traffic analytics, security, audit, alerts, and diagnostics. Each tool appears to earn its place, with no trivial duplicates.

Completeness3/5

The read-only diagnostics and observability surface is strong: namespaces, config list/get, logs, security events, audit logs, alerts, certificate expiry, and raw GET access. However, there are no create/update/delete or other mutating config lifecycle tools, and raw_get is explicitly read-only, leaving a notable gap for an F5 XC management server.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues