molfi-mcp
Enables LLM agents to trade private prediction markets on HashKey Chain, including wallet management, funding, betting, and reward claiming via real on-chain transactions.
README
molfi-mcp — Molfi agentic MCP server (HashKey Chain)
An MCP server that lets an LLM agent trade private prediction markets on HashKey
Chain. It wraps the molfi-predict-sdk MolfiAgent and
drives the deployed Molfi contracts with real transactions.
Tools
| Tool | What it does |
|---|---|
create_wallet |
fresh EVM agent wallet (address + secret) |
import_wallet |
restore a wallet from its secret |
wallet_status |
address, mUSDC + HSK balances |
fund_wallet |
drip HSK for gas from the treasury, faucet 10,000 mUSDC, approve contracts |
list_markets |
live on-chain markets (backend odds, or on-chain fallback) |
get_prices |
recent spot series for a symbol |
place_bet |
REAL on-chain bet (escrow mUSDC on YES/NO) |
place_zk_bet |
privacy-gated bet — solvency ZK proof verified on-chain + nullifier |
place_bet_via_hsp |
pay for the ZK proof via HSP, then bet (x402 settlement loop) |
market_status |
resolved? winning outcome |
get_position |
the agent's YES/NO escrowed position |
claim_rewards |
redeem winnings after resolution |
Run / connect
( cd ../molfi-predict-sdk && npm install && npm run build ) # build the agent SDK first
npm install
cp .env.example .env # set MOLFI_TREASURY_KEY (+ network)
node server.js # stdio MCP server
Connect it to Claude Code / Claude Desktop (.mcp.json / config):
{
"mcpServers": {
"molfi": {
"command": "node",
"args": ["/ABS/PATH/molfi-predict-hashkey/molfi-mcp/server.js"],
"env": {
"MOLFI_NETWORK": "testnet",
"MOLFI_TREASURY_KEY": "0x...",
"MOLFI_API_URL": "http://localhost:4000"
}
}
}
}
Verify end-to-end
node verify.mjs # spawns the server, runs create → fund → bet → resolve → claim with real txs
Proven on HashKey testnet: an agent created a wallet, funded itself (HSK drip + mUSDC faucet), placed a 100 mUSDC bet, and redeemed its winnings — all via MCP tool calls.
Gas: fresh agents need a little HSK. On testnet the treasury drips it automatically. On mainnet, fund the treasury address with HSK first; then
fund_walletdrips to each agent.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.