MangroveAI

io.github.MangroveTechnologies由 GitHub 账号 MangroveTechnologies 发布v1.0.2更新于 Nov 3, 2026

面向交易智能体的防护机制。内置风险管理,100+ 个用于策略研发的工具,12+ 个交易场所。

AI 翻译由 AI 模型根据下方的原文描述翻译,可能有误。

原文描述

Guardrails for trading agents. Built-in risk management, 100+ tools for strategy R&D, 12+ venues.

已验证Streamable HTTP可网页运行金融数据与分析

概览

MangroveAI 的托管 MCP 服务(api.mangrovedeveloper.ai);无需登录;Streamable HTTP;84 个工具。

暂无 AI 概览:以下信息来自注册中心条目和服务本身。

端点
api.mangrovedeveloper.ai
最近检查

安装

在 SourceWeft 中

  1. 打开 控制台中的 MangroveAI,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/io.github.MangroveTechnologies%2Fmangroveai/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "mangroveai": {
      "type": "http",
      "url": "https://api.mangrovedeveloper.ai/mcp/"
    }
  }
}

README

[Mangrove]

mangrove-agent

Mangrove gives trading agents guardrails. A local MCP server (Model Context Protocol) and provider agnostic plugin with built-in risk management on every order: circuit breakers, automatic risk-based position sizing, and automatically generated stop-loss and take-profit orders.
Built on the Mangrove API, with a REST API alongside. FastAPI + MCP. Strategies are authored and backtested on MangroveAI; this agent supplies the clock, local custody and execution, and a full audit trail.
Kraken and Robinhood venues, and DEX execution via 1inch across 10 EVM chains

[Kraken]    [1inch]

[CI] [License] [Discord]


What this is

mangrove-agent is an open-source local client for Mangrove services. It gives an AI client (Claude Code, Codex, Grok Build, Perplexity Computer, or any MCP client) local tools and access to configured hosted services. Credential and wallet custody depends on the selected workflow:

  • Author and test strategies. The agent turns a goal such as "momentum on ETH" into a backtested strategy by calling the MangroveAI API. Strategy building, backtesting, signals, market data and the knowledge base all live in MangroveAI; the agent forwards those tools and keeps no copy of them.
  • Paper trade. A paper schedule runs on a clock the agent supplies, while MangroveAI owns the strategy, balances, positions and trades. No funds are at risk.
  • Use the supported execution workflows. For local DEX execution, the agent signs transactions on the user's machine. Kraken BYOK keeps its API key local; Kraken OAuth is a separate connection where Mangrove holds the authorized grant. Robinhood uses its documented broker connection. Mangrove-owned execution software enforces deterministic risk management based on live market and account conditions. External AI clients and SDKs request operations and preserve Mangrove's decisions, audit details, and errors; they do not replace its risk policy.
  • Keep an audit trail. Local evaluations, DEX swaps and confirmed Robinhood fills are logged to a local SQLite database. Kraken orders are not added to the local trade log.

The agent exposes the same capabilities two ways: an MCP endpoint at http://127.0.0.1:9080/mcp/ and a REST API under /api/v1/agent/. MangroveAI also runs its own hosted MCP server at https://api.mangrovedeveloper.ai/mcp/.

You pay for MangroveAI access with a free API key from https://mangrovedeveloper.ai, or per call in USDC with x402 (no signup). More for agent builders: https://mangrove.ai/agents/ and https://mangrove.ai/llms.txt. Full platform documentation and the trading knowledge base are at https://mangrove.io/docs (knowledge base: https://mangrove.io/knowledge-base); the agent's kb_search tool queries the same corpus.

Choose an install path

PathUse it whenStart here
Ask your AI clientYou use Claude Code, Codex, Grok Build or Perplexity Computer and want the client to install and connect itselfInstall with an AI client
Clone and run setup.shYou want the full repository, API-key or x402 access, and the option to change the codeQuick start
Claude Code pluginYou use Claude Code and have a MangroveAI API keyClaude Code plugin
Cursor, Gemini CLI, KiroYou use another plugin-capable clientOther clients with the manifests at the repo root (.cursor-plugin/plugin.json, gemini-extension.json)
Codex plugin or MCP configYou use CodexCodex
DockerYou cannot run Python on the hostDocker

Every path runs the same agent. Use one path per machine: the agent listens on 127.0.0.1:9080, so a plugin install and a clone cannot run side by side on that port.

Install with an AI client

One-step Claude Code install (Claude Code 2.1.275 or later):

/plugin install mangrove-agent --marketplace MangroveTechnologies/mangrove-agent

Tell Claude Code, Codex, Grok Build or Perplexity Computer:

Install https://github.com/MangroveTechnologies/mangrove-agent and follow its AI client installation instructions.

The client installs the server in its own execution environment, loads the shared agent instructions, discovers the tools and calls the free status tool before it reports success. The user guide covers installation, choosing the agent's name, coming back later and switching clients. The installing agent follows Install from an agent. Perplexity Computer uses the provided command client and needs no Perplexity Project, custom cloud connector or extra desktop app.

Connect any MCP client (paste-ready config)

Once the agent is running from any install path above, point an MCP client at it with this mcpServers block (the same file ships at the repo root as .mcp.json.example; Claude Code reads it as .mcp.json in the project root, and other clients take the block in their own config file, see AI client setup):

json
{  "mcpServers": {    "mangrove-agent": {      "type": "http",      "url": "http://127.0.0.1:9080/mcp/",      "headers": {        "X-API-Key": "REPLACE_WITH_API_KEYS_FROM_server/src/config/local-config.json"      }    }  }}

The API key is written to server/src/config/local-config.json by setup.sh; the agent listens on loopback only.

The agent's shared identity and operating instructions live in SAGE.md. On first run the agent asks what to name itself and saves that choice locally for every client; there is no default personal name. AGENTS.md points Codex and compatible clients to SAGE.md, and CLAUDE.md imports it for Claude Code. Launch helpers, MCP configuration templates and the instruction bundle for hosts without file access are in AI client setup. Tool access is configured and verified separately for each client.

Install with setup.sh (sign-in, API key or x402)

Clone the repository and run ./scripts/setup.sh. Choose an existing MangroveAI API key, browser sign-in (OAuth), or wallet payments (x402, no signup). Browser sign-in requires the OAuth-enabled backend and currently supports a restricted tool catalog; see sign-in setup and limitations. The script protects local access, starts the agent and registers Claude when its CLI is available. For x402, a final menu prints wallet steps for you to run yourself; it never automatically creates/imports a wallet or pays. See the complete setup and wallet flow.

SETUP.md walks through installing these step by step on macOS and Windows.

Quick start: clone and run setup.sh

bash
git clone https://github.com/MangroveTechnologies/mangrove-agent.git mangrove-agentcd mangrove-agent./scripts/setup.sh

One command selects API-key or x402 access, creates .venv, installs dependencies, starts the agent in the background, registers it with Claude Code when the claude CLI is present, and verifies authenticated local access. A first run can take a few minutes. Reruns preserve configuration and local state and restart the server only when code or configuration changed. Connecting another client to a running agent does not need a rerun.

