AI apps (MCP) in Topologix

Monitoring & Observability

Topologix serves an MCP server at https://<your instance>/api/mcp. An AI app connected to it gets the monitoring bot’s read tools — open problems, metric history, logs, traces, network flows, what changed, entity lookups and more — and reads exactly what the connecting person sees in one organisation: their tag access view, their address visibility and the organisation’s redaction rules apply to every answer. It is read-only: no tool changes anything, and the device tools (diagnostics, host commands, probes) are never offered. Two ways in: a personal MCP token for clients you configure yourself (Claude Code, Claude Desktop), or a sign-in (OAuth 2.1) for claude.ai and ChatGPT connectors.

Requirements

  • Server 1.544.0 or later, reachable over https from where the AI app runs (claude.ai and ChatGPT connect from the internet; Claude Code and Claude Desktop from your computer).
  • An owner, co-owner or admin of the organisation switches on Allow external AI apps (MCP) in Organisation → AI apps (MCP). It is off by default, and an instance administrator can keep it off for every organisation (Admin → System → AI apps (MCP)).
  • The instance’s public URL set (Admin → System → App URL, or APP_PUBLIC_URL) — it is the OAuth issuer and the resource every token is bound to, never taken from a request’s Host header. Until it is set, /api/mcp, the sign-in endpoints and the discovery documents answer 503 and no token can be created.

Set it up

  1. Allow AI appsAn owner or admin opens Organisation → AI apps (MCP) (also in the account menu) and clicks Allow. The page shows the effective value and where it comes from (the organisation, the instance default, or the instance switch).
  2. Claude Code — a personal tokenIn the same tab, New token: a name and an expiry (30 days to 1 year). The token (tpm_…) is shown once, with the command to run: claude mcp add --transport http topologix https://<instance>/api/mcp --header "Authorization: Bearer tpm_…". At most 10 live tokens per person.
  3. claude.ai / ChatGPT — a sign-inAdd a custom connector with the URL https://<instance>/api/mcp (claude.ai: Settings → Connectors; ChatGPT: a custom connector in developer mode). The app registers itself, sends you to Topologix to sign in, and shows a consent page: the app’s name, where it receives the answer, read-only, and the organisation it may read (you pick it). Allow, and the app is connected.
  4. Check itAsk the app something like “what is broken right now?” — it calls get_open_problems. Connected apps and tokens are listed in Organisation → AI apps (MCP), each with Revoke.

Connecting each client

Claude Code

A personal token in the Authorization header (HTTP transport):

Claude Code

claude mcp add --transport http topologix https://topologix.example.com/api/mcp \
  --header "Authorization: Bearer tpm_…"
claude mcp list        # topologix: … - Connected

Claude Desktop

Either a custom connector (Settings → Connectors → Add custom connector, the URL above — the sign-in flow, like claude.ai), or a personal token through the mcp-remote bridge in claude_desktop_config.json:

claude_desktop_config.json

{
  "mcpServers": {
    "topologix": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://topologix.example.com/api/mcp", "--header", "Authorization:${TOPOLOGIX_MCP_TOKEN}"],
      "env": { "TOPOLOGIX_MCP_TOKEN": "Bearer tpm_…" }
    }
  }
}

claude.ai and ChatGPT

The connector URL is https://<instance>/api/mcp. Both discover the sign-in from /.well-known/oauth-protected-resource/api/mcp (RFC 9728) and /.well-known/oauth-authorization-server (RFC 8414), register as a public client and sign you in with PKCE. ChatGPT also gets the search / fetch pair its connectors expect (entities by name, IP or MAC, and the boards’ own sources by name).

Tools

The monitoring bot’s read tools as they apply to your organisation (a tool appears only when something in scope can answer it), plus search, fetch, list_boards, describe_board and list_sources (server 1.547.0), the stored inventory reads database_sizes and k8s_pods, and the error ranking top_errors (server 1.548.0). Every tool takes an optional board argument — a board (flow) id from list_boards — to read that board’s scope instead of the whole organisation. Never offered: run_device_diagnostic, host_run_readonly, net_probe, fetch_data, set_hypotheses and every tool that needs edit rights.

Finding a board’s own data (describe_board)

A board’s data sources — a ClickHouse or Prometheus custom query, a Business KPI, an interface — are read by name. describe_board (server 1.546.0) lists a board’s nodes, each node’s sources with the entity name get_metric_history takes, the kpi name get_kpi_history takes (a source with a Business KPI), the integration, the last value and the series keys, and its monitors. The usual order: list_boards → describe_board {board} → get_metric_history {entity, series, board} with the same board. A custom query is named by its label (“Total Players”), the query text only when it has none; a query’s text and its connection details (host, port, credentials) are never returned, nor a monitor URL’s credentials or query string; names are the ones the board shows, with the addresses hidden from you masked. A board shared from another organisation lists its own integrations only. Long boards come in pages (next_cursor). search also finds board sources — by node, source, KPI or series label, across the boards you may read (at most 30 per search, 20 results) — and fetch on such a result returns its node with its board.

How search matches (server 1.547.0)

Use 1–3 keywords. A query is split into words (TotalPlayers and total_players are “total players”); filler words (how, many, what, now, show …) are dropped; plurals and simple endings match (players = player); a fixed set of monitoring synonyms widens a word (online ≈ live ≈ active ≈ current; users ≈ players ≈ sessions ≈ clients; errors ≈ failures ≈ 5xx; latency ≈ response time ≈ p95; cpu ≈ processor; memory ≈ ram ≈ heap; db ≈ database ≈ sql …); and a small typo still matches (one letter missing, extra, swapped or a neighbouring key in a word of 5–7 letters, two in a longer one — plyers finds players). Besides a source’s name, KPI, series labels and node name, search reads what a source measures — its query, preset, unit and database — and the node’s description; a board’s name alone never makes a match. Results are ranked across all boards (matching every word first), each saying what matched (“Live Players (node) · online≈live”); a match in a query shows a short excerpt, never the whole query. An address hidden from you is never found by searching for it. So “how many players are online right now” finds a source labelled “Total Players” on a node “Live Players”.

Every source at a glance (list_sources)

When search finds nothing that fits, list_sources lists every data source you may read, one line each: board · node · source (the entity name) · KPI · integration type · unit · a short “measures” excerpt (never the query itself). Stored data only — no live read. It pages by next_cursor (at most 200 lines a page) and takes an optional board. The recommended order for an app: 1. search with a few keywords, 2. list_sources if nothing fits, 3. describe_board for one board’s detail.

Database sizes and failing pods (stored data)

database_sizes lists the Databases page’s latest-sample figures per database, largest first, with totals: each row names its instance (never host:port), the size and what the size means on that engine. Oracle reports tablespaces (it has no database sizes); SAP HANA reports tenants and schemas (schema sizes are listed but not added — they sit inside the tenant’s figure). Size unavailable = the database is monitored but its engine did not report a size (e.g. ClickHouse without SELECT on system.parts) — never counted as 0; names only — not monitored = the database is known but no source monitors it; collection failed = the latest collection failed. k8s_pods answers from each cluster’s newest stored poll: nodes and pods, the problem pods per namespace (reason, restarts, last exit, a short message) and the top pods by CPU / memory. Pods unknown = the last poll was partial (the pod list failed); a namespace-scoped source shows its summary only (problem-pod detection runs on cluster-scoped sources); “no problem pods” is qualified by the source’s namespace allow-list; a namespace at the 50-pod cap says so. Both are paged (next_cursor).

Which service logs the most errors (top_errors)

top_errors (server 1.548.0) ranks services by their error log lines in the last 1–24 hours (default 1), from the hourly counts the server already keeps — never a live read. It answers the services largest first with the count, the count of the hours before (and the ratio), the top error types, which integration counted them and one short sample (secrets removed). exclude / only take name substrings (exclude=["esxi"]); integration keeps integrations by name, "!name" drops one. Counts are hourly: “the past hour” is the last full hour plus the current partial one, and the answer says how many hours it covers. What counts errors: a source that counts errors per service — a Graylog, Elasticsearch / OpenSearch, Aria Operations for Logs, Sentry or Elastic APM errors per service source, an OpenTelemetry source on the logs signal, a syslog source, the hypervisor log pass or a Zabbix log-items source. The answer lists them (counted by, with the newest count — “no counts since …” when a source went quiet) and the log integrations that count nothing (not counted, with why — e.g. an OpenTelemetry integration that receives no logs). With no counting source at all it answers an error, not an empty list. Then call search_logs for one service’s lines.

No live reads over MCP for these

list_boards, describe_board, list_sources, database_sizes, k8s_pods and top_errors read stored data only and never take a live-read slot; fetch_data (a live read of a source) is never offered to an AI app.

What data leaves the instance

Tool results go to the AI provider

Whatever a tool returns is sent to the app — and so to its AI provider (Anthropic, OpenAI) under that provider’s terms. Before it leaves, every result passes the connecting person’s access view (hidden resources are left out or answer “not found”), their address mask (addresses an integration hides from people outside its organisation; if visibility cannot be determined nothing is read), the organisation’s redaction rules and the secrets filter, and the bot’s size caps.

Results are marked as data

Each result arrives as {"note": …, "untrusted_data": "…"}: the note tells the model that the content is monitoring data — device output, log lines, names other people chose — and never instructions. Control, zero-width and bidi-override characters are stripped. This blunts prompt injection through monitored data; it does not make the model infallible, so connect apps you trust.

What Topologix records

Every tool call writes an activity entry mcp.tool_call: the tool, a hash of the arguments, the sizes, the live reads, the token or app — never the result. Token and connection changes are recorded too (mcp.token.*, oauth.*, mcp.settings).

Searches that found nothing (server 1.547.0)

For search and list_sources the entry also keeps the result count, the number of boards searched and the query itself — after the person’s address mask, the organisation’s redaction rules and the secrets filter, with every address shape (IPv4, IPv6, MAC) replaced by “(address)”, at most 80 characters; results are never kept. Owners, co-owners and admins read their organisation’s misses — the queries that found nothing, grouped with their counts — at GET /api/ai-apps/search-misses?days=7 (1–30 days); instance administrators read any organisation’s at GET /api/admin/mcp/search-misses?org=<id>.

Limits

Rates and live reads

At most 60 requests a minute and 4 at once per token or connected app; a JSON-RPC batch (an array) is refused — one request per POST. A request beyond the 4 waits for a free slot, up to 20 seconds, in order (at most 8 wait; more are refused at once) — so an AI app that fires its tool calls in parallel is served, a little later. A limit that is still hit explains itself: a tool call answers as a tool error the AI app reads (“at most 4 requests at once per AI app token — retry in 5 s, or call the tools one at a time”; “at most 60 requests a minute … retry in N s”, N = until the oldest request of the minute leaves it), every other request as HTTP 429 with Retry-After and the same reason as a JSON-RPC error. Refused requests do not count against the minute; the first refusal of a token in a minute is written to the activity log (mcp.rate_limited, which limit, how long it waited). Tools that read a device, an appliance or a proxy live spend the live-read budget: 30 per token or app per hour by default (Admin → System → AI apps (MCP), 0 = stored data only); an organisation that keeps view-only people to stored data (Organisation → AI models) keeps AI apps there too. A tool call answers after at most 120 seconds; a read still running then keeps its slot and its live reads until it finishes.

Every request is checked again

The token is live, the person still exists and is an active member of the organisation, and the organisation (and the instance) still allow AI apps — on every request (a switch change reaches every request within 10 seconds). Switching AI apps off stops every app of the organisation.

Tokens and the sign-in

Personal tokens

tpm_…, one person in one organisation, scope mcp:read, an expiry of at most a year. Only a SHA-256 hash is stored. They are accepted only by /api/mcp; anywhere else the server answers 401 without looking them up. Organisation API tokens (tpx_…) still work only through an on-prem proxy and are never accepted here. After 20 guesses from one address (well-formed tokens that match nothing) in 15 minutes, that address is refused before any lookup; an expired or revoked token you really hold never counts.

Signing out ends AI app access

A password change or reset, Sign out everywhere, being signed out by an organisation admin, or leaving an organisation revokes every personal MCP token and every connected app of that person (on every instance organisation). Create a new token / connect the app again afterwards.

The OAuth 2.1 sign-in

Public clients only (no client secret), registered dynamically (RFC 7591; 10 per address per hour; a client that never completes a sign-in is removed after 24 hours). Redirect URIs must match exactly and be https, or http on 127.0.0.1 / [::1] (any port); the name localhost is refused. PKCE S256 is required. The authorization code lives 60 seconds and works once — a second use revokes what the first opened. Access tokens (tpo_…) last an hour and are bound to this MCP endpoint (RFC 8707); refresh tokens (tpr_…) last 30 days and rotate on every use (the earlier access tokens stop working) — replaying an old one revokes the whole connection. Apps can revoke at /api/oauth/revoke; you can in the AI apps tab.

nginx (self-hosted instances)

The two locations

The bundled site template forwards the discovery documents and streams the MCP endpoint unbuffered. A site installed from 1.544.0 has them; a site you maintain by hand needs these two blocks in its server { listen 443 … } block, above location /api/, then sudo nginx -t && sudo nginx -s reload:

  • Without the first block, claude.ai and ChatGPT cannot find the sign-in (personal tokens still work). Without the second, streamed answers may wait in nginx’s buffer; the server also sends X-Accel-Buffering: no and a keep-alive every 25 seconds.

nginx site

location ^~ /.well-known/oauth- {
    limit_except GET { deny all; }
    proxy_pass http://127.0.0.1:3001;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
}
location = /api/mcp {
    client_max_body_size 1m;
    proxy_buffering off;
    proxy_cache off;
    proxy_pass http://127.0.0.1:3001;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_read_timeout 600s;
    proxy_send_timeout 600s;
}

Good to know

  • The MCP server is stateless (POST only): there is no session to resume and no server-initiated stream — a GET answers 405.
  • Turning Allow external AI apps off keeps the tokens and connections listed; they work again when it is switched back on. Revoke them to end them for good.

All integrations →

See it on your own infrastructure

Book a demo and we will walk you through Topologix with your systems in mind: on our cloud, or self-hosted in your own network.