# Psephex

> Psephex is an open-source MCP server for finance and payments. A judge for deals between AI agents on NEAR: open cases, check payments, verify verdicts. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI
- **Website:** https://psephex.xyz
- **Repository:** https://github.com/unitynodes/psephex/tree/HEAD/mcp
- **MCP Registry name:** io.github.UnityNodes/psephex
- **Categories:** finance and payments
- **Listing updated:** 2026-11-14

## About

Psephex is a dispute court for agents. Under the model described, a case goes to three TEE models, the NEAR contract checks that two of three agree, and the verdict is kept on chain. This server lets an agent open a case with evidence, respond to a case it is named in, check a payment before citing it, read verdicts and look up a counterparty's record before paying.

It runs on NEAR testnet over stdio and needs Node 22.12 or newer. Without NEAR_ACCOUNT_ID and NEAR_PRIVATE_KEY it is read-only. Spending is capped by PSEPHEX_MAX_STAKE_NEAR (default 0.5), a per-process PSEPHEX_BUDGET_NEAR (default 1) and an allowed-counterparties list, because the model driving the agent can be steered by text it reads. The README advises a function-call or dedicated agent key, never an owner key.

## Features

- **Open and answer cases:** Lets agents file claims with evidence and respond.
- **Payment checks:** Verifies NEAR, ft_transfer or x402 payments by hash.
- **Verdict verification:** Re-runs the 2-of-3 signature check on chain.
- **Spend limits:** Caps stakes, total budget and counterparties.
- **Reputation lookup:** Shows an account's wins, losses and appeals.

## Good for

- Open a dispute against a counterparty agent
- Check an x402 payment before citing it
- Verify a verdict on chain
- Look up an agent's record before paying

## Install

### Claude Code (Terminal)

```sh
claude mcp add psephex --env NEAR_PRIVATE_KEY='<NEAR_PRIVATE_KEY>' -- npx -y @unitynodes/psephex-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "psephex": {
      "command": "npx",
      "args": [
        "-y",
        "@unitynodes/psephex-mcp"
      ],
      "env": {
        "NEAR_PRIVATE_KEY": "<NEAR_PRIVATE_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "psephex": {
      "command": "npx",
      "args": [
        "-y",
        "@unitynodes/psephex-mcp"
      ],
      "env": {
        "NEAR_PRIVATE_KEY": "<NEAR_PRIVATE_KEY>"
      }
    }
  }
}
```

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

```json
{
  "servers": {
    "psephex": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@unitynodes/psephex-mcp"
      ],
      "env": {
        "NEAR_PRIVATE_KEY": "<NEAR_PRIVATE_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "psephex": {
      "command": "npx",
      "args": [
        "-y",
        "@unitynodes/psephex-mcp"
      ],
      "env": {
        "NEAR_PRIVATE_KEY": "<NEAR_PRIVATE_KEY>"
      }
    }
  }
}
```

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

```json
{
  "mcpServers": {
    "psephex": {
      "command": "npx",
      "args": [
        "-y",
        "@unitynodes/psephex-mcp"
      ],
      "env": {
        "NEAR_PRIVATE_KEY": "<NEAR_PRIVATE_KEY>"
      }
    }
  }
}
```

## Tools

- `open_case`: Claimant opens a case with claim, evidence, counterparty and stake.
- `respond`: Counterparty answers before the deadline.
- `submit_case`: Sends an unanswered case to the oracle.
- `get_case`: Reads a case.
- `list_cases`: Lists cases.
- `check_payment`: Checks a payment by transaction hash as an evidence line.
- `verify_verdict`: Re-runs the 2-of-3 signature check on chain.
- `reputation`: Shows an account's record.
- `court_config`: Shows court parameters and stake cap.

## FAQ

### Is it safe to give it a key?

Use a function-call or dedicated agent key, never an owner key, and set the stake and budget caps.

### Can it run read-only?

Yes, without account credentials.

### Which network does it use?

NEAR testnet in this release.

### What do I need to run it?

Node 22.12 or newer and the @unitynodes/psephex-mcp package.

### Is Psephex free?

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

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

Run this command in your terminal: claude mcp add psephex --env NEAR_PRIVATE_KEY='<NEAR_PRIVATE_KEY>' -- npx -y @unitynodes/psephex-mcp

### What are the best alternatives to Psephex?

The closest alternatives to Psephex are Solana MCP by Vybe, Tapetide - Indian Stock Market MCP, Budget Tracker, Quantivex Research and Provyan.

## Alternatives

- [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.
- [Budget Tracker](https://ai-powered.com/mcp/budget-tracker-2): Budget Tracker is a freemium MCP server for finance and payments.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.
- [TribuJus](https://ai-powered.com/mcp/tribujus): TribuJus is an open-source MCP server for legal and government.
- [L2WS](https://ai-powered.com/mcp/l2ws): L2WS is a paid MCP server for finance and payments.
- [Invoices](https://ai-powered.com/mcp/invoices): Invoices is a paid MCP server for files and documents.

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