# Deterministic Technical Verification MCP Server (`meanusarcanus/mcp-technical-verification`) Actor

Deterministic technical verification tools for autonomous AI agents (SPF/DMARC/DKIM/MX DNS audits, live SSL/TLS certificate inspection, and webhook reachability probes) with sub-500ms warm latency and Pay-Per-Event billing.

- **URL**: https://apify.com/meanusarcanus/mcp-technical-verification.md
- **Developed by:** [Meanus Arcanus](https://apify.com/meanusarcanus) (community)
- **Categories:** AI, Developer tools
- **Features:** Limited permissions, Single-tenant, Server interface
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 domain checkeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## 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

## Deterministic Technical Verification MCP Server

#### Production-Ready Apify Standby Server Actor & x402 Micropayment Engine for Autonomous AI Agents

[![Apify Actor](https://img.shields.io/badge/Apify-Standby%20Actor-orange.svg)](https://apify.com/meanusarcanus/mcp-technical-verification)
[![Model Context Protocol](https://img.shields.io/badge/MCP-Streamable%20HTTP-blue.svg)](https://modelcontextprotocol.io)
[![Smithery](https://img.shields.io/badge/Smithery-Registry%20Ready-purple.svg)](https://smithery.ai)
[![x402 Base USDC](https://img.shields.io/badge/x402-Base%20USDC%20Micropayments-0052FF.svg)](https://base.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-5.7%2B-blue)](https://www.typescriptlang.org/)
[![License](https://img.shields.io/badge/License-Apache%202.0-green.svg)](LICENSE)
[![Zero-Exception Telemetry](https://img.shields.io/badge/Telemetry-Zero--Exception-brightgreen)](#zero-exception-telemetry--billing-policy)

An enterprise-grade, stateless **Model Context Protocol (MCP)** server packaged as an **Apify Standby Server Actor** and **Smithery.ai Registry Package**. Specifically engineered to rank **#1 in Machine-to-Machine (M2M) algorithmic tool routers** (Claude Desktop, Cursor IDE, Devin, Cline, Windsurf, LangChain, CrewAI, AutoGen, ElizaOS, and Coinbase AgentKit), providing 7 ultra-fast, deterministic technical verification tools for autonomous AI agents.

Monetized via **Dual-Channel M2M Billing**:

1. **Web2 Agents:** Apify Pay-Per-Event (`Actor.charge`) at **$0.001 - $0.005 / event** with Bearer token authentication.
2. **Autonomous Web3 Agents:** **x402 EIP-712 Base USDC micropayments** on Base (`8453`) allowing trustless, wallet-based consumption without requiring an Apify account.

***

### ⚡ Key Architectural Advantages

| Feature | Specification | Impact for Autonomous AI Agents |
| :--- | :--- | :--- |
| **Dual Billing** | Apify PPE + x402 Base USDC | Seamless consumption for both Web2 enterprise agents and autonomous crypto-native agent swarms. |
| **Transport** | Streamable HTTP (`@modelcontextprotocol/sdk`) | Single persistent container endpoint (`/mcp`), zero container cold starts, sub-500ms warm response time. |
| **Router SEO** | Vector-Matched Semantic Descriptions | Packed with protocol keywords (`SPF`, `DMARC`, `DKIM`, `TLS`, `DNSBL`, `robots.txt`, `CNAME`) and explicit conditional triggers (`"Use whenever..."`) ensuring LLM tool routers select tools with maximum semantic confidence. |
| **SSRF Firewall** | Dual-Stack IP Sanitization (`src/security/ssrf.ts`) | Pre-resolves DNS and blocks loopback, private RFC 1918 LAN, AWS/GCP cloud metadata (`169.254.169.254`), and IPv4-mapped IPv6 ranges before connecting. |
| **Strict Timeouts**| Strict 3000ms Budget on Probes | Enforces hard cancellation timeouts so external network failures never stall an agent loop. |
| **Token Compression**| High-Signal JSON Schemas | Returns dense booleans, risk scores, exact counts, and remediation strings. Omits bulky raw PEM certificates and HTML response bodies unless `verbose: true` is requested. |
| **Zero-Exception Policy**| Structured `200 OK` Telemetry | Never throws unhandled exceptions on invalid domains, expired certificates, or NXDOMAIN. Returns `{ valid: false, errorCode: "...", reason: "..." }`. |
| **Fair Monetization**| Zero Charges on Failure | **`Actor.charge()` is strictly called only upon successful lookup.** Failed queries and security-blocked requests are never billed. |

***

### 🛠️ MCP Tools Capability Matrix (7 Tools)

```
                                 [ Autonomous AI Agent ]
                                            │
                        ┌───────────────────┴───────────────────┐
                        ▼ (Bearer APIFY_TOKEN)                  ▼ (X-PAYMENT Base USDC)
        ┌──────────────────────────────┐        ┌──────────────────────────────┐
        │ Apify Pay-Per-Event Billing  │        │ x402 Onchain Verification    │
        │ (Actor.charge)               │        │ (EIP-712 Base 8453 USDC)     │
        └──────────────────────────────┘        └──────────────────────────────┘
                                            │
                                            ▼ Streamable HTTP POST (/mcp)
+───────────────────────────────────────────────────────────────────────────────────────────+
|                       Apify Standby MCP Actor (Node.js 20 Alpine)                         |
|                                                                                           |
|   ┌─────────────────────────────┐             ┌───────────────────────────────────────┐   |
|   │ Health Check (/health)      │             │ SSRF Security Firewall & Non-Blocking │   |
|   │ Standby Container Watchdog  │             │ c-ares DNS (3000ms Strict Timeout)    │   |
|   └─────────────────────────────┘             └───────────────────────────────────────┘   |
|                                                               │                           |
|      ┌──────────────┬──────────────┬──────────────┬───────────┴──┬──────────────┬─────────┤
|      ▼              ▼              ▼              ▼              ▼              ▼         ▼
| ┌─────────┐   ┌─────────┐   ┌───────────┐   ┌───────────┐   ┌─────────┐   ┌─────────┐ ┌─────────┐
| │ Email   │   │ SSL/TLS │   │ Webhook   │   │ DNSBL     │   │ AI Bot  │   │Subdomain│ │Composite│
| │ Security│   │ Inspect │   │ Probe     │   │ Blacklist │   │ Firewall│   │Takeover │ │ Health  │
| └─────────┘   └─────────┘   └───────────┘   └───────────┘   └─────────┘   └─────────┘ └─────────┘
+───────────────────────────────────────────────────────────────────────────────────────────+
```

| Tool Name | Routing Trigger (`"Use whenever..."`) | Billable Event | Price |
| :--- | :--- | :--- | :--- |
| **`audit_domain_email_security`** | *"Use whenever verifying custom domain setup, outbound email health, or vendor DNS security compliance."* | `security-audit` | $0.001 |
| **`inspect_ssl_certificate`** | *"Use whenever verifying HTTPS deployment health, SSL renewal status, or endpoint encryption compliance."* | `ssl-inspection` | $0.001 |
| **`verify_webhook_endpoint`** | *"Use whenever testing webhook reachability, API uptime, or post-deployment endpoint health."* | `webhook-probe` | $0.001 |
| **`check_dnsbl_spam_blacklists`** | *"Use whenever evaluating sender reputation, vetting outbound sales domains, or auditing IP deliverability status."* | `dnsbl-check` | $0.002 |
| **`audit_ai_crawler_firewall`** | *"Use whenever planning web scraping, verifying AI crawler accessibility, or checking RAG ingestion permissions."* | `ai-firewall-audit` | $0.001 |
| **`detect_subdomain_takeover`** | *"Use whenever performing DNS security hygiene, pre-deployment audits, or bug bounty vulnerability assessments."* | `subdomain-takeover-scan` | $0.005 |
| **`audit_complete_infrastructure_health`**| *"Use whenever performing post-deployment verification, client onboarding technical audits, or continuous infrastructure monitoring."* | `composite-health-audit` | $0.003 |

***

### 📋 Tool Reference & Example Payloads

#### 1. `audit_complete_infrastructure_health`

Bundles live DNS email security (SPF/DMARC/MX), SSL/TLS certificate inspection, and HTTP webhook reachability into a single consolidated 0-100 reliability score.

```json
{
  "domain": "google.com",
  "verbose": false
}
```

**Output:**

```json
{
  "valid": true,
  "domain": "google.com",
  "reliabilityScore": 100,
  "rating": "EXCELLENT",
  "emailSecurity": { "valid": true, "riskScore": 0, "status": "PASS" },
  "ssl": { "valid": true, "authorized": true, "daysUntilExpiration": 72 },
  "webhook": { "valid": true, "status": 200, "ttfbMs": 142 },
  "issues": [],
  "recommendations": ["Infrastructure is in excellent operational condition across DNS, TLS, and HTTP vectors."]
}
```

#### 2. `check_dnsbl_spam_blacklists`

Queries 10+ real-time spam blacklists (Spamhaus ZEN, Barracuda, SpamCop, SORBS, Mailspike, UCEPROTECT, DroneBL).

```json
{
  "target": "8.8.8.8",
  "verbose": false
}
```

**Output:**

```json
{
  "valid": true,
  "target": "8.8.8.8",
  "ip": "8.8.8.8",
  "reputationScore": 100,
  "rating": "EXCELLENT",
  "clean": true,
  "totalChecked": 10,
  "listedCount": 0,
  "listings": []
}
```

#### 3. `audit_ai_crawler_firewall`

Audits `robots.txt` and HTTP headers for AI scraping permissions across GPTBot, ClaudeBot, PerplexityBot, CCBot, Google-Extended, and ByteSpider.

```json
{
  "domain": "openai.com",
  "verbose": false
}
```

#### 4. `detect_subdomain_takeover`

Inspects CNAME records for dangling cloud provider pointers (AWS S3, GitHub Pages, Vercel, Heroku, Azure, CloudFront, Shopify).

```json
{
  "domain": "sub.example.com",
  "verbose": false
}
```

***

### 🛡️ Zero-Exception Telemetry & Billing Policy

In production M2M workflows, AI agents must receive clean, predictable JSON responses. This Actor implements **Zero-Exception Telemetry**:

1. **Structured Failure Responses:** When a user passes a nonexistent domain, NXDOMAIN, invalid URL, or closed port, the tool returns a standard `200 OK` JSON object:
   ```json
   {
     "valid": false,
     "errorCode": "DNS_NXDOMAIN",
     "reason": "Domain does not exist or has no DNS records: 'nonexistent-xyz-987.org'."
   }
   ```
2. **Strict SSRF Firewall:** All targets are pre-filtered through `src/security/ssrf.ts`. The following ranges are blocked before any socket is opened:
   - Loopback (`127.0.0.0/8`, `::1`)
   - Private RFC 1918 LAN (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`)
   - Cloud Instance Metadata (`169.254.169.254`, `169.254.0.0/16`)
   - IPv4-Mapped IPv6 representations (`::ffff:127.0.0.1`)
   - Carrier-grade NAT (`100.64.0.0/10`)
   - Non-routable / multicast / reserved networks
3. **No Charge on Failure:** `Actor.charge()` is invoked **strictly after successful technical verification**. Failed DNS lookups, blocked SSRF attempts, connection timeouts, or malformed queries will **NEVER** decrement user funds.

***

### 🤖 Client Agent Configuration

#### 1. Smithery.ai Registry Installation (One-Click)

```bash
npx -y @smithery/cli install @meanusarcanus/mcp-technical-verification
```

#### 2. Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "technical-verification": {
      "url": "https://meanusarcanus--mcp-technical-verification.apify.actor/mcp",
      "headers": {
        "Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"
      }
    }
  }
}
```

#### 3. Cursor IDE / Windsurf / Cline

Configure a remote MCP server with Streamable HTTP:

- **Server URL:** `https://meanusarcanus--mcp-technical-verification.apify.actor/mcp`
- **Transport:** Streamable HTTP (Stateless)
- **Headers:** `{"Authorization": "Bearer <YOUR_APIFY_API_TOKEN>"}`

#### 4. Autonomous Web3 Agents (x402 Base USDC Micropayments)

Autonomous agents can transact trustlessly on Base using the x402 protocol without needing an Apify account:
See [Autonomous Agent Verification Hook](examples/agent-verification-hook.md) for full setup.

***

### 🚀 Development & Testing

#### Installation & Build

```bash
npm install
npm run build
```

#### Running Test Suite

```bash
npm test
```

#### Starting Standby Server Locally

```bash
npm start
```

The server binds to `http://0.0.0.0:8080`:

- **Health Check:** `GET http://0.0.0.0:8080/health`
- **Streamable HTTP MCP Endpoint:** `POST http://0.0.0.0:8080/mcp`

***

### 📄 License

This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details.

# Actor input Schema

## `action` (type: `string`):

Select tool to execute in single-run fallback mode. In Standby mode, tools are invoked automatically via the /mcp endpoint.

## `domain` (type: `string`):

Domain to audit for email security, AI firewall, takeover, or composite health. E.g. 'google.com'

## `target` (type: `string`):

IPv4 address or domain to check against 10+ spam blacklists. E.g. '8.8.8.8' or 'mail.example.com'

## `dkimSelectors` (type: `array`):

Optional DKIM selector prefixes to test (e.g. \['google', 'default', 'k1'])

## `hostname` (type: `string`):

Hostname for SSL/TLS certificate inspection. E.g. 'cloudflare.com'

## `port` (type: `integer`):

Port for SSL/TLS inspection (default: 443)

## `url` (type: `string`):

Public URL to probe for reachability, TTFB latency, and security headers. E.g. 'https://httpbin.org/get'

## `webhookUrl` (type: `string`):

Optional webhook endpoint for composite health check (defaults to https://${domain})

## `expectedStatus` (type: `integer`):

Expected status code for webhook verification (default: 200)

## `verbose` (type: `boolean`):

Return extended diagnostic data (certificate chain, raw headers). Default is false for token compression.

## Actor input object example

```json
{
  "action": "health",
  "domain": "google.com",
  "target": "8.8.8.8",
  "dkimSelectors": [
    "google",
    "default"
  ],
  "hostname": "cloudflare.com",
  "port": 443,
  "url": "https://httpbin.org/get",
  "expectedStatus": 200,
  "verbose": false
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# 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 = {
    "domain": "google.com",
    "target": "8.8.8.8",
    "dkimSelectors": [
        "google",
        "default"
    ],
    "hostname": "cloudflare.com",
    "url": "https://httpbin.org/get"
};

// Run the Actor and wait for it to finish
const run = await client.actor("meanusarcanus/mcp-technical-verification").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 = {
    "domain": "google.com",
    "target": "8.8.8.8",
    "dkimSelectors": [
        "google",
        "default",
    ],
    "hostname": "cloudflare.com",
    "url": "https://httpbin.org/get",
}

# Run the Actor and wait for it to finish
run = client.actor("meanusarcanus/mcp-technical-verification").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 '{
  "domain": "google.com",
  "target": "8.8.8.8",
  "dkimSelectors": [
    "google",
    "default"
  ],
  "hostname": "cloudflare.com",
  "url": "https://httpbin.org/get"
}' |
apify call meanusarcanus/mcp-technical-verification --silent --output-dataset

```

## MCP server setup

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

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/251BMtfeRkPa3Xbep/builds/lF7zTGZgWyAW3nTxM/openapi.json
