# Lockout MCP

> Lockout MCP is an MCP server for finance and payments. MCP server letting an AI agent read, preview and trade tokenized stocks inside. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Platforms:** CLI, API, Self-hosted
- **Repository:** https://github.com/lockoutgate/lockout/tree/HEAD/mcp
- **MCP Registry name:** io.github.lockoutgate/lockout-mcp
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments)
- **Listing updated:** 2026-11-28

## About

Lockout MCP gives an agent seven tools for a single Lockout account on Robinhood Chain. The account owner sets the trading rules up front, including a loss limit, size caps, a halt bell and a bond, and the agent works within them. Before anything is sent, the agent can preview each buy or sell against the account's own gates and see the verdict.

Orders are signed with a separate agent key kept on the local machine and sent through the same buy and sell functions the owner uses. Each result is read from the transaction receipt and reported as executed, halted by the loss limit, or reverted at a numbered gate. The server cannot loosen the owner's rules, and the agent key cannot call owner-only functions.

It suits developers and traders who want an AI agent to place stock-token orders under hard, on-chain limits, and who need a clear record of why each trade filled or was refused.

## Features

- **Account-level preview:** Each buy or sell is checked against the account's gates and returned as a verdict before any transaction is sent.
- **Receipt-based outcomes:** Results are taken from the on-chain receipt, distinguishing executed trades, loss-limit halts and gate reverts.
- **Owner-sealed rules:** Loss limits, size caps and the halt bell are set by the account owner, and the server cannot loosen them.
- **Separate agent key:** Trades are signed with a dedicated agent key that cannot call owner-only functions or withdraw funds.
- **Pool quotes:** Orders are simulated across every listed pool so the best output can be chosen, with distance from the feed price shown.
- **Local transaction journal:** An optional JSONL file records each sent transaction's hash and outcome, including reverted ones.

## Good for

- Let an AI agent preview and place stock-token buys and sells under owner-set loss limits
- Check whether a planned order would pass the account's gates before sending it
- Review the outcome of past trades from receipts and a local transaction log
- Build an automated trading workflow with hard on-chain risk controls

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add lockout-mcp --env LOCKOUT_FACTORY='<LOCKOUT_FACTORY>' --env LOCKOUT_LENS='<LOCKOUT_LENS>' --env LOCKOUT_ACCOUNT='<LOCKOUT_ACCOUNT>' -- npx -y lockout-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add lockout-mcp --env LOCKOUT_FACTORY='<LOCKOUT_FACTORY>' --env LOCKOUT_LENS='<LOCKOUT_LENS>' --env LOCKOUT_ACCOUNT='<LOCKOUT_ACCOUNT>' -- npx -y lockout-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.lockout-mcp]
command = "npx"
args = ["-y", "lockout-mcp"]
env = { LOCKOUT_FACTORY = "<LOCKOUT_FACTORY>", LOCKOUT_LENS = "<LOCKOUT_LENS>", LOCKOUT_ACCOUNT = "<LOCKOUT_ACCOUNT>" }
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Or run: gemini mcp add -s user -e LOCKOUT_FACTORY='<LOCKOUT_FACTORY>' -e LOCKOUT_LENS='<LOCKOUT_LENS>' -e LOCKOUT_ACCOUNT='<LOCKOUT_ACCOUNT>' lockout-mcp npx -- -y lockout-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "lockout-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "lockout-mcp"
      ],
      "env": {
        "LOCKOUT_FACTORY": "<LOCKOUT_FACTORY>",
        "LOCKOUT_LENS": "<LOCKOUT_LENS>",
        "LOCKOUT_ACCOUNT": "<LOCKOUT_ACCOUNT>"
      }
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 3 of 7 tools read data; 4 names don't say. From the server's own tool labels and tool names; not verified by us.

- `account_status` (name suggests: reads): Returns the session, bell, rules, positions and loss left before the limit.
- `markets`: Lists stocks and pools, feed age, pause flags and the next mint window change.
- `quote`: Simulates an order on every listed pool, best output first.
- `preview_buy` (name suggests: reads): Returns the account's verdict on one buy, with no transaction.
- `preview_sell` (name suggests: reads): Returns the account's verdict on one sell, with no transaction.
- `buy`: Sends a buy with the agent key and returns its verdict from the receipt.
- `sell`: Sends a sell with the agent key and returns its verdict from the receipt.

## FAQ

### What does the agent key allow Lockout MCP to do?

It can call only buy and sell. Owner functions such as seal, withdraw and setAgent revert, and the key cannot receive tokens.

### Are orders sent even if the preview predicts a rejection?

Yes. A predicted rejection is still sent, because the reverted transaction is the account's on-chain answer. Every sent transaction costs gas.

### What is needed to run the server?

Node.js 20 or newer, a Lockout account with the agent address set, the factory and lens addresses, and a local agent key file for trading. It runs over stdio.

### Which network does Lockout MCP use?

Robinhood Chain, chain ID 4663, with a public RPC endpoint that can be replaced in settings.

### How do I add Lockout MCP to Claude Code?

Run this command in your terminal: claude mcp add lockout-mcp --env LOCKOUT_FACTORY='<LOCKOUT_FACTORY>' --env LOCKOUT_LENS='<LOCKOUT_LENS>' --env LOCKOUT_ACCOUNT='<LOCKOUT_ACCOUNT>' -- npx -y lockout-mcp

### What are the best alternatives to Lockout MCP?

The closest alternatives to Lockout MCP are Hood MCP, Robinhood Crypto, AI Agent Tokenized Stock OS, Cluster MCP and Monad MCP.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Hood MCP](https://ai-powered.com/mcp/hood-mcp): Hood MCP is an open-source MCP server for finance and payments.
- [Robinhood Crypto](https://ai-powered.com/mcp/robinhood-crypto): Robinhood Crypto is an open-source MCP server for finance and payments.
- [AI Agent Tokenized Stock OS](https://ai-powered.com/mcp/ai-agent-tokenized-stock-os): AI Agent Tokenized Stock OS is a paid MCP server for finance and payments.
- [Cluster MCP](https://ai-powered.com/mcp/cluster-mcp): Cluster MCP is an open-source MCP server for finance and payments.
- [Monad MCP](https://ai-powered.com/mcp/monad-mcp): Monad MCP is an open-source MCP server for finance and payments.
- [ostraagent](https://ai-powered.com/mcp/ostraagent): ostraagent is an MCP server for finance and payments.
- [ZK Provenance, RFC 9421 Web Bot Auth & Counterparty KYB MCP](https://ai-powered.com/mcp/zk-provenance-rfc-9421-web-bot-auth-and-counterparty-kyb-mcp): ZK Provenance, RFC 9421 Web Bot Auth & Counterparty KYB MCP is a freemium MCP server for finance and payments.
- [Openmm MCP](https://ai-powered.com/mcp/openmm-mcp): Openmm MCP is an open-source MCP server for finance and payments.

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