# MCP Call Audit block

> MCP call table attributing each tool call to its server, with the refused scope and a Grant

Agent run permission review for a chat transcript: rows stream in over skeletons, a Denied only filter and a Dropped badge on a lost server. Built on ReUI Badge, shadcn Table, ToggleGroup, Empty. For MCP audit log, tool permissions, scope approval.

- Type: Pro block
- Category: [Agent Activity](https://web.dev.reui.io/blocks/ai-agents/agent-activity.md)
- Page: https://web.dev.reui.io/blocks/ai-agents/agent-activity/agent-activity-4
- MCP: `get_block("agent-activity-4")`
- Built with: Badge, Button, Empty, Skeleton, Spinner, Table, Toggle Group
- Installs with a ReUI Pro or Ultimate license; setup: https://web.dev.reui.io/docs/license-setup

## Best for

A table of tool calls by server with status dots, a footnote naming servers that received nothing, and rows that stack in a narrow container

## Agent notes

- Replace `SERVERS` and `CALLS`; a call with a `deniedScope` ranks first and offers Grant, and an empty `SERVERS` shows the No Servers Connected state
- `grant` only adds the scope to local `granted` state and fires `toast.success`; the row turns Re-queued but no call runs again
- The `pending` call stays In flight for good, and the footnote lines on timing and payloads are plain text pointing at views this block lacks

## When not to use

- Setting per tool access modes, rate limits and approvers before any run: use [Tool Access Matrix](https://web.dev.reui.io/blocks/solutions/agents/solution-agents-4.md) (`get_block("solution-agents-4")`)
- A step by step narrative of one run naming each file, command and query it touched: use [Live Run Feed](https://web.dev.reui.io/blocks/ai-agents/agent-activity/agent-activity-2.md) (`get_block("agent-activity-2")`)

## Third-party libraries

- Sonner v2: [API reference](https://sonner.emilkowal.ski/toast), [docs](https://sonner.emilkowal.ski/getting-started)

## Install

```bash
npx shadcn@latest add @reui/agent-activity-4
```

## About Agent Activity blocks

### When to use

- A live step feed of one agent run that the person who started it can approve, pause or stop
- The research trail behind an answer: the search query, numbered sources, repo files and confidence
- A record of what a run touched and settled: MCP calls per server, refused scopes and failed items

### When not to use

- Operator pages across many runs: a run queue, an approval inbox or tool access settings: use the [Agents blocks](https://web.dev.reui.io/blocks/solutions/agents.md)
- The conversation around the run: the message thread, the prompt composer and the replies: use the [AI Chat blocks](https://web.dev.reui.io/blocks/ai-agents/ai-chat.md)
- A dated history of what people did, such as activity feeds, milestones or release notes: use the [Timeline blocks](https://web.dev.reui.io/blocks/application/timeline.md)

### Agent notes

- Each page.tsx pads a top aligned `min-h-svh` wrapper around `AgentActivity`, whose root caps at `max-w-xl` or `max-w-2xl`; drop the wrapper in your layout
- Each run is replayed from the block's data file on `setTimeout` timers; drive the same state from your agent's events instead
- Each block calls `toast` from `sonner` but mounts no toaster, so those messages stay hidden until your layout renders one

Every ReUI item has a twin like this one; the index is https://web.dev.reui.io/llms.txt. Agents with the ReUI MCP (https://web.dev.reui.io/docs/mcp) get the same guidance from the getters named above.
