
Company News
AWS Security Hub Adds Socket for Supply Chain Security
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.
polymarket-guard-mcp
Advanced tools
MCP server for Polymarket prediction markets — buy/sell positions with USDC pay-per-call billing via LemonCake
Buy/sell positions on Polymarket prediction markets, paying in USDC with per-call billing via LemonCake. Read-only mode works with no credentials.
npx polymarket-guard-mcp
Or add to your MCP client (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"polymarket": {
"command": "npx",
"args": ["-y", "polymarket-mcp"],
"env": {
"POLYMARKET_PRIVATE_KEY": "0x<your-polygon-private-key>",
"LEMONCAKE_SELLER_KEY": "<your-lemoncake-seller-key>"
}
}
}
}
| Variable | Required | Description |
|---|---|---|
POLYMARKET_PRIVATE_KEY | For trading | Polygon wallet private key (0x-prefixed 32-byte hex). Required for positions, balance, and all trading tools. |
LEMONCAKE_SELLER_KEY | Optional | LemonCake seller key. Absent = Demo Mode (charges logged, no real billing). |
LEMON_CAKE_PERMIT | Optional | Client's ERC-2612 permit blob for non-custodial billing. Passed by the MCP client automatically when using LemonCake. |
get_positions, get_balance, get_trade_history) require POLYMARKET_PRIVATE_KEY.POLYMARKET_PRIVATE_KEY.LEMONCAKE_SELLER_KEY is absent — all tools still execute, charges are logged to stderr only.| Tool | Description |
|---|---|
list_markets | List active Polymarket markets with prices and volume |
search_markets | Search markets by keyword |
get_market | Get full market details by condition ID or slug |
get_order_book | Get live bid/ask order book for a market token |
| Tool | Description |
|---|---|
get_positions | Your current open positions (shares held, P&L) |
get_balance | USDC balance and contract allowances |
get_trade_history | Past trades with prices and timestamps |
| Tool | Description |
|---|---|
place_market_order | Buy/sell at market price (FOK with slippage tolerance) |
place_limit_order | Place a GTC/FOK/IOC limit order at a specific price |
cancel_order | Cancel an open limit order by ID |
redeem_positions | Claim USDC winnings from resolved markets |
# Find markets about the 2024 US election
search_markets(query="US election 2024")
# Get the order book for a specific outcome token
get_order_book(token_id="0x...")
# Check your current positions
get_positions()
# Buy 100 YES shares on a market (limit order at 0.65 = 65 cents/share)
place_limit_order(
token_id="0x...",
side="BUY",
price=0.65,
size=100
)
# Buy using market order with 2% slippage tolerance
place_market_order(
token_id="0x...",
side="BUY",
amount=50 # $50 USDC
)
# Claim winnings after market resolves
redeem_positions(condition_id="0x...")
gamma-api.polymarket.com)clob.polymarket.com) with L1 EIP-712 auth@lemon-cake/mcp-sdk)Polymarket's CLOB API uses L1 auth: EIP-712 typed-data signatures over each request. This implementation includes the complete request structure. For full production signing (real orders), install ethers and integrate the Wallet.signTypedData() method — the current build uses a placeholder signature that will receive a 401 from the CLOB for authenticated endpoints.
Full signing integration:
npm install ethers
import { ethers } from "ethers";
const wallet = new ethers.Wallet(process.env.POLYMARKET_PRIVATE_KEY!);
const sig = await wallet.signTypedData(domain, types, value);
| Action | Cost |
|---|---|
| Browsing markets | Free |
| Checking positions / balance | $0.05 USDC |
| Placing / cancelling orders | $0.10 USDC |
| Claiming winnings | $0.10 USDC |
Billing is handled by LemonCake — USDC pay-per-call infrastructure for MCP tools. No subscription, no monthly fees. You pay only when you call a tool.
MIT
FAQs
MCP server for Polymarket prediction markets — buy/sell positions with USDC pay-per-call billing via LemonCake
The npm package polymarket-guard-mcp receives a total of 13 weekly downloads. As such, polymarket-guard-mcp popularity was classified as not popular.
We found that polymarket-guard-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket is now in the AWS Security Hub Extended plan. Adopt it through AWS, apply committed spend, and block malicious open source packages.

Research
/Security News
Popular npm packages keyv and cacheable compromised.

Security News
A misconfiguration gave three Anthropic models internet access, and one, believing it was in a simulation, shipped a credential-stealing package to PyPI.