# Horkos

> Horkos is an open-source MCP server for finance and payments. Escrow for AI agent purchases on NEAR testnet, paid out only after verified delivery. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Website:** https://horkos-escrow.netlify.app
- **Repository:** https://github.com/iusserhat/horkos/tree/HEAD/mcp
- **MCP Registry name:** io.github.iusserhat/horkos
- **Categories:** finance and payments, security
- **Listing updated:** 2026-11-15

## About

An agent's payment cannot be reversed, so Horkos moves the safeguards into an escrow contract. Each order locks its price in the contract and is represented by an NFT receipt. The seller is paid only if the owner's spending mandate allows the order and a verifier confirms the delivery meets a machine-checkable condition; otherwise the money returns after the deadline.

The owner's limits (budget, per-order cap, allowed sellers, expiry) live in the contract itself, so a compromised agent cannot buy outside them. The seller delivers encrypted data, and a verifier running in NEAR OutLayer's TEE checks it against a JSON Schema before the buyer gets the key. If no valid delivery is verified in time, anyone can trigger the refund.

This MCP package exposes the contract to an agent over stdio, with create_order and cancel_order among its calls. The README says it was built for the NEAR hackathon, runs on NEAR testnet and is MIT licensed, and its repository includes attack-scenario and invariant tests.

## Features

- **Mandate in the contract:** Budget, per-order cap, allowed sellers and expiry are enforced on-chain.
- **NFT order receipts:** Each order locks its price and carries its claim as an NFT.
- **TEE verification:** A verifier in NEAR OutLayer's TEE checks delivery against a JSON Schema.
- **Automatic refunds:** If no valid delivery is verified by the deadline, anyone can trigger the refund.
- **Stdio MCP package:** Install horkos-mcp from npm with an agent account and owner configured.

## Good for

- Let an agent buy data without risking a full loss
- Cap an agent's spending with an on-chain mandate
- Pay a seller only when delivery matches a schema
- Experiment with agent commerce on NEAR testnet

## Install

### Claude Code (Terminal)

```sh
claude mcp add horkos --env HORKOS_AGENT='<HORKOS_AGENT>' --env HORKOS_OWNER='<HORKOS_OWNER>' --env HORKOS_AGENT_KEY='<HORKOS_AGENT_KEY>' -- npx -y horkos-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "horkos": {
      "command": "npx",
      "args": [
        "-y",
        "horkos-mcp"
      ],
      "env": {
        "HORKOS_AGENT": "<HORKOS_AGENT>",
        "HORKOS_OWNER": "<HORKOS_OWNER>",
        "HORKOS_AGENT_KEY": "<HORKOS_AGENT_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "horkos": {
      "command": "npx",
      "args": [
        "-y",
        "horkos-mcp"
      ],
      "env": {
        "HORKOS_AGENT": "<HORKOS_AGENT>",
        "HORKOS_OWNER": "<HORKOS_OWNER>",
        "HORKOS_AGENT_KEY": "<HORKOS_AGENT_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "horkos": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "horkos-mcp"
      ],
      "env": {
        "HORKOS_AGENT": "<HORKOS_AGENT>",
        "HORKOS_OWNER": "<HORKOS_OWNER>",
        "HORKOS_AGENT_KEY": "<HORKOS_AGENT_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "horkos": {
      "command": "npx",
      "args": [
        "-y",
        "horkos-mcp"
      ],
      "env": {
        "HORKOS_AGENT": "<HORKOS_AGENT>",
        "HORKOS_OWNER": "<HORKOS_OWNER>",
        "HORKOS_AGENT_KEY": "<HORKOS_AGENT_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "horkos": {
      "command": "npx",
      "args": [
        "-y",
        "horkos-mcp"
      ],
      "env": {
        "HORKOS_AGENT": "<HORKOS_AGENT>",
        "HORKOS_OWNER": "<HORKOS_OWNER>",
        "HORKOS_AGENT_KEY": "<HORKOS_AGENT_KEY>"
      }
    }
  }
}
```

## Tools

- `create_order`: Creates an escrow order for an agent purchase within the owner's mandate.
- `cancel_order`: Cancels an escrow order.

## FAQ

### Which network does it run on?

NEAR testnet; the default contract is escrow.horkos.testnet.

### What does the agent need to configure?

HORKOS_AGENT and HORKOS_OWNER are required; a function-call key can be set in HORKOS_AGENT_KEY or read from ~/.near-credentials.

### How are disputes handled?

They are avoided rather than resolved: payment depends on a verifier checking the delivery condition.

### What licence is it under?

MIT.

### Is Horkos free?

Yes. Horkos is open source, so you can use and self-host it for free.

### How do I add Horkos to Claude Code?

Run this command in your terminal: claude mcp add horkos --env HORKOS_AGENT='<HORKOS_AGENT>' --env HORKOS_OWNER='<HORKOS_OWNER>' --env HORKOS_AGENT_KEY='<HORKOS_AGENT_KEY>' -- npx -y horkos-mcp

### What are the best alternatives to Horkos?

The closest alternatives to Horkos are REA, Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Agent Roast and Midplane.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Solana MCP by Vybe](https://ai-powered.com/mcp/solana-mcp-by-vybe): Solana MCP by Vybe is an MCP server for finance and payments.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.

---
Source: https://ai-powered.com/mcp/horkos
