signer-mcp

signer-mcp

Keyless CEX/DEX order signing for AI trading agents (Binance, OKX, Bybit, KuCoin, Hyperliquid, Asterdex). Exchange keys stay inside an AWS Nitro Enclave — the agent gets policy-bounded signatures, never credentials. Built to survive prompt injection and supply-chain key leaks.

Category
Visit Server

README

@usenami/signer-mcp

Sign CEX orders from any MCP-aware AI agent — keys never leave an AWS Nitro Enclave.

signer-mcp is the public face of Usenami Signer. It gives Claude Desktop, Cursor, ElizaOS, and any other MCP-aware client a five-tool surface for trading real CEX/DEX perp accounts (Binance, OKX, Asterdex, KuCoin, Bybit, Hyperliquid) without ever loading a private key into the agent's process — or yours.

Status: v0 (alpha). List of venues, attestation, account read, and place/cancel order on testnet.


Why this exists

Every agent framework that touches a CEX today loads the API key into the agent process. That puts the secret on disk, in env vars, in npm packages, in prompt-engineered tool calls, and in your shell history. One prompt injection, one supply-chain compromise, one accidental log line, one curious co-worker — and the key leaks.

Signer takes the opposite approach. The signing key is generated inside an AWS Nitro Enclave attested by AWS itself. The enclave's measurement (PCR0) is published on https://usenami.io/signer/attestations. The MCP server you install here can ask the enclave to sign a specific order — bounded by an explicit policy (per-asset cap, per-period cap, allowed venues) — but it cannot read the key. Neither can the agent, your laptop, your IaC, or our own engineers.

If the agent gets compromised, the worst it can do is place orders inside your policy window. The key itself stays attested.


Quick start (Claude Desktop)

  1. Get a token. Sign in at usenami.io/signer and create an API token. The token is bound to a single policy — set per-venue caps before generating it.

  2. Edit claude_desktop_config.json. Path is ~/Library/Application Support/Claude/claude_desktop_config.json on macOS.

    {
      "mcpServers": {
        "signer": {
          "command": "npx",
          "args": ["-y", "@usenami/signer-mcp"],
          "env": {
            "SIGNER_GATEWAY_URL": "https://signer.usenami.io",
            "SIGNER_API_TOKEN": "sk_live_..."
          }
        }
      }
    }
    
  3. Restart Claude Desktop and look for the 🔌 plug icon. You should see five tools listed under signer.

  4. Try the read-only tools first. Ask Claude:

    "List the venues available through Signer, then return the current attestation document."

    No funds at risk — these don't sign anything.

  5. Once you trust the attestation, place a tiny test order:

    "Get my Binance account, then if I have at least $20 of free margin, place a market buy for 0.001 BTC."

If anything looks wrong, the agent can call cancel_order immediately.


Quick start (ElizaOS)

ElizaOS agents reach Signer through the generic MCP plugin @elizaos/plugin-mcp — no Signer-specific plugin required (a native @usenami/eliza-plugin-signer may come later). Add the plugin and point it at the package over stdio:

npm install @elizaos/plugin-mcp

Then in your character / agent config:

{
  "plugins": ["@elizaos/plugin-mcp"],
  "settings": {
    "mcp": {
      "servers": {
        "signer": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "@usenami/signer-mcp"],
          "env": {
            "SIGNER_GATEWAY_URL": "https://signer.usenami.io",
            "SIGNER_API_TOKEN": "sk_live_..."
          }
        }
      }
    }
  }
}

The agent now exposes the same five tools (list_venues, get_attestation, get_account, place_order, cancel_order). Same trust model: the signing key never enters the Eliza process — start the agent on the read-only tools (list_venues / get_attestation) and verify the attestation before letting it place orders.


Configuration

Environment variables passed via the env block of claude_desktop_config.json (or your client's equivalent):

Variable Required Default Notes
SIGNER_GATEWAY_URL no https://signer.usenami.io Override for self-hosted or staging deployments.
SIGNER_API_TOKEN yes (for paid tools) — Bearer token issued by usenami.io/signer. list_venues works without one; everything else requires it.
SIGNER_FETCH_TIMEOUT_MS no 30000 Per-request fetch timeout in ms. Lower for CI / smoke tests; raise on slow links. Must be positive integer.

The MCP server itself stores nothing on disk. Tokens are read from environment on startup and held in memory for the lifetime of the process — kill the agent, the token goes with it.


Tool reference

list_venues

Returns the static manifest of venues this Signer can sign for. Read-only, does not contact the gateway, works without a token. Call this first to discover what's supported.

{
  "venues": [
    {
      "venue": "binance",
      "asset_class": "perp",
      "auth_scheme": "hmac_sha256",
      "notes": "..."
    }
  ],
  "count": 6
}

Supported venues

venue id asset class auth scheme symbol example notes
binance perp hmac_sha256 BTCUSDT Binance USD-M futures
okx perp hmac_sha256 BTC-USDT-SWAP OKX perpetual swap
asterdex perp eip712 (bsc) BTC-USD Asterdex on-chain perp (BSC)
kucoin perp hmac_sha256 XBTUSDTM KuCoin Futures (HMAC + encrypted passphrase); qty in contracts
bybit perp hmac_sha256 BTCUSDT Bybit V5 linear (category=linear)
hyperliquid_main perp eip712 (hyperliquid) BTC Hyperliquid L1 perp; account read is the public clearinghouseState

The agent config block is identical for every venue — point SIGNER_GATEWAY_URL at your Signer and set SIGNER_API_TOKEN. Which venues a given token may trade is bound server-side to that token's policy; list_venues reports the full set the gateway can sign, not your per-token allow-list.

get_attestation

Returns the Nitro attestation document for the currently-running enclave. The PCR0 measurement here is what AWS signed when it booted the enclave; you can verify it matches the published build by hashing the corresponding EIF and comparing.

{
  "pcr0": "...sha384 hex...",
  "pcr1": "...",
  "pcr2": "...",
  "signature": "...AWS-issued...",
  "issued_at": "2026-05-31T18:00:00Z"
}

Read-only.

get_account

Returns equity, free margin, and open positions for a venue.

{
  "venue": "binance",
  "equity_usd": 145.32,
  "free_margin_usd": 92.10,
  "positions": [
    { "symbol": "BTCUSDT", "qty": 0.002, "entry_price": 67120.5 }
  ],
  "updated_at": "2026-05-31T18:01:11Z"
}

Read-only. Requires SIGNER_API_TOKEN.

place_order

Place a single market or limit order. The enclave signs the payload after checking policy caps.

Args:

  • venue — one of binance | okx | asterdex | kucoin | bybit | hyperliquid_main
  • symbol — venue-native symbol (BTCUSDT, BTC-USDT-SWAP, XBTUSDTM, BTC, etc. — see the venue table above)
  • side — buy | sell
  • qty — base-asset quantity (e.g. 0.001 for 0.001 BTC). Not USD-notional.
  • type — market | limit
  • price — required if type=limit, ignored if type=market
  • policy_id — optional override; defaults to the policy bound to your token
{
  "venue": "binance",
  "order_id": "...",
  "status": "FILLED",
  "filled_qty": 0.001,
  "avg_fill_price": 67128.9,
  "policy_id": "default",
  "attested_at": "..."
}

Destructive. Requires SIGNER_API_TOKEN. v0 routes Binance/OKX to testnet until pilot graduates.

cancel_order

Cancels an outstanding order by its venue order id. Idempotent — cancelling an already-filled or non-existent order returns ok: false with a venue reason instead of erroring.

Args:

  • venue — same enum as place_order
  • order_id — the venue id returned by place_order

Requires SIGNER_API_TOKEN.


Verifying the attestation

A trustworthy Signer is one whose enclave measurement matches a build you can audit. The workflow:

  1. Call get_attestation and copy the returned pcr0.
  2. Visit usenami.io/signer/attestations.
  3. Cross-reference the PCR0 against the published build for the current production version.
  4. Optionally rebuild the EIF from source (instructions on the same page) and verify the SHA384 hash yourself.

If the published PCR0 doesn't match what get_attestation returns, don't trade. Open an issue.


What v0 deliberately does NOT do

v0 keeps the surface deliberately tight:

  • No multi-tenant: one account per venue per token.
  • No UPL editing UI: policies are set out-of-band on usenami.io/signer.
  • No WebSocket / streaming tools — REST only.
  • No cross-venue routing (place_order takes one venue).
  • No leverage configuration (set_leverage) — uses account defaults.
  • No withdrawals / transfers (closest is cancel_order).
  • No TWAP / iceberg — single-shot orders only.
  • stdio transport only — no SSE or remote HTTP.

If you need any of the above, file an issue describing the use case. v0 keeps the surface tight on purpose.


Development

# install deps
npm install

# typecheck + build
npm run build

# run from source against staging
SIGNER_GATEWAY_URL=https://staging.signer.usenami.io \
SIGNER_API_TOKEN=sk_test_... \
npm run dev

The transport is stdio; you'll need an MCP-aware client to actually exercise the tools. The Anthropic mcp-inspector is the fastest way to poke at it locally.


License

MIT. See LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured