# Comovis/MarketMayhem-MCP [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/Comovis/MarketMayhem-MCP  
**GitHub Stars:** 0  
**npm Downloads (last month):** 490  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/comovis-marketmayhem-mcp

## Description
Launch and trade BSC tokens on Market Mayhem. Your own wallet signs; dry run by default; spend caps.

## Tools
Capabilities this server exposes over MCP:

- **get_settings** — The live network, contracts, fees and pair currencies Market Mayhem uses. Read this first.
- **new_launches** — Tokens launched on Market Mayhem, newest first. Pass `after` (a block from the previous answer's `next`) to get only what launched since.
- **list_tokens** — Tokens launched elsewhere that trade on BNB Chain with a real market ($10K+ liquidity, traded in the last 7 days), deepest first, each with its main pool. For a token picker or to suggest what to trade; any other token still works by address with get_token and quote.
- **get_token** — Any BNB Chain token: its symbol, name, pool, pool kind, fee tier, pair currency, measured taxes, and whether it launched on Market Mayhem (`ours`). Use quote for a price.
- **quote** — What a buy or a sell of any BNB Chain token would get right now, through the pool that pays most (`bestPrice` says which and by how much), with the price impact, taxes and the site fee. Refused past 50% price impact unless maxPriceImpactPct allows more. Sends nothing.
- **buy** — Buy any BNB Chain token. Pays BNB (or, for a token launched here in another pair, that currency); a token pooled against USDT or similar is reached with BNB in one transaction. DRY RUN unless the owner set MM_LIVE=1; always within the owner's caps and allowlist.
- **sell** — Sell any BNB Chain token for BNB (or, for a token launched here in another pair, that currency). Give `amount` (whole tokens) or `percent` of what the wallet holds. DRY RUN unless MM_LIVE=1.
- **launch_token** — Launch a new token on Market Mayhem (a PancakeSwap V3 pool, liquidity locked for ever). Optional first buy in the same transaction, split across up to 8 wallets (e.g. the dead address to burn). DRY RUN unless MM_LIVE=1.
- **twap** — Buy or sell a token over time in slices (a TWAP), never more than limitPct (default 5, at most 25) worse than now; slices past it wait. The trade keeper runs the slices. DRY RUN unless MM_LIVE=1; a buy counts against the caps.
- **cancel_twap** — Cancel a TWAP order of this wallet: what it has not spent and the unused gas come back. DRY RUN unless MM_LIVE=1.
- **twap_orders** — TWAP orders by owner (default: this agent's wallet) or by token, with progress and the keeper's view (paused past its limit, needs gas…).
- **place_order** — A limit buy, take-profit, stop-loss or bracket at multiples of today's price (limit < 1, take-profit > 1, stop < 1). An order is a signature, filled by the keeper when the price gets there. A limit buy spends WBNB/USDT (wrap first) and counts against the caps. DRY RUN unless MM_LIVE=1.
- **my_orders** — This agent's orders, open first, with their status (waiting, filled, missed-floor…). Needs MM_API_KEY made by the agent's wallet: stop prices are private.
- **cancel_order** — Cancel one of this agent's orders, free and at once (both legs of a bracket). Needs MM_API_KEY made by the agent's wallet.
- **lock_tokens** — Lock any BEP-20 in the Mayhem Token Locker: a timelock for `days`, or vesting after `cliffDays`. The fee (BNB) counts against the caps. DRY RUN unless MM_LIVE=1.
- **withdraw_lock** — Withdraw what one of this wallet's locks has released (all of it, or `amount`). DRY RUN unless MM_LIVE=1.
- **locks** — Token locks by token (with how much of its supply is locked, counting only locks its owner paid for) or by owner (default: this agent's wallet), with live balances.
- **tx_status** — Where a transaction is: pending, mined, or indexed (visible on the site and in the API).
- **my_referral_earnings** — What a wallet has earned as a referrer: paid inside trades, and the lifetime weekly share. Defaults to the agent's wallet.
- **my_cashback** — A wallet's cashback, paid weekly in $MAYHEM: its rate (a share of the site fee it paid; higher for wallets that came through a referral link), this week so far, and weeks ready to claim. Defaults to the agent's wallet.
- **claim_cashback** — Claim every week of cashback ready for this agent's wallet, in one transaction, paid to the wallet. Spends nothing but gas. DRY RUN unless MM_LIVE=1.
- **referral_link** — A referral link for a wallet: anyone who trades through it pays that wallet a share of the fee, for life. Defaults to the agent's wallet.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "marketmayhem-mcp": {
    "command": "npx",
    "args": ["-y","@marketmayhem/mcp"]
  }
}
```

## Documentation & README

# @marketmayhem/mcp

Market Mayhem for AI agents: launch and trade BSC tokens through an MCP server.

- **Your wallet signs, locally.** The key never leaves this process. Market Mayhem's API builds and simulates each transaction; this server checks it against your limits and signs it.
- **Dry run by default.** Until you set `MM_LIVE=1`, every tool says exactly what it would do and signs nothing.

**No install at all?** Add `https://marketmayhem.co/api/mcp` as a connector in Claude, ChatGPT or any MCP client. That hosted server reads and prepares trades; the person confirms each one in their own wallet on marketmayhem.co. This package is for an agent with its own wallet.

Docs: [marketmayhem.co/developers](https://marketmayhem.co/developers/) · For AIs: [marketmayhem.co/llms.txt](https://marketmayhem.co/llms.txt)

## Tools

| Tool | What it does |
|---|---|
| `get_settings` | The network, contracts, fees and pair currencies. Read first. |
| `new_launches` | Tokens launched, newest first. Pass `after` to get only new ones. |
| `get_token` | One token: pool, fee tier, pair currency, creator. |
| `quote` | What a buy or sell would get now, with price impact and fee. |
| `buy` / `sell` | Trade, within your caps and allowlist. `sell` takes `amount` or `percent`. |
| `launch_token` | Launch a token, with an optional first buy split across up to 8 wallets (the dead address burns), and `burnPct` for the royalty. |
| `tx_status` | Pending, mined or indexed. |
| `my_referral_earnings` / `referral_link` | Earn a share of the fee on every trade your link brings, for life. |

Errors come back as `{ error, message, fix }`, so the agent can correct itself.

## Setup

Claude Desktop (`claude_desktop_config.json`), Cursor, or any MCP client:

```json
{
  "mcpServers": {
    "marketmayhem": {
      "command": "npx",
      "args": ["-y", "@marketmayhem/mcp"],
      "env": {
        "MM_PRIVATE_KEY": "0x… the agent's own wallet",
        "MM_MAX_PER_TX": "BNB:0.05",
        "MM_MAX_PER_DAY": "BNB:0.25"
      }
    }
  }
}
```

Claude Code: `claude mcp add marketmayhem -e MM_PRIVATE_KEY=0x… -- npx -y @marketmayhem/mcp`

## Settings

| Variable | Default | Meaning |
|---|---|---|
| `MM_LIVE` | unset (dry run) | `1` lets the agent send. |
| `MM_PRIVATE_KEY` | — | The agent's own wallet. Use a wallet made for it, holding only what it may spend. |
| `MM_WALLET` | — | Without a key: an address to dry run as. It can never send. |
| `MM_MAX_PER_TX` | `BNB:0.05` | The most one transaction may spend, per currency (`BNB:0.05,USDT:50`). |
| `MM_MAX_PER_DAY` | `BNB:0.25` | The most per UTC day, per currency. A currency with no cap cannot be spent. |
| `MM_ALLOW_TOKENS` | any | Comma-separated tokens the agent may buy or sell. |
| `MM_API_KEY` | — | Your API key: higher limits, and your wallet becomes the default referrer on every trade. |
| `MM_API_URL` | `https://marketmayhem.co/api/v1` | The API. |
| `MM_RPC_URL` | a public BSC node | The node transactions are sent through. |
| `MM_STATE_DIR` | `~/.marketmayhem-mcp` | Where today's spend is kept, so a restart can't reset the daily cap. |

A sell spends no money, so only the allowlist applies to it. A first-time sale sends the one-time approvals first, then the trade.

