# Block changes and approve calls at the MCP gateway

Start with 3 free protected services on the Agentalog gateway to pin each tool's hash on first use, hold changes and enforce per-call human approval on sensitive tools.

Agentalog · Updated 2026-11-20

## Step 1. Enable free starter protection on the server listing

Open a remote MCP server over Streamable HTTP that does not require its own OAuth flow and select Protect (or send POST /api/protection/services with listing_id).

- 3 free services per account: protect up to 3 MCP servers or verified skill copies at no cost.
- On-demand expansion: the optional US$ 1 pass adds +10 protected services for 30 days, with no automatic renewal.
- Ready-to-use agent endpoint: the response returns https://agentalog.com/g/<id>/mcp and the connection command.

```sh
claude mcp add --transport http protected-server https://agentalog.com/g/<LISTING_ID>/mcp --header "X-Agentalog-Key: <AGENTALOG_API_KEY>"
```

## Step 2. Pin the canonical signature on first use

When your client runs initialize and tools/list for the first time, the guard computes the SHA-256 of each tool's canonical JSON (name, title, description, inputSchema, outputSchema and annotations) and of the server instructions.

That initial reading is automatically approved on your account as the cryptographic baseline.

## Step 3. Hold changed tools and require per-call approval on sensitive actions

The gateway protects your agent session across two complementary layers:

- Automatic silent-mutation blocking: if the remote server changes any field of a tool or announces a new tool, the guard removes it from tools/list and blocks tools/call until reviewed.
- Per-call human approval (gated_tools): mark sensitive tools (or * for all tools) via POST /api/protection/services/:id/policy with gated_tools. Every tools/call to those tools is held with the SHA-256 of the canonical { arguments, tool } JSON until you approve that specific single-use execution.

## Step 4. Review the exact hash before approving

Read GET /api/protection or open Mine to compare the previous definition with the received hash_input and send POST /api/protection/services/:id/approve with expected_hashes.

- Race-condition protection: if the remote server changes again between your read and your request, the API answers 409 protection_changed and refuses to approve a different version.
- Daily seal integration: when a server with daily seals enters review, the gateway also pauses calls until the domain controller confirms.

[Choose an MCP server](https://agentalog.com/?kind=mcp)

[Block changes and approve calls at the MCP gateway](https://agentalog.com/guides/mcp-protection-gateway)
