# AI agent & MCP artifact verifier (`iamthat/attest`) Actor

Verify AI agent and MCP server output before trusting or paying for it: JSON Schema conformance, prompt injection, empty output, provenance and authority. Returns accept / review / reject with a trust score and an Ed25519-signed attestation. HTTP + MCP standby server.

- **URL**: https://apify.com/iamthat/attest.md
- **Developed by:** [Maksim Iamthat](https://apify.com/iamthat) (community)
- **Categories:** MCP servers, AI, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## attest — trust layer for agent artifacts

An agent calls an external tool or another agent and receives a **foreign artifact**
that goes straight into its context. Nothing checks that the artifact matches the
declared schema, carries no hidden instruction, is not a base64 wrapper around one, and
has not changed since it was checked. `attest` closes that gap.

Four layers, four different questions:

1. **Form and emptiness** — a perfect form with empty content (ten identical findings)
   is `VALID_BUT_EMPTY`, not a pass.
2. **Poison** — hidden instructions, base64-wrapped payloads, prompt-injection shapes.
3. **Provenance** — Ed25519 signature over the artifact, verifiable without trust in
   the server.
4. **Entitlement** — who is allowed to use the result, checked before release.

Deny-by-default: anything unclassified is rejected.

### This Actor (standby mode)

The Actor runs `attest` as a ready HTTP server. Requests go to the standby URL:

| endpoint | what it does |
|---|---|
| `POST /verify` | check an artifact; returns verdict, violations, signals, provenance |
| `GET /health` | liveness |
| `POST /mcp` | MCP endpoint (`tools/call` → `verify`) for MCP-capable agents |
| `GET /demo` | browser form to try a check by hand |

Example:

```bash
curl -X POST "$ACTOR_STANDBY_URL/verify" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -d '{"artifact": {"findings": ["a", "a", "a"]}, "source": "example"}'
```

Response: verdict (`accept` / `review` / `reject`), trust score, the exact rule that
fired, and an Ed25519 attestation of the result.

### Pricing

- Free tier: 5 checks/day per client.
- Above the free tier the hosted service settles on Base mainnet via x402 (USDC,
  no signup, ETH not required — the facilitator pays gas). Pricing and details:
  <https://attest.rta.lat/pricing>.
- Requests through the Apify platform are authenticated with your Apify token;
  platform-side pay-per-event pricing is configured on this Actor's Pricing tab.

### Source

Apache-2.0, Python standard library only: <https://github.com/mrpkk/attest> ·
399 tests green. The same code serves this Actor and the hosted endpoint.

# Changelog

This Actor's version history is a separate document: https://apify.com/iamthat/attest/changelog.md

# Actor input Schema

## `note` (type: `string`):

Nothing to configure here. The Actor serves its HTTP API at the standby URL: POST /verify to check an artifact, GET /health for status, POST /mcp for the MCP endpoint. See the README for request examples.

## Actor input object example

```json
{}
```

# Actor output Schema

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("iamthat/attest").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("iamthat/attest").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call iamthat/attest --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,iamthat/attest"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/Qq5CtZuXRUHXPbfbW/builds/m2aK8r4rdzE1bfB4A/openapi.json
