@frontierfun/mcp-server
v1.1.0
Published
MCP server for the Frontier launchpad — launch and trade coins from Claude Code, Cursor, Windsurf, or any MCP-compatible client
Readme
@frontierfun/mcp-server
MCP (Model Context Protocol) server for Frontier, the coin launchpad on Robinhood Chain. Launch and trade coins from Claude Code, Cursor, Windsurf, Cline, or any MCP-compatible client.
A coin on Frontier either sells along a bonding curve and graduates into its own locked Uniswap V4 pool, or launches instantly straight into that pool. Creators pick the pool fee model, the extensions (dynamic fee, sniper tax, maturity curve, fee recipients) and an optional staking vault at creation; the rules are frozen afterwards and liquidity is locked forever.
This server uses the McpServer class with per-tool registerTool() registration, Zod input schemas, and behavioral annotations on all 84 tools. It is a thin adapter over @frontierfun/sdk: the SDK owns every tool definition and the execution logic.
Requirements
- Node.js >= 24
- An RPC endpoint for Robinhood Chain (chain id 4663) or Arbitrum Sepolia (421614, testnet). Public defaults are built in.
Installation
npm install -g @frontierfun/mcp-server
# or run directly
npx @frontierfun/mcp-serverSetup
Claude Code
Add to ~/.claude/mcp.json:
{
"mcpServers": {
"frontier": {
"command": "npx",
"args": ["@frontierfun/mcp-server"],
"env": {
"FRONTIER_KEYSTORE_PASSWORD": "your-strong-password",
"FRONTIER_RPC_URL": "https://rpc.mainnet.chain.robinhood.com"
}
}
}
}Cursor
Add to Cursor Settings > MCP Servers:
{
"frontier": {
"command": "npx",
"args": ["@frontierfun/mcp-server"],
"env": {
"FRONTIER_KEYSTORE_PASSWORD": "your-strong-password",
"FRONTIER_RPC_URL": "wss://robinhood-rpc.publicnode.com"
}
}
}Windsurf / Cline
Follow the same pattern: add an MCP server entry with the command npx @frontierfun/mcp-server and the environment variables you need.
Testnet
Set FRONTIER_CHAIN_ID=421614 to run against Arbitrum Sepolia. Every default (RPC, API, explorer, contract addresses) follows the chain id.
Zero configuration is valid: without a wallet the server starts in read-only mode on Robinhood Chain and every read tool works (quotes, coin state, pool state, portfolio, history).
Environment Variables
Wallet (one of them for write operations)
| Variable | Description |
| ---------------------------- | --------------------------------------------------------------------------------------- |
| FRONTIER_KEYSTORE_PASSWORD | Password for the encrypted keystore at ~/.frontier/agent-wallet.enc (recommended) |
| FRONTIER_PRIVATE_KEY | Agent wallet private key (hex). Migrated into the keystore when a password is also set |
Network
| Variable | Description | Default (Robinhood Chain) |
| ---------------------------- | -------------------------------------------------------------------- | ------------------------------------------ |
| FRONTIER_CHAIN_ID | 4663 Robinhood Chain (production) or 421614 Arbitrum Sepolia | 4663 |
| FRONTIER_RPC_URL | RPC endpoint (https:// or wss://; strategies require wss://) | https://rpc.mainnet.chain.robinhood.com |
| FRONTIER_API_BASE_URL | Frontier data API (coin list, extension catalog, image upload) | https://api.frontier.fun |
| FRONTIER_EXPLORER_URL | Block explorer origin for transaction links | https://robinscan.io |
| FRONTIER_REFERRAL_BASE_URL | App origin used by generate_referral_link (<base>?ref=<wallet>) | https://frontier.fun |
| FRONTIER_REFERRER_ADDRESS | Referrer for referral links and curve trades | agent wallet |
Contract address overrides (forks and custom deployments only)
Every address defaults from the SDK chain registry for FRONTIER_CHAIN_ID (a verified snapshot of the API's GET /chains). Override one at a time with:
FRONTIER_FACTORY_ADDRESS, FRONTIER_BONDING_CURVE_ADDRESS, FRONTIER_CURVE_MATH_ADDRESS, FRONTIER_HIGHLIGHTS_ADDRESS, FRONTIER_REFERRAL_ADDRESS, FRONTIER_VESTING_ADDRESS, FRONTIER_HOOK_ADDRESS, FRONTIER_LIQUIDITY_MANAGER_ADDRESS, FRONTIER_POOL_MANAGER_ADDRESS, FRONTIER_UNIVERSAL_ROUTER_ADDRESS, FRONTIER_QUOTER_ADDRESS, FRONTIER_POSITION_MANAGER_ADDRESS, FRONTIER_STATE_VIEW_ADDRESS, FRONTIER_PERMIT2_ADDRESS, FRONTIER_STAKING_VAULT_FACTORY_ADDRESS, FRONTIER_HARVESTER_ADDRESS, FRONTIER_POL_DISTRIBUTOR_ADDRESS, FRONTIER_CLONE_FACTORY_ADDRESS, FRONTIER_WETH_ADDRESS.
An unknown chain id or an invalid address aborts startup: the server never falls back to production addresses on the wrong network.
Transaction gate and server tuning
| Variable | Description | Default |
| ---------------------------------- | ------------------------------------------------------ | ------------------- |
| FRONTIER_MAX_TX_ETH | Max ETH per transaction (0.001-1000) | 1 |
| FRONTIER_DAILY_BUDGET_ETH | Rolling 24h ETH budget (0.01-10000) | 5 |
| FRONTIER_COOLDOWN_SECONDS | Min seconds between writes (>= 1) | 2 |
| FRONTIER_TOOL_TIMEOUT_MS | Per-tool execution timeout | 15000 |
| FRONTIER_CONFIG_POLL_INTERVAL_MS | Poll interval for config / strategy change notifications | 15000 |
| FRONTIER_AUDIT_DIR | JSONL audit log directory | ~/.frontier/audit |
The unprefixed names
PRIVATE_KEY,KEYSTORE_PASSWORD,RPC_URL,CHAIN_ID,MAX_PER_TX_ETH,DAILY_BUDGET_ETH,COOLDOWN_SECONDSandTOOL_TIMEOUT_MSare accepted as fallbacks;FRONTIER_*always wins. See.env.examplefor the full list.
Tool Annotations
All 84 tools are registered with MCP behavioral annotations that help clients understand tool behavior:
| Annotation | Description |
| ----------------- | --------------------------------------------------------------------------------------- |
| readOnlyHint | true if the tool does not modify on-chain or local state |
| destructiveHint | true if the tool spends ETH or modifies state irreversibly |
| idempotentHint | true if repeated calls with the same params produce the same result |
| openWorldHint | true if the tool interacts with external systems (blockchain RPC, Frontier API) |
MCP clients can use these annotations to filter, sort, or auto-approve tool calls. For example, a client may auto-approve all readOnlyHint: true tools while requiring confirmation for destructiveHint: true tools.
Annotation Categories
| Category | readOnly | destructive | idempotent | openWorld | Example Tools | | ------------------ | -------- | ----------- | ---------- | --------- | ----------------------------------------------------------------------------- | | Read (on-chain) | true | false | true | true | get_token_state, quote_buy, get_pool_state, preview_pool_fee, get_factory_params | | Read (API) | true | false | true | true | get_token_list, list_extensions, get_coin_extensions | | Read (local) | true | false | true | false | get_config, spending_stats, get_tx_history | | Read (strategy) | true | false | true | false | get_strategy_status, list_available_strategies | | Read (generate) | true | false | true | false | generate_referral_link, describe_protocol | | Write (ETH) | false | true | false | true | buy_token, pool_swap, deploy_token, set_fee_recipient, create_fee_recipient | | Write (value back) | false | false | false | true | sell_token, remove_liquidity, collect_fees, collect_pool_fees, claim_staking_rewards | | Write (approval) | false | false | true | true | approve_pool_sell | | Write (upload) | false | false | true | true | upload_image | | Config | false | false | true | false | update_config, update_tx_gate | | Config (strategy) | false | false | false | false | start_strategy, stop_strategy |
MCP Registry
The server includes a server.json file following the MCP Registry schema:
- Namespace:
io.github.camelotlabs/frontier-launchpad(reverse-DNS format) - Package:
@frontierfun/mcp-serveron npm - Environment variables: Documented in the registry metadata for automated setup
MCP Registry-compatible clients can discover and configure this server automatically using the server.json metadata.
Available Tools
The server exposes 84 tools (50 read, 30 write, 4 config). All tool names use snake_case (no prefix) and are the same identifiers the SDK and the OpenClaw plugin use. Every tool accepts token_identifier (address, symbol, or name) where a coin is needed. For the complete reference with parameters and return shapes, see API-REFERENCE.md.
Read (no gas): 48 tools
get_token_state: full coin state: launch mode, price, supply, curve TVL and params,isLPd/lpd_at/pool_id, fee recipient, fee config, graduation estimate, live pool blockquote_buy/quote_sell/calculate_cost: bonding-curve quotes (fee-inclusive, exact CurveMath)get_pool_state/get_pool_key/preview_pool_fee/quote_pool_swap: Uniswap V4 pool state, pool key/id, live hook fee preview, off-chain swap quote (pathv4-pool)get_balance/get_wallet_info/get_wallet_balances: ETH, WETH and coin balances, wallet modecheck_graduation: supply left, ETH needed, graduation payouts as configured todayget_factory_params/get_creation_fee/is_protocol_paused: live governance values (curve defaults and bounds, fee config, dev-buy cap, curve fee), creation fee, pause flaglist_extensions/get_coin_extensions/get_fee_recipient: hook extension catalog, what a coin bound, current fee recipientget_lp_positions: Uniswap V4 positions an address holds on Frontier poolscheck_otc_transfer: wallet-to-wallet transfer eligibility (curve coins are locked before graduation)get_highlight_status/get_highlight_config/get_current_highlight: promotion pricing, live settings, active highlightget_referral_reward/get_referral_fees/generate_referral_link: referral earnings, fee share,frontier.fun?ref=<wallet>linkget_staking_vault_address/get_staking_position/get_staking_rewards/get_cooldown_status/preview_stake/preview_unstake: staking vault lookup, position, WETH stream, cooldown, previewsget_vesting_info/get_all_vesting_schedules: vesting schedulesresolve_token/get_recent_deployments/get_token_list: coin registry (resolve by symbol or name, live launch feed, filtered list)get_token_distribution/get_user_holdings/get_user_creations: Frontier API app surfaces (best effort)get_config/spending_stats/get_failed_txs/get_tx_history/get_portfolio_summary: agent config, TxGate budget, dead-letter queue, confirmed history, aggregated portfolioget_strategy_status/list_available_strategies: strategy status and catalogdescribe_protocol: Frontier explained (launch modes, fee model, extensions) with the live parameters
Write (costs gas, gated by TxGate): 24 tools
buy_token/sell_token: trade on the bonding curve; auto-route to the Uniswap V4 pool once the coin trades there (receiptpath=bonding-curveorv4-pool)pool_swap/approve_pool_sell: explicit pool swap through the Universal Router (exact-input or exact-output, native ETH); Permit2 approvals ahead of timedeploy_token: launch a coin:launch_modecurve or instant,starting_fdv_eth/raise_target_eth,fee_mode/fixed_fee_pips/lp_share_bps/dynamic_fee,extensions, staking vault +community_fee_ratio,dev_buy_eth/dev_buy_percent, alternative fee recipient, social linksupload_image: pin the coin image to IPFS through the Frontier API before launchingtrigger_graduation: the final curve buy that seeds the locked pooladd_liquidity/remove_liquidity/collect_fees: your own Uniswap V4 position on a coin's pool (PositionManager)collect_pool_fees: permissionless collection of the protocol-locked liquidity fees (split creator side / protocol)set_fee_recipient/create_fee_recipient: hand the fee recipient role on; deploy a lottery / buyback-and-burn / fee-splitter clonestake_tokens/request_unstake/request_unstake_by_shares/complete_unstake/claim_staking_rewards: staking vault deposit, cooldown exit, WETH claimhighlight_token/claim_referral_reward/otc_transfer: highlights, referrals, direct transfersrelease_vested_tokens/create_vesting_schedule: vesting managementsend_eth: native ETH transfer with TxGate budget tracking
Config: 4 tools
update_config: change slippage, risk limits, gas settingsupdate_tx_gate: change spending limits, blackliststart_strategy/stop_strategy: manage automated trading strategies (requires awss://RPC)
Architecture
MCP Client (Claude Code / Cursor / etc.)
|
| stdio (JSON-RPC)
|
v
McpServer (this package)
|
+-- WalletManager (from SDK): keystore ~/.frontier/agent-wallet.enc
+-- LaunchpadAgent (from SDK): chain registry defaults for FRONTIER_CHAIN_ID
+-- ToolExecutor (from SDK, with TxGate)
| +-- TOOL_DEFINITIONS (84 tools)
| +-- TxGate (spending limits)
| +-- TokenRegistry (coin resolution by symbol / name)
|
+-- registerTool() per tool:
| +-- title (human-readable)
| +-- description
| +-- inputSchema (Zod via zod-compat)
| +-- annotations (behavioral hints)
|
+-- 21 resources (17 static + 4 template-based)
+-- 12 prompts (workflow guides)
+-- Resource subscriptions (change notifications)
|
+-- makeToolCallback(toolName, executor) -> MCP responseMCP Resources (21 total)
Static resources (17): frontier://protocol, frontier://safety-rules, frontier://token-state-schema, frontier://config-schema, frontier://wallet-setup, frontier://chains, frontier://extensions, frontier://wallet, frontier://config, frontier://positions, frontier://strategies, frontier://failed-transactions, frontier://staking, frontier://vesting, frontier://referrals, frontier://tx-history, frontier://portfolio
Template-based resources (4): frontier://positions/{token_identifier}, frontier://strategies/{strategy_name}, frontier://staking/{token_identifier}, frontier://vesting/{token_identifier}
frontier://chains is the chain registry entry the server runs against (RPCs, explorers, API, every contract and Uniswap V4 address, extension addresses, curve defaults, fee model, subgraphs). frontier://extensions is the hook extension catalog served by the Frontier API for that chain (status, addresses, parameter schemas). frontier://protocol carries the launch modes, the fee model and a computed tool map.
MCP Prompts (12 total)
evaluate-trade, deploy-token, launch-coin, monitor-positions, manage-strategies, check-graduation, staking-workflow, referral-setup, vesting-management, otc-transfer, highlight-promotion, error-recovery
launch-coin walks through a launch: bonding curve vs instant, starting valuation and raise target, pool fee model, extensions from the catalog, staking vault, dev buy, image upload, verification and the fee recipient. evaluate-trade routes by isLPd: curve quotes before graduation, quote_pool_swap / preview_pool_fee / pool_swap (path v4-pool) afterwards.
Resource Subscriptions
The server supports MCP resource subscriptions for change notifications. Subscribed URIs receive debounced (500ms) notifications on relevant events:
frontier://wallet,frontier://positions,frontier://tx-history,frontier://portfolio: on curve buy / sell eventsfrontier://positions,frontier://portfolio: on new launches and graduationsfrontier://strategies: on strategy start / stopfrontier://config: polled every 15 seconds for changes
Security
- The MCP server creates a TxGate with configurable spending limits from environment variables.
- Interactive confirmation is disabled (
confirmAboveETH: 0) since MCP does not support interactive prompts. - Wallet source is logged to stderr on startup (keystore, env/config, or read-only mode), together with the chain and the RPC.
- If no private key or keystore is configured, the server starts in read-only mode (write tools error out).
- Graceful shutdown with AbortController cancels in-flight operations and rolls back pending TxGate reservations.
- Chain-ID verification: on the first write operation the agent calls
provider.getNetwork()and refuses to submit the transaction unless the provider's chain id matchesFRONTIER_CHAIN_ID(4663 by default). Prevents an accidentally swappedFRONTIER_RPC_URLfrom executing trades against whatever contracts happen to live at the Frontier addresses on another chain. - Chain selection is explicit: an unknown
FRONTIER_CHAIN_IDor an invalid address override aborts startup. - Bigint-safe resource serialization: every
frontier://...resource handler uses the SDK'ssafeJsonStringifyhelper, so resources whose payload contains wei amounts (e.g.frontier://walletwith a liveTxGate.getStats()) are round-trippable.
Changes
See CHANGELOG.md for release notes. Latest: v1.1.0, the eight tools of the official extension set (recipient state, lottery / buyback / splitter keeper calls, pool fee schedules). 84 tools, frontier:// resources.
Development
# From monorepo root
git clone https://github.com/CamelotLabs/frontier-sdk
cd frontier-sdk
pnpm install
pnpm build:sdk && pnpm build:mcp
# Test locally (read-only, no wallet)
node packages/mcp-server/dist/index.js
# With a wallet
FRONTIER_KEYSTORE_PASSWORD=... node packages/mcp-server/dist/index.js
# Unit + e2e tests (the e2e test spawns dist/index.js over stdio, no network needed)
npx vitest run --project mcp-serverLicense
MIT