When it finishes:

  • The agent runs at http://127.0.0.1:9080. Its process ID is in agent-data/bare.pid and its log is agent-data/bare.log.
  • setup.sh has run scripts/verify_quickstart.sh, which checks authenticated local access, scheduler readiness and that the onboarding tools are discoverable.
  • Claude registration is saved when the CLI is available and you did not pass --no-mcp. Other clients use the command client or their own MCP connection.

After setup, continue with your chosen client using the user guide. For Claude, run the command displayed at the end of setup—it changes to your checkout folder and launches claude. In x402 mode, complete the guided payment-wallet setup before requesting paid data or backtests. API-key users can paper-trade without a payment wallet. Simulated trades do not make upstream API calls free. Continue with your client using the user guide. Claude users can run ./scripts/chat.sh for a session with shell and file tools disabled and only the Mangrove MCP server; see restricted chat. In x402 mode, finish the printed payment-wallet steps before you request paid data or backtests (details). With an API key you can paper trade without a payment wallet. Paper trades are simulated, but the upstream data and evaluation calls behind them still count against your API-key allowance or cost x402 payments.

./scripts/setup.sh --yes                          # preserve settings; fresh install uses x402./scripts/setup.sh --auth oauth                    # sign in and approve access in your browser./scripts/setup.sh --auth api-key                  # keep existing key or enter a new one (hidden)./scripts/setup.sh --auth x402                     # explicitly switch to wallet payments./scripts/setup.sh --robinhood connect             # connect Robinhood now (optional, bare-metal)./scripts/setup.sh --robinhood skip                # skip the optional broker connection./scripts/setup.sh --foreground                    # run uvicorn in your terminal (Ctrl+C to stop)./scripts/setup.sh --no-mcp                        # skip Claude Code registration./scripts/setup.sh --no-verify                     # skip the post-start verify pass./scripts/setup.sh --docker                        # use Docker instead of bare-metalBARE_PORT=9085 ./scripts/setup.sh                  # use a different port (9080 busy/squatted)

Interactive setup offers an optional Robinhood connection after the access checks. Choose Connect now or Skip for now; --yes skips broker login. Connecting reuses the existing OAuth flow and does not activate trading. The browser step currently supports bare-metal setup only; Docker setup reports that it is deferred. See Robinhood execution.

BARE_PORT is honored end-to-end (server + health check + MCP registration + verify). If 9080 is occupied, setup.sh refuses to start and tells you to free it or set BARE_PORT — it will not silently bind-fail or report a false success.


Alternate quick start — Docker

If you can't run Python on the host (corporate restrictions, reproducibility mandate), Docker works the same way. The tradeoff: the container can't reach your OS keychain, so the Fernet master key lives in ./agent-data/master.key (chmod 600, gitignored) instead of Keychain / Secret Service / Credential Manager.

bash
./scripts/setup.sh --docker

Docker setup uses port 9080, published on loopback only. State persists in the ./agent-data/ directory, which is bind-mounted into the container as a directory (single-file mounts drift on macOS and Windows). The wallet master key is stored the same way as in a bare-metal install, in agent-data/master.key (mode 0600, gitignored).

Your first strategy and trade

The full walkthrough is the trading tutorial; this is the short version. Chapters 01-05 use no live trading capital, and chapters 06-08 cover optional live trading.

First connection. Your client loads the shared policy, discovers tools and calls free status. If the installation has no saved name, it asks you to choose one. Startup does not fetch paid data, run backtests or configure wallets on its own.

Build a strategy.

"Build me a strategy for ETH on 1h."

The agent calls MangroveAI's build_strategy_for_regime. The server reads the current market regime and searches the Strategy Engine's completed runs, using fixed quality floors (more than 10 trades, Sharpe at least 1, annual return at least 10%, beats its benchmarks), for one whose entry the regime admits. It picks one, saves it as a draft and backtests it on the last 90 days. Ask for a new strategy to have one composed from regime-allowed signals instead. Strategy building and backtesting follow instructions the agent loads live from MangroveAI with load_skill.

Paper trade it.

"Promote it to paper."

The agent calls agent_start_paper_schedule with the server strategy ID, an interval (60, 300, 900, 3600, 14400 or 86400 seconds), a maximum number of evaluations (1 to 10000) and confirm=true. The agent's clock triggers each evaluation; MangroveAI evaluates the strategy and owns its balances, positions and trades. Use agent_list_paper_schedules, agent_get_paper_schedule, agent_pause_paper_schedule and agent_reconcile_paper_schedule to follow and control it. See paper scheduling.

Go live (optional, needs funds). Live trading is a separate, explicit decision.

  • Robinhood: use the bundled setup-robinhood skill and the execution venue guide. It uses broker OAuth and needs no local trading wallet.
  • DEX: wallet setup and live trading are covered in chapters 06 and 07 of the tutorial. In outline: create or import a wallet (create_wallet, or ./scripts/stash-secret.sh and then import_wallet); save its secret in your own terminal with ./scripts/reveal-secret.sh --address WALLET_ADDRESS; run ./scripts/confirm-backup.sh WALLET_ADDRESS; fund the wallet with a small amount of USDC on Base; then trade. execute_swap needs confirm=true, an explicit slippage_pct of at most 0.0025 (0.25%) and a backup-confirmed wallet. A strategy moves to live through PATCH /api/v1/agent/strategies/{strategy_id}/status with confirm=true and an allocation (wallet_address, token, token_address, amount, slippage_pct).
  • At swap time the agent signs locally and sends only the signed transaction to MangroveMarkets to broadcast. Swap signing is restricted to calls to the 1inch routers and the ERC-20 approvals that precede them; any other transaction is refused before the key is decrypted.

Connect your Kraken account

The agent connects to Kraken in one of two modes, chosen by how you want access held. What each mode can do differs:

Bring your own key (/setup-kraken)Keyless OAuth (/connect-kraken)
How it worksYou create a least-privilege Kraken API key (query and order permissions, withdrawal disabled). The agent talks to api.kraken.com directly from your machine.You approve once in a browser (Kraken Connect, OAuth2). There is no API key to create, copy or store.
Who holds accessYou. The key stays on your machine and never reaches a Mangrove server.The Mangrove platform holds the OAuth grant and submits orders on your behalf.
Best forSelf-custody and anyone comfortable making an API key.The fastest path, or anyone who does not want to manage a key.
OrdersDry-run validation only (cex_validate_order). The agent does not place real orders with your key.Real orders through POST /api/v1/agent/cex/oauth/orders. No MCP tool places a Kraken order.
RevokeDelete the key in Kraken settings.Revoke the app grant in Kraken settings, or disconnect in Mangrove.

Say "set up Kraken" or "connect Kraken without a key" in a session and the matching skill walks you through it, including the exact permission set for the key. In bring-your-own-key mode, cex_sync_fills sends your Kraken trade statistics to the MangroveMarkets telemetry service; it does not add them to the local trade log.

Safety model

  • Private keys stay out of the chat. create_wallet returns a vault_token, never the plaintext secret. You reveal the secret in your own terminal with ./scripts/reveal-secret.sh, which refuses to write to anything but a terminal.
  • Claude hooks block key pastes. In Claude Code sessions, .claude/hooks/block-wallet-secrets.sh refuses prompts that contain a private key or recovery phrase, and checks tool output as defense in depth. The hook is configured in .claude/settings.json, and the machine owner can change it. Other clients do not inherit it, so never paste a secret into any AI chat.
  • Live trading needs a confirmed backup. After you save a wallet's secret off the agent, ./scripts/confirm-backup.sh WALLET_ADDRESS records it. Live swaps and paying x402 from a wallet refuse wallets without it.
  • The master key stays local. Wallet secrets are encrypted with a Fernet key stored in agent-data/master.key (mode 0600, gitignored). If no keyfile exists, the agent reads an OS keychain entry instead; it never silently generates a replacement for a key that is missing.
  • Local access is authenticated. The agent binds to 127.0.0.1, and setup generates a unique local credential (API_KEYS) for the AI client. That credential is separate from your MangroveAI key.

What the agent can do

The local agent exposes list_tools for its own MCP catalog, including local helpers and tools it currently forwards. This call does not query the hosted MangroveAI catalog directly. For the hosted service, use MCP protocol discovery (tools/list) against its /mcp/ endpoint; when available, discover_tools provides a higher-level view of names and descriptions first, with schemas on request. Catalogs can differ by service configuration and can change over time, so do not rely on a fixed total. See progressive discovery.

1. MangroveAI tools (the source of truth). Strategies, backtests, sweeps, signals, market data, on-chain data, the knowledge base and the Strategy Engine live in MangroveAI. The agent reads MangroveAI's live MCP catalog (cached for up to a minute) and forwards each call to MangroveAI's /mcp/ endpoint, paying per call in x402 wallet mode or using your API key. When MangroveAI adds or changes a tool, the agent picks it up without a code change.

Area (examples, not a fixed list)MangroveAI tools
Strategy buildingload_skill, build_strategy_for_regime, list_backtest_markets, save_strategy, update_strategy, verify_strategy, list_strategies, get_strategy
Backtestsrun_backtest, get_backtest, get_backtest_trades, list_backtests, get_benchmark, screen_candidates
Sweepsfind_sweep_runs, size_sweep, create_sweep, launch_sweep, list_sweeps, get_sweep, pause_sweep
Signals and regimelist_signals, get_signal, search_signals, match_signals, query_signal_behavior, get_market_regime
Market, on-chain, DeFi, socialget_ohlcv, get_market_data, get_trending, get_token_holders, get_smart_money_sentiment, get_chain_tvl, get_social_sentiment, get_x_post_counts, and more
Knowledge basekb_search, kb_glossary_get, kb_get_document, query_knowledge
Marketplacesearch_marketplace, get_marketplace_strategy
Your MangroveAI positions and tradeslist_positions, list_trades

2. Local tools (what only your machine can do). These stay in the agent because they need your keys, your wallets or your local records.

CategoryTools
Discovery (free)status, list_tools
Namingset_agent_name
Wallet custodycreate_wallet, import_wallet, list_wallets
Kraken (CEX)cex_status, cex_connect_kraken, cex_balances, cex_validate_order, cex_sync_fills
DEX executionexecute_swap (local approval, signing and human-unit conversion)
Paper schedulingagent_start_paper_schedule, agent_list_paper_schedules, agent_get_paper_schedule, agent_pause_paper_schedule, agent_reconcile_paper_schedule
Robinhood venueagent_robinhood_status, agent_configure_execution_venue, agent_configure_strategy_market, agent_list_venue_orders, agent_reconcile_venue_orders, agent_cancel_venue_order
Marketplace approvalsmarketplace_prepare, marketplace_submit (see marketplace wallet approvals)
x402 spend budgetx402_spend_status, x402_spend_reset
Payment diagnosticshello_mangrove stays directly callable but is hidden from normal discovery

The agent also forwards MangroveMarkets read tools (dex_*, oneinch_* and approved wallet_* names) that it discovers from the Markets server. They support API-key access or x402 reads at $0.01 USDC each; see Markets read tools for names and units.

Saved strategies are read through MangroveAI's list_strategies and get_strategy. The agent has no local strategy creation: the old local create routes return HTTP 410.

Local tools also have REST endpoints under /api/v1/agent/, backed by the same service layer. MangroveAI tools have no local REST copy; call them over the agent's MCP endpoint or call MangroveAI directly. Authenticated routes take an X-API-Key header set to the first entry of API_KEYS in server/src/config/local-config.json, the unique local key setup.sh generated (not your MangroveAI key). /health, status and list_tools need no key, so a wrong key looks fine until the first authenticated call returns 401.

Backtests and the Strategy Engine. Backtests run on MangroveAI, never in the agent. For a saved strategy, run_backtest submits the run and get_backtest reads the result. screen_candidates ranks up to 99 candidates cheaply with the SIEVE model, and find_sweep_runs searches what the Strategy Engine has already measured. To size and launch a new sweep, the agent loads MangroveAI's sweeps skill, shows the estimated run count and waits for your agreement before it launches compute. Deeper dives: the knowledge base SIEVE guide and Experiments reference.

How it works

+-------------------------------------------------------------+|  Your machine                                               ||                                                             ||  AI client --MCP--+                                         ||  curl/Python -REST+                                         ||                   v                                         ||  +- mangrove-agent (one FastAPI process, port 9080) ------+ ||  |  - auth middleware (X-API-Key)                          | ||  |  - service layer shared by REST and MCP                 | ||  |  - APScheduler (paper clock, reconciliation workers)    | ||  |  - locally encrypted wallets and signing                | ||  +----------------------------------------------------------+ ||        |                                  |                 ||        v                                  v                 ||  agent-data/agent.db (SQLite)    agent-data/master.key      |+-------------------------------------------------------------+        |                                  |        v                                  v  MangroveAI /mcp/                   MangroveMarkets  (every MangroveAI tool:            (DEX quotes, routing,   strategies, backtests,             broadcast; read tools)   paper evaluation)

The agent does not re-implement signal logic, risk gates, position sizing or cooldowns; those run on MangroveAI. The agent orchestrates: it forwards tools, supplies the paper clock, and handles everything that needs your keys, wallets or local records. For a live trade it decrypts the wallet secret in-process, signs the unsigned transaction that MangroveMarkets prepared, and sends only the signed transaction back to be broadcast. MangroveMarkets never sees your key.

Documentation

DocWhat is in it
docs/user-guide.mdInstalling with your AI client, naming the agent, returning and switching clients
docs/clients.mdClient adapters, instruction loading, install-from-an-agent steps, progressive discovery
SETUP.mdStep-by-step prerequisites and manual setup for macOS and Windows
docs/setup-x402.mdAPI-key and x402 access, the wallet commands, spend budget and payment recovery
docs/configuration.mdConfig files, keys, environments and secrets
docs/restricted-chat.mdThe restricted Claude session started by ./scripts/chat.sh
docs/strategy-lifecycle.mdStrategy states, transitions, scheduling and execution
docs/paper-scheduling.mdServer-owned paper schedules
docs/robinhood-execution.mdThe Robinhood execution venue
docs/marketplace-wallets.mdWallet-approved marketplace actions
docs/markets-read-tools.mdMangroveMarkets read tools, names and units
docs/defi-pro.mdDeFi analytics tools served by MangroveAI
docs/remote-mcp-payments.mdHow tool calls to MangroveAI and MangroveMarkets are paid in wallet mode
docs/x402-payment-uncertainty.mdWhat happens when a payment outcome is unknown, and how it is recovered
docs/x402-sync-transport.mdThe x402 payment transport used by the MangroveAI client
docs/x402-payment-scripts.mdStandalone x402 demo and test scripts
docs/api-reference.mdThe REST API reference
docs/specification.mdAPI contracts, Pydantic models, SQLite schema, error codes
docs/architecture.mdSystem and sequence diagrams, live execution diagram, code layout
docs/mcp-contracts.mdTool ownership and the offline MCP contract check
docs/contributing.mdHow to add a route, tool, migration or config key
docs/incidents/2026-04-24-eip7702-drain.mdSecurity post-mortem and the signing defenses it led to
tutorials/trading-app/Self-paced chapters from a fresh clone to a paper strategy and, optionally, a live swap

Development

Extending the agent (a new endpoint, MCP tool, signal or strategy) follows the service-layer pattern in docs/contributing.md. Strategy creation and backtesting instructions are loaded live from MangroveAI through the MCP load_skill tool; the agent ships no copies of server skills or strategy generators. Contributor skills live in .claude/skills/.

Tests

From a clone that has run setup.sh:

bash
cd serverENVIRONMENT=test ../.venv/bin/python3 -m pytest tests/ -v

CI runs the same suite. The two live-swap tests in tests/e2e/test_live_swap.py are skipped unless you opt in:

bash
# Base Sepolia testnet (run from server/)ENABLE_SEPOLIA_TEST=1 BASE_SEPOLIA_PRIVATE_KEY=0x... ENVIRONMENT=test ../.venv/bin/python3 -m pytest tests/e2e/test_live_swap.py::test_sepolia_live_swap
# Base mainnet, real funds (budget cap 0.10 USDC per run)ENABLE_MAINNET_TEST=1 BASE_MAINNET_PRIVATE_KEY=0x... ENVIRONMENT=test ../.venv/bin/python3 -m pytest tests/e2e/test_live_swap.py::test_mainnet_live_swap

Deployment

The agent is a local, single-user service. Cloud deployment is not provided.

Project layout

mangrove-agent/|-- .claude/                  # Claude Code framework (skills, hooks, rules, agents)|-- .claude-plugin/           # Claude Code plugin manifest and hooks|-- .agents/plugins/          # Codex marketplace file|-- server/|   |-- src/|   |   |-- app.py            # FastAPI factory|   |   |-- config/           # Per-environment JSON configs|   |   |-- api/routes/       # REST routes, one file per resource|   |   |-- mcp/              # MCP tool registration and proxies|   |   |-- models/           # Pydantic domain and DB models|   |   |-- services/         # Business logic (wallets, execution, scheduling, payments, trade log)|   |   `-- shared/           # auth, db (SQLite), crypto, clients, x402, errors, logging|   `-- tests/                # unit, integration, e2e|-- scripts/                  # setup.sh, chat.sh, verify_quickstart.sh, wallet and client helpers|-- docs/                     # Design and operations docs|-- tutorials/trading-app/    # Guided walkthrough|-- docker-compose.yml|-- .mcp.json.example         # Drop-in Claude Code MCP config`-- SAGE.md                   # Shared identity and operating instructions

License

MIT

来源:README.md,提交 17bfe44

工具

84

delete_strategy

Archive a stopped strategy that has no open positions. Strategies are never hard-deleted: this hides the strategy from the default lists and keeps the strategy and its backtests, and it can be restored with POST /strategies/{id}/unarchive. Use this only when the user explicitly asks to delete or remove a strategy, and say that it was archived, not erased. Always confirm the strategy name and ID first.

输入参数strategy_id必填

get_trades_for_strategy

Read closed trades from MangroveAI for one strategy belonging to the authenticated user and organization. Uses the same MangroveAI record as list_trades; these are execution records, not backtest fills.

输入参数limitstrategy_id必填

list_positions

Read positions recorded in MangroveAI for the authenticated user and organization. This does not read platform trading positions.

输入参数assetlimitopen_onlystrategy_id

evaluate_strategy

Evaluate a strategy against current live market data to check if entry or exit signals are active. It places no orders and opens no positions, but each call records the evaluation: it updates the strategy's last_evaluated_at and evaluation_count and adds an agent_evaluations audit row. Returns the current asset price and any order intents the signals would produce. Use this when the user asks whether a strategy should be entering or exiting right now, or wants to know the live signal state for a specific strategy. A wallet that proves its identity (Sign-In-With-X) gets 30 evaluations free per UTC day, then 0.05 USDC each via x402; an API key is covered by its plan.

输入参数strategy_id必填

list_evaluations

Read the MangroveAI agent evaluation decision log for a strategy belonging to the authenticated user and organization. No audit record means unknown activity, not proof it never evaluated. This does not read platform evaluation records.

输入参数limitoffsetstrategy_id必填

build_strategy_for_regime

Run the Strategy Engine route in one call. Use it FIRST whenever someone asks to build or make a strategy and names no signals -- 'build me a strategy', 'build me a BTC strategy on 1h', 'make me something for ETH'. Give the asset, and the candle size only when they named one. The server reads the 180-day regime, searches the engine's completed runs once with the agreed floors (more than 10 trades, Sharpe at least 1, IRR at least 10%, beats benchmarks) in that regime, keeps the runs whose entry the regime admits, picks one at random, saves it from its own run and backtests it on the last 90 days (30 for 5m). Do not pass filters, a regime or dates: they are fixed. When nothing fits it saves and spends nothing, and you move straight to a fresh build. It does not search the marketplace. [Access: pay 0.10 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数asset必填candle_size

classify_market_segment

Classify one stretch of market: a date range, or a catalog window by file name. Explicit date ranges require daily (1d) candles; catalog windows retain their stored interval. Returns its direction band, volatility band, trend character and the three features behind them, using the same labels the sweep catalog carries. Use it for a period the person names, or to see what a window a sweep selected contains. For an asset's current conditions use get_market_regime instead. Volatility reads `unscored` when no fitted band covers the stretch's length; the bands come back with it. For an exact crypto market, supply quote_token and market_data_venue together. A date range covers crypto and the stocks, ETFs, commodities and bonds in Oracle's regime catalog: SPY, QQQ, DIA, IWM, AAPL, AMD, AMZN, COST, GOOGL, HD, JNJ, JPM, META, MSFT, NFLX, NVDA, PG, TSLA, UNH, WMT, XOM, GLD, SLV, USO, GOLD (gold futures), CRUDE (crude oil futures) and TLT. Without explicit source arguments, those tickers are read from their exchange-session daily series, even where a crypto token shares one (DIA and META are the ETF and the stock here); any other ticker is read as crypto, so a stock not named here cannot be read. Explicit market or provider arguments select the crypto history path. `venue` says which feed was read. A listed ticker needs at least 15 sessions with a close, about three weeks; anything shorter is refused as too little history. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数assetend_dateproviderstart_datecandle_sizequote_tokenwindow_filemarket_data_venue

create_sweep

Create the search, once the person has agreed to its size. The engine builds every candidate strategy itself out of the pool you give it -- the whole signal library unless narrowed by class or by naming signals -- and draws the parameters too. USE size_sweep FIRST and say the run count it reports: this call creates a draft and validates it, and a person who has not heard a total has not agreed to one. Still free; only launch_sweep spends. If valid comes back false, errors says why in Oracle's words, nothing was kept, and the fix is another attempt. Nothing runs until launch_sweep.

输入参数assetsregimeswindowscategoriessweep_name必填candle_sizesexit_filtersentry_filtersexit_triggersparam_samplessignal_groupsentry_triggers另有 7 个

evaluate_multiple_signals_series

Evaluate chart data and optional signal triggers over a specific range. [Access: pay 0.05 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbolsignalsend_dateproviderstart_datedataset_keyquote_tokenchart_timeframemarket_data_venue

evaluate_signal

Evaluate a signal against provided market data and parameters. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数parametersmarket_data必填signal_name必填

find_sweep_runs

Runs from one sweep, or from every sweep this person has, filtered and sorted by the engine. LEAVE experiment_id OUT to search them all, which is how a person asking whether they have already found something like this gets an answer without spending a new search on a question that already has one. A SWEEP HAS NO WINNER: which run matters depends entirely on what was being asked, so you choose sort_by for the question in front of you -- return, risk-adjusted return, drawdown, trade count -- and say which one you sorted by whenever you report an order. Never call the top row 'the best strategy'; it is the top row by the measure you picked. Filter before you sort: a run with a handful of trades has metrics that mean nothing, so min_trades is usually the first thing to set. Every numeric filter has BOTH bounds, so a band is one question: a delta against the benchmark between 3 and 8 is min and max together, not a page fetched and thinned by hand. Readable while the sweep is still running. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数assetlimitordertrendoffsetmax_irrmin_irrsort_by必填coveringrun_indexatr_periodgeneration另有 27 个

get_asset

Full metadata and risk profile for one crypto asset on the Mangrove platform: approval status, risk score breakdown, regulatory status and identifiers. Use it when the user asks about a specific asset's approval or risk detail rather than a live price. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbol必填

get_backtest

Fetch a backtest that already ran, by id, with the execution config it used. Use it instead of run_backtest whenever the user refers to a previous result, or to compare two runs -- re-running costs them a unit of their allowance and a stored run is the record of what actually happened. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数backtest_id必填

get_backtest_trades

The individual trades a backtest made -- entry and exit prices and times, profit or loss, and why each one closed. Use it when the user asks what a backtest actually traded; get_backtest has the summary metrics. THESE ARE SIMULATED TRADES from a backtest, not real ones -- list_trades has those. A long run is paged: pass offset to read on. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limitoffsetbacktest_id必填

get_benchmark

Buy-and-hold return for an asset between two dates, as a percentage. Use it whenever you state what a strategy returned: a return with nothing to compare it against does not answer whether the strategy was worth running. run_backtest already includes this for its own window, so call this for a different asset or a different period. A YYYY-MM-DD end date includes that completed UTC day; an exact end timestamp is passed through without adding a day. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数asset必填end_date必填base_tokenstart_date必填quote_tokenmarket_data_venue

get_chain_tvl

Total Value Locked for a whole blockchain such as Ethereum, Base or Solana. Returns USD TVL and the top protocols on that chain. Use it when the user asks about a chain's overall DeFi footprint. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数chain必填

get_etf_flows

Crypto ETF net flows -- institutional inflows and outflows for spot BTC and ETH ETFs. Persistent net inflows are a bullish tape signal; heavy outflows bearish. Use it when the user asks about ETF flows, institutional demand or spot ETF activity. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_execution_config_schema

Every execution-config parameter a strategy can carry: the platform default, what it does, the effect of raising or lowering it, its legal bounds, and whether it is a strategy-character knob, an account guardrail, gated behind another flag, or retained but unused. Call it before discussing or overriding any risk parameter, so you describe the knob that exists rather than one you remember. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_global_market

Global crypto market snapshot -- total market cap, BTC dominance, total 24h volume and the 24h change. Use it when the user asks about overall market conditions or wants a macro view rather than a per-asset reading. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_influence_score

Influence score for a single X/Twitter account: a 0-100 score and follower count. Use it when the user asks about a specific influencer or KOL, or wants to know how much weight an account carries in crypto conversation. It is a per-account snapshot, not a topic aggregate. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数username必填

get_lending_rates

Per-pool borrow rates across DeFi lending protocols such as Aave, Compound and Morpho. Useful for rate-spread arbitrage screens and stablecoin yield analysis. Use it when the user asks about lending rates, borrow costs or DeFi yield. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_market_data

Latest trade price for a selected market, plus aggregate market cap and 24h volume. Pass quote_token and market_data_venue together to honor a requested exchange. When omitted, selects a supported market and returns its quote and venue. Report the returned venue and quote; disclose price_as_of and price_stale. Use it when the user asks what an asset is doing now, or when a live price is needed to ground a recommendation. It is a spot reading from an external API and is rate limited, so call it once per asset and reuse the answer. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbol必填providerquote_tokenmarket_data_venue

get_market_regime

Classify an asset's regime using a lookback of 1-365 days of daily closes: the return and a bull/neutral/bear band over 90, 180 and 365 days, plus annualised volatility as a percentage, a bucket, and a z-score against the asset's own baseline; and the whole lookback in the sweep catalog's labels (direction, low/medium/high volatility for its asset class and length, and a clean/mixed/choppy trend). Use it before recommending a strategy style, because a mean-reversion design and a trend-following design suit opposite regimes. Covers crypto and the stocks, ETFs, commodities and bonds in Oracle's regime catalog: SPY, QQQ, DIA, IWM, AAPL, AMD, AMZN, COST, GOOGL, HD, JNJ, JPM, META, MSFT, NFLX, NVDA, PG, TSLA, UNH, WMT, XOM, GLD, SLV, USO, GOLD (gold futures), CRUDE (crude oil futures) and TLT. Without explicit source arguments, those tickers are read from their exchange-session daily series, even where a crypto token shares one (DIA and META are the ETF and the stock here); any other ticker is read as crypto, so a stock not named here cannot be read. Explicit market or provider arguments select the crypto history path. `venue` says which feed was read. A listed ticker needs at least 15 sessions with a close, about three weeks; anything shorter is refused as too little history. For a listed ticker the lookback is calendar days, so 365 reads about 250 sessions. For an exact crypto market, supply quote_token and market_data_venue together. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数asset必填providerquote_tokenlookback_daysmarket_data_venue

get_ohlcv

Daily OHLCV (open, high, low, close, volume) history for one crypto asset over the requested lookback (1-3650 days). Use it when the user asks for price history, chart data, or wants to reason about past price movement rather than the current spot. Supply quote_token and market_data_venue together to select an exact market, or provider for an external source; omit these overrides to select a Mangrove market. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbol必填providerquote_tokenlookback_daysmarket_data_venue

get_onchain_series

Per-bar on-chain metric time series for a token. One request returns a bar-indexed series with any combination of SmartMoneyNetflow, SmartMoneyHoldings, ExchangeNetflow, WhaleNetInflow and HolderConcentration. Interval is 1h, 4h, 1d or 1w; top_n is how many top holders HolderConcentration sums; the only provider is nansen. Native ETH is read as WETH, and the token must be deployed on the chain asked for. Prefer this over firing many point queries when the user wants a historical or trailing-window view. [Access: pay 0.05 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数chaintop_nsymbol必填date_tometrics必填intervalproviderdate_from

get_perp_funding_rates

Aggregated DeFi perpetual funding rates across venues. Positive funding means longs are paying to hold; negative means shorts are. Use it when the user asks about perp funding, crowded positioning or leverage bias. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_playground_data

Return OHLCV chart data for a specific playground dataset.

输入参数dataset_key必填

get_protocol_tvl

Total Value Locked for a single DeFi protocol such as Aave, Uniswap or Curve. Returns USD TVL and a per-chain breakdown. Use it when the user asks how much capital is locked in a specific protocol. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数protocol_name必填

get_signal

Get complete metadata for an exact registered signal name.

输入参数signal_name必填

get_smart_money_dex_trades

Recent DEX trades from smart-money wallets across chains. Returns a paginated list of executed trades with token, side, size and wallet metadata. Use it when the user asks what smart money is trading on DEXs, or wants a raw feed of smart-money swap activity. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数pagechainsfiltersorder_byper_page

get_smart_money_flows

One-token flow intelligence snapshot: returns net USD flows and wallet counts for smart traders, whales, exchanges, fresh wallets and public figures together in ONE response. Use for a trailing-window category summary, including the past 24 hours (timeframe=1d). Do not fetch a separate token-flows page for each category to construct this summary. Timeframe is 5m, 1h, 6h, 12h, 1d or 7d. For explicit start/end dates or paginated flow records use get_token_flows. Native ETH is read as WETH; the token must exist on the requested chain. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数chainsymbol必填timeframe

get_smart_money_historical_holdings

Historical snapshots of what smart-money wallets held on specific dates. Returns per-wallet-category holdings with USD values. Use it when the user wants to see how smart-money positioning has changed over time, or wants historical on-chain portfolio data for a date range. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数pagechainsdate_tofiltersorder_byper_pagedate_from

get_smart_money_holdings

Current smart-money holdings: what funds and smart traders are holding right now, sorted by USD value. Use it when the user asks what smart money currently owns or has positions in. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limitchainsmin_value_usdinclude_labels

get_smart_money_netflows

Aggregated smart-money netflows across all tokens market-wide: which tokens funds and smart traders are accumulating or distributing. Use it when the user asks what smart money is buying or selling, or wants to see market-wide on-chain trends. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limitchainstimeframeinclude_labels

get_smart_money_perp_trades

Perpetual futures trades from smart-money wallets on Hyperliquid. Shows leveraged directional bets by sophisticated traders. Use it when the user asks about smart-money perp positions, what high-conviction traders are doing with leverage, or wants to see Hyperliquid smart-money activity. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数pagefiltersorder_byper_page

get_smart_money_sentiment

On-chain sentiment read for a token derived from smart-money wallet net flows. Returns a sentiment label (bullish, bearish or neutral) and net USD flow direction. Use it when the user asks what smart-money sentiment is for an asset, or wants a quick bullish or bearish read from on-chain flow data. For X or Twitter social sentiment use get_social_sentiment instead. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数chainsymbol必填

get_social_mentions

Recent X/Twitter posts about a crypto asset or topic: post text, id and time, at most 10 posts, plus how many posts the search matched. Use it when the user wants to see what is actually being said, or wants raw posts rather than an aggregated sentiment score. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limittopic必填hours_back

get_social_sentiment

Keyword-polarity sentiment for a crypto cashtag on X/Twitter. It fetches recent posts for $TOPIC and counts how many contain a positive and how many a negative keyword; the 0-100 score is the positive share of those polar posts. Returns the score, a bullish (70 or more), neutral or bearish (30 or less) label, and the number of posts read. When no post carried a sentiment keyword the score is null and the label is insufficient_signal: report that, not a neutral reading. Always state how many posts the reading was built from. Use it when the user asks about market mood or social sentiment for a token. The call is metered, so ask once per topic and reuse. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数topic必填hours_back

get_stablecoin_metrics

Global stablecoin metrics -- total supply, per-chain breakdown and the top stablecoins by market cap. Use it when the user asks about stablecoin supply, USDC or USDT dominance, or overall market liquidity. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_strategy

Read a strategy definition saved in MangroveAI, including its entry and exit signals and execution settings. Use an ID returned by list_strategies; IDs from other stores are not interchangeable.

输入参数namestrategy_id

get_sweep

Where one sweep has got to: its status and how many of its runs have finished. This is how you answer 'is it done yet' -- read it when the person asks, not on a loop, because the engine works for minutes or hours and a second look a moment later says the same thing. Results can be read while it is still running; the rows that exist are real.

输入参数experiment_id必填

get_sweep_limits

The sweep limits this person's plan actually enforces: the most backtests one sweep may run, the most history it may read, and how many sweeps may be in flight at once. Read these rather than guessing, and say the size in plan terms when a search is over one. Zero means no limit is enforced for this caller and -1 means unlimited; neither is a number to report as a cap.

无需输入参数。

get_sweep_run

One run rebuilt as the strategy it was, entry and exit rules with the parameter values the engine drew. This is the way OUT of a sweep: a row worth acting on becomes a saved strategy and then a real backtest over a window the person chose. Reach for it once a row is interesting, not for every row in a ranking.

输入参数run_index必填config_hashexperiment_id必填

get_symbol_exchanges

The exchanges that list one specific token, with per-venue metadata. Use it when the user asks where a token trades or which venues carry it, rather than for a price on any one of them. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbol必填

get_token_dex_trades

DEX trades for a specific token across all participants in a date window. Returns raw swap events with wallet, size and pool metadata; useful for post-hoc flow analysis on a single token. Native ETH is read as WETH, and the token must be deployed on the chain asked for. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数pagechainsymbol必填date_tofiltersorder_byper_pagedate_from

get_token_flows

Paginated historical flow records for one non-stablecoin token between explicit start and end dates, optionally filtered by one wallet label. Use for date-range records or pagination. For a trailing-window summary of net USD flows AND wallet counts across categories, use get_smart_money_flows, which returns the categories together in one call. Not available for stablecoins. Native ETH is read as WETH; the token must exist on the requested chain. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数pagechainlabelsymbol必填date_tofiltersorder_byper_pagedate_from

get_token_holders

On-chain token holder distribution for a token: total on-chain holder count, top-10 concentration percentage and a concentration score. Nansen aggregates across chains, so pass the symbol only and do not pass a chain argument. Use it when the user asks how many wallets hold a token, about holder count, holder concentration, whale ownership or distribution risk. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbol必填

get_token_unlocks

Token unlock schedules and supply metrics -- upcoming vesting cliffs and total supply movement per token. Heavy near-term unlocks are a supply-shock signal. Use it when the user asks about unlocks, vesting or supply overhang. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_treasuries

DeFi protocol treasury holdings -- how much a protocol holds in its own treasury and what tokens it owns. Use it when the user asks about protocol treasuries, DAO holdings or protocol-owned liquidity. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

get_x_post_counts

How many X posts mentioned a crypto asset's cashtag, per hour or per day, over the last 1 to 31 days. This is the XPostCount series the x_attention signals (x_post_count_spike, x_attention_elevated, x_attention_price_divergence) read. Counts exclude reposts and promoted posts; x_query=en_original also drops replies and keeps English only. The series ends at the last settled bucket (closed at least five minutes ago). Use it to show a token's attention trend, to explain why an X signal fired, or to pick a z_threshold. Counts are post volume, not sentiment. Repeat reads are served from cache. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数symbol必填x_querydays_backgranularity

kb_get_document

Read a requested KB guide or a known source section by slug. Use directly when the user requests the document itself; no preliminary graph call is required. For a general explanation use query_knowledge op=ask, not a document-reading sequence. If a needed slug is unknown, locate it with kb_search or kb_list_documents. Use view=overview for a guide summary; view=section with a returned section_anchor for a specific passage. Content defaults to 6000 characters; offset and next_offset count characters within the selected body. Continue only when the requested material is missing, not merely because has_more is true. full=True is for explicit full-document requests. A document excerpt is educational material; executable signal identities and parameters come from the runtime registry.

输入参数fullslug必填viewoffsetmax_charssection_anchor

kb_get_signal_quick_reference

Read the Signals Quick Reference guide when the user asks for that guide or its documented entries. This is the document-reading shortcut for kb_get_document slug=10-signals-quick-reference, not an additional validation step. Use view=overview for its outline or view=section with a known anchor for a passage. Content defaults to 6000 characters; offset and next_offset count characters within the selected body. Continue only for requested missing text. Reserve full=True for explicit downloads. For conceptual signal combinations use query_knowledge op=ask. For executable signal names and parameters needed to construct a strategy use the runtime catalogue, not this educational guide.

输入参数fullviewoffsetmax_charssection_anchor

kb_glossary_get

Return the KB glossary entry for an explicitly requested glossary definition or exact glossary term. No preliminary graph call is required for a glossary request. For a general question such as what RSI means, why it behaves that way, or which indicators complement it, start with query_knowledge op=ask. Exact lookup is case-insensitive and may return partial matches. Answer from the returned definition when sufficient; do not routinely follow it with graph or document searches.

输入参数term必填

kb_list_documents

Reads the Mangrove Knowledge Base package: every document's slug, title and summary. For a keyword search instead of browsing use kb_search. Use this when the user wants to browse the KB or you need a slug before calling kb_get_document.

无需输入参数。

launch_sweep

Start a validated sweep. THIS IS THE ONE CALL THAT SPENDS: it puts the engine to work on every run the search describes, for minutes or hours, and there is no undoing it -- pause_sweep stops further work but does not give back what already ran. So say the run count out loud and get the person's agreement before calling it; a number they never saw is not one they agreed to. It returns immediately with the sweep queued or preparing, NOT with results: the runs land over time and get_sweep says how far along it is. A status of queued means it starts when the account's current sweep finishes, which is the sweep beginning and not a refusal. [Access: pay 0.25 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数experiment_id必填

list_approved_assets

List assets supported by platform ref-data, enriched with market data and risk scores. Approval is independent of risk assessment. Unassessed risk scores are null; do not interpret them as zero or infer regulatory approval. Returns available market metadata and risk scores. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数top_n

list_backtest_markets

List available execution venue and quote-token choices for a backtest. Use when the user wants alternatives or market details are missing. A complete supplied or recorded market is already the default: do not force a selection step. If missing details must be matched, suggest an available match and obtain confirmation before saving or running. Availability here does not guarantee historical coverage; submission checks the chosen window.

输入参数asset必填

list_backtests

The user's recent backtest runs, newest first, optionally just the ones for one strategy. Use it when they ask what they have run, or refer to an earlier result without giving an id -- then fetch the one you need with get_backtest. It is how you avoid re-running something that already has an answer. Results are newest first; pass strategy_id to see only one strategy's runs. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limitstrategy_id

list_exchanges

Every exchange the Mangrove platform tracks, with per-exchange tier and 24h volume. Use it when the user asks what exchanges are supported or wants to browse the exchange universe rather than a single venue. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

无需输入参数。

list_playground_datasets

Return metadata for all available playground CSV datasets.

无需输入参数。

list_run_filters

The values a sweep's runs actually carry: which assets, which candle sizes, and which entry triggers the engine drew. Read this before filtering by one of them, because a value nothing carries comes back as an empty page that reads exactly like a search with nothing good in it.

输入参数experiment_id必填

list_signal_labels

Every signal's friendly name, display name and short description, keyed by code name.

无需输入参数。

list_signals

List available trading signals: names, types (TRIGGER or FILTER) and short descriptions. Use it to browse the catalogue, or narrow it by regime band, role or library category.

输入参数rolelimitoffsetcategoryregime_direction

list_strategies

List strategy definitions saved in MangroveAI for the authenticated user and organization. Use get_strategy with a returned strategy_id for entry/exit rules. This reads server definitions, not local agent execution records. An empty result means no matching saved definitions.

输入参数limit

list_sweep_markets

What history a sweep could run over, as the choices to offer and how many windows each one would add. Oracle keeps MANY separate windows per asset -- different date spans of the same market, each labelled with the character of the market inside it -- and a sweep runs over every one that matches, which is what stops a result that only held in one period from looking general. CALL THIS BEFORE ANYTHING ELSE, and again after each answer: the counts are conditioned on what has been chosen already, so they say what picking an option would ADD. Offer only what comes back. An option the catalog cannot cover is not returned at all, and an asset Oracle holds no data for cannot be swept however well known it is. Windows with missing bars are left out unless asked for.

输入参数assetsregimeswindowscandle_sizesinclude_gapped

list_sweeps

The sweeps this account can see, newest first. Call it whenever the person refers to a search rather than asking for a new one -- 'how did that one go', 'what have I run' -- so you read an existing sweep instead of paying to repeat it. Live progress is not in this list; get_sweep has it for the one that matters.

输入参数limit

list_trades

Read trade history recorded in MangroveAI for the authenticated user and organization. This does not read platform trades.

输入参数assetlimitoutcomestrategy_id

load_skill

Load one of your skills: the full instructions for doing something, which the turn only announced by name. Do it BEFORE working in a skill's area rather than after -- the announcement says what a skill is for, and the skill itself says how, including which calls to make and what not to do. Pass a section name to load only part of it. A skill may also carry FILES it tells you to read -- a lookup table, a mapping -- and `resources` names them; pass one as `resource` to be given it. Asking for a skill, a section or a resource that does not exist returns the ones that do.

输入参数skill必填sectionresource

match_signals

Match a trading description to ranked signals. [Access: pay 0.01 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数roletop_kdescription必填user_intentregime_directionsimilarity_threshold

pause_sweep

Stop a running sweep from doing any more work, keeping every result it has already written. Use it when the person has seen enough, or when a search turned out far larger than they wanted. It does not undo what already ran, and the results stay readable afterwards -- so it is a way to stop spending, not a way to take it back. Say how many runs finished, which is what they keep. A sweep that was only QUEUED had not started, so stopping it returns it to validated rather than paused and it can be launched again later.

输入参数experiment_id必填

query_knowledge

Explain trading concepts, definitions, relationships, comparisons and when signals work or fail using Michael's knowledge graph. This is the first tool for a general knowledge question, including which indicators complement RSI and when to avoid combining them. Start with op=ask, the complete question in q, hops=1 and limit=5. Keep related clauses together; do not run a search for each clause. Read the summaries and edge reasons before deciding on another call. Answer once the requested explanation and cautions are supported. A follow-up must address a specific missing fact: get an already-returned node for its details, or read one relevant KB section. Do not gather extra context, enumerate neighbors, check the signal catalogue or measure signals merely to expand a conceptual answer. If evidence remains insufficient, say what is unknown instead of repeatedly rephrasing searches. This guidance does not replace validation required for an actual strategy or a requested graph exploration. Explicit glossary, document and browsing requests go directly to the corresponding KB tool without a preliminary graph call. Runtime signal selection belongs to the signal catalogue; measured firing rates and durations belong to query_signal_behavior; current market regime belongs to get_market_regime. These are separate user intents, not mandatory steps for an explanation. Mangrove product policy belongs to query_product_facts. Reuse evidence and node IDs already returned in this conversation. Ops: stats (the counts and the complete vocabulary every filter accepts -- call it when you do not already know the filter values), find (search BY WORDS, optionally by kind/role/status/requires/param -- param finds every signal taking a parameter of that name), ask (search BY MEANING -- give it the question in ordinary words; use this when you would otherwise answer from memory, e.g. 'how far should the stop go', 'what works in a sideways market'; hops is capped at 3), get (one node in full: fo

输入参数qop必填towhyhopskindrolelimitparamseedsunitsradius另有 11 个

query_signal_behavior

Query measured signal behaviour: describe, pick, find or gap_probability. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limitlookup必填signalcategorymax_ratemin_ratesignal_typetarget_ratemax_gap_barsmax_run_barsmin_gap_barsmin_run_bars另有 2 个

run_backtest

Start a backtest of one saved strategy over a window of history. Takes a strategy_id -- it reads the stored strategy's own rules, asset, timeframe and risk parameters. The recorded market is the default; pass quote_token and/or market_data_venue when the person chooses another quote or execution venue. An omitted choice keeps its recorded value. Check and report the selected market; never silently substitute a feed. IT RETURNS A SUBMISSION, NOT A RESULT: a real backtest takes minutes, so this hands back the run's id and the config it will use, and the metrics arrive on their own once the engine finishes. Tell the person it is running; do not call this again for the same question, and do not wait. It consumes a unit of the user's monthly backtest allowance at submission -- so it CHECKS THE STRATEGY FIRST, and a refusal costs nothing: a problem (verify_strategy's problems) always refuses, and a signal parameter still at its library default refuses until you either save chosen values or pass acknowledge_defaults=true to stand by the defaults deliberately. One (strategy, window) is ONE measurement: submitting the same strategy over the same dates again is refused and the existing run named -- read that with get_backtest instead. Both start_date and end_date are required: name the days, so the same question asked next week gives the same answer. Every message carries the current time, so work them out from that. [Access: pay 0.10 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数end_date必填start_date必填quote_tokenstrategy_id必填engine_generationmarket_data_venueacknowledge_defaults

save_strategy

To promote a sweep pick, pass source_experiment_id and source_run_index; the service loads its authorized configuration and checks coverage before saving. Its recorded venue and quote token are defaults: pass market_data_venue and/or quote_token only when the person chooses a different market. Otherwise compose and save a trading strategy from signals in the library. Give it a strategy_name, an asset, and the entry and exit signals you chose -- each one {name, params?, timeframe?}, with params defaulting from the library when omitted. DO NOT pass a signal's role: TRIGGER and FILTER are read from the library, and an entry must resolve to exactly one TRIGGER plus any number of FILTERs. Find real signal names with query_knowledge first; never invent one. The server checks the entry against the current market regime itself -- a strategy composed against the wrong regime is refused, and telling the person why is a better answer than saving it anyway. Pass constraints ONLY for values the person actually stated: they are kept exactly as given, while everything else comes from canon. Saving the same strategy twice returns the first one rather than making a duplicate, and says so in created. What you save is a DRAFT: not tradeable until a backtest of it meets the platform's threshold spec, and it leaves draft on its own when one does. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数asset必填constraintsquote_tokenexit_signalsentry_signalsstrategy_name必填regime_overrideregime_directionsource_run_indexmarket_data_venuesource_config_hashsource_experiment_id

screen_candidates

Rank several candidate strategies by how likely each is to trade at all, before spending backtests on them. Give it one asset and up to 99 candidates, each {entry: [...], exit: [...]} with signals from the library -- the roles come from the library, so do not pass signal_type. IT PREDICTS WHETHER A STRATEGY WILL PLACE TRADES, AND NOTHING ABOUT WHETHER IT WILL MAKE MONEY: only a backtest answers that. Use it to choose which of many candidates to backtest first, never as a verdict on a single strategy -- a probability on its own says little, and the ranking is the answer. A HIGH score is real support for spending a backtest. A LOW score is weak evidence and is NOT a finding that the strategy will not trade: measured against runs that did trade, a 0.5 cutoff recovers under half of them. Never tell someone their strategy will not trade because this scored it low; back it and find out. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数asset必填candidates必填

screen_smart_money

Screen the market for tokens that smart-money wallets are currently accumulating or distributing. Returns a ranked list of tokens with high smart-money activity across the specified chains. Use it when the user asks what smart money is currently buying, which tokens are being accumulated, or wants to discover high-conviction smart-money plays. [Access: pay 0.02 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数limitchainstimeframe

search_signals

Search signal names, parameters or description keywords.

输入参数rolelimitquery必填offsetcategorysearch_typeregime_direction

size_sweep

How big a search would be, without creating anything. THIS IS THE NUMBER YOU SAY OUT LOUD, and it is almost never the number the person named: the draw count is PER WINDOW and Oracle keeps many windows per asset. Oracle counts it by walking exactly what the plan would walk, so nothing else can be trusted to work it out. Free, and repeatable -- call it after every change while the size is being settled, and only create the sweep once the person has agreed to a total. If it comes back capped, their plan scaled the search down and cap_applied says by how much.

输入参数assetsregimeswindowscategoriescandle_sizesexit_filtersentry_filtersexit_triggersparam_samplessignal_groupsentry_triggersexecution_base另有 6 个

update_strategy

Change a DRAFT strategy in place: its signals, their parameters, or a stated execution value. Pass the COMPLETE entry and exit signal lists when changing signals -- what you pass replaces what was stored, it is not merged, while constraints merge onto the stored execution config. Only a draft that has never been backtested can change: once a backtest has measured it, its rules are frozen so the results stay attached to the rules they ran, and a change means saving a NEW strategy with save_strategy. Use this to act on verify_strategy's warnings without creating a duplicate. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数constraintsstrategy_id必填exit_signalsentry_signalsstrategy_nameregime_overrideregime_direction

validate_signal_params

Validate parameters for a signal. [Access: pay 0.001 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数parameterssignal_name必填

verify_strategy

Check a saved strategy against everything that has to be true for it to run: the signal names and their parameter keys, the roles composing, a timeframe on every signal, and a timeframe on the strategy. Call it after saving and BEFORE backtesting -- a backtest spends the person's allowance the moment it is submitted, whether or not it runs, and these are the faults that make it fail at setup with nothing measured. It reads what is STORED, so it answers for the strategy as it exists rather than as it was described. `warnings` are judgements it cannot make for you -- a parameter still at its library default -- and do not stop a run. [Access: pay 0.005 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]

输入参数strategy_id必填

discover_tools

Discover Mangrove managed tools without executing them. Free, public read. Use detail=areas for the functional area index; summary (default) returns only names and descriptions; schema returns full live tool definitions. Select any areas and/or tool names; combined selectors form a union.

输入参数areasnamesdetail

版本历史

2
  1. v1.0.2最新Nov 3, 2026
  2. v1.0.0Oct 22, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分