> ## Documentation Index
> Fetch the complete documentation index at: https://docs.visiqlabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Platform MCP server

> Operate VisIQ from any MCP client — the authenticated Model Context Protocol server exposing rules, agents, decisions, HITL, settings, and natural-language queries as tools.

VisIQ exposes an authenticated **Model Context Protocol (MCP)** server so an AI
agent or MCP-capable client can operate the product with tool calls instead of
raw REST. It is the same management surface as the web app and the
[automation API](/automation/introduction) — every tool enforces the identical
RBAC permission its web route requires.

<Note>
  There are **two** VisIQ MCP servers, both listed in
  [`/.well-known/mcp/server-cards.json`](https://visiqlabs.com/.well-known/mcp/server-cards.json):

  * **Public MCP** — `https://visiqlabs.com/mcp` — read-only discovery, **no
    credentials**. Public information about VisIQ only.
  * **Platform MCP** (this page) — `https://app.visiqlabs.com/api/mcp` —
    **authenticated**; operates your tenant.
</Note>

## Endpoint & transport

|               |                                                           |
| ------------- | --------------------------------------------------------- |
| **URL**       | `https://app.visiqlabs.com/api/mcp`                       |
| **Transport** | Streamable HTTP                                           |
| **Auth**      | `Authorization: Bearer <management-key>` on every request |
| **Protocol**  | MCP `2025-06-18`                                          |

You need a **management-audience** API key. Get one from **Connectors → API
Keys** in the dashboard, or have your agent
[self-register](/automation/agent-device-flow) with
`"requested_key_type": "management"`. A harness key is confined to the SDK
operational surface and is **not** accepted here.

<Warning>
  The server is **fail-closed**: a missing or invalid key is rejected, and a tool
  whose required permission the key does not hold returns an error naming the
  missing permission (never a silent partial result). Nothing is anonymously
  accessible.
</Warning>

## Connect a client

Point any MCP client at the endpoint with a bearer header. For example, a
generic `mcpServers` configuration:

```json theme={null}
{
  "mcpServers": {
    "visiq": {
      "type": "http",
      "url": "https://app.visiqlabs.com/api/mcp",
      "headers": { "Authorization": "Bearer vq_prod_..." }
    }
  }
}
```

Then **start with `whoami`** to confirm which vendor and permissions your key
resolves to — every other tool is gated by those permissions.

## Tool catalog

The server advertises the tools below via `tools/list`. Each is permission-gated
exactly like its web/API counterpart.

**Discovery**

* `whoami` — the vendor and effective permissions your key holds. Call this first.
* `describe_chat` — how the in-product natural-language query tools work.

**Action governance (rules)**

* `list_rules`, `get_rule` — read action rules
* `create_rule`, `update_rule`, `delete_rule` — author action rules
* `compile_rule` — compile natural language into a rule (requires `allow_rules:create` **or** `recall_rules:create`)

**Retrieval governance (rules)**

* `list_recall_rules`, `create_recall_rule` — read and author retrieval rules

**Agents**

* `list_agents`, `get_agent` — inventory
* `register_agent`, `update_agent` — register and manage agents across frameworks

**Decisions & schemas**

* `get_decision_outcomes` — decision/audit outcomes
* `list_action_schemas` — the action schemas agents report

**Human-in-the-loop**

* `list_hitl_queue` — pending approvals
* `respond_hitl` — approve or deny a queued action (authenticated approver identity)

**Settings**

* `get_allow_settings`, `update_allow_settings` — enforcement mode and settings

**Natural-language queries**

* `chat_rules_table`, `chat_events_log`, `chat_agents_inventory`, `chat_hitl_queue`, `chat_data_table` — ask questions over each surface in plain language

**Key lifecycle**

* `revoke_self` — revoke **this** key (no arguments, no permission required). It
  stops authenticating immediately, so make it your **final** call. See
  [self-revocation](/automation/api-keys#revoke-your-own-key-self-revocation).

## Related

* [Agent authentication](https://visiqlabs.com/auth.md) — the agent-facing auth guide (device flow + self-revoke).
* [Managing API keys](/automation/api-keys) — key lifecycle, formats, errors.
* [Agent self-registration](/automation/agent-device-flow) — obtain a key without a pre-provisioned credential.
