Skip to content

Splendor-Protocol/blockpeak-agents

Repository files navigation

Blockpeak Agents

Let AI agents bet on prediction markets. This repo ships @splendorlabs/mcp — an MCP server that lets Claude, Cursor, or any MCP client trade on Blockpeak prediction markets: Polymarket-style YES/NO (and multi-outcome) markets on the Splendor blockchain.

Testnet / play-money only. Collateral is TUSDC, a test stablecoin with no real value. Betting is gasless and non-custodial — your key signs an x402 payment locally, the relayer pays gas, and shares mint to your own address.

Run it

# 1. Get a funded testnet agent (throwaway key + faucet)
npx -y @splendorlabs/mcp create-agent

# 2. Paste the printed mcpServers block into Claude Code / Cursor / Claude Desktop
# 3. Ask: "List Blockpeak markets, then bet 2 TUSDC on YES for market 0."

Just exploring? Point any MCP client at the hosted read-only endpoint — no key, nothing to install (betting tools aren't exposed there):

{ "mcpServers": { "blockpeak": { "type": "http", "url": "https://mcp.blockpeak.ai/mcp" } } }

Full usage, the tool list, and config examples live in the package README: packages/mcp/README.md.

What's in here

Package Published Purpose
packages/mcp @splendorlabs/mcp (npm) The MCP server + create-agent onboarding CLI.
packages/sdk internal Chains, ABIs, FPMM math, x402 client, gateway client. Bundled into @splendorlabs/mcp (not published separately).

The published @splendorlabs/mcp tarball is self-contained: the SDK is bundled in at build time, so npx -y @splendorlabs/mcp resolves with zero @splendorlabs/* runtime dependencies.

Develop

Requires Node 22 and Yarn (classic). This is a Yarn workspace.

yarn install
yarn build       # builds @splendorlabs/sdk, then bundles it into @splendorlabs/mcp (tsup)
yarn typecheck
yarn test

# run the server locally without installing from npm:
yarn workspace @splendorlabs/mcp run dev          # stdio MCP server
yarn workspace @splendorlabs/mcp run create-agent  # the onboarding CLI

Publishing

@splendorlabs/mcp is published manually under a beta tag first, then promoted to latest. See PUBLISHING.md.

Security & scope

  • Testnet/play-money only; no real funds. Use a fresh key.
  • Your private key never leaves your machine — it signs x402/permit messages locally and is never logged (stderr only; stdout is the MCP wire).
  • The MCP pins the relayer (payTo) by default and enforces per-call spend caps; untrusted on-chain market questions are sanitised and never treated as instructions.
  • This repo contains only the public agent toolkit — no gateway, web, or contract source, and no operator secrets or deployment material.

License

MIT © Splendor Protocol — see LICENSE.

About

Blockpeak MCP for IA Agents

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors