Atlas / MCP servers / mangrovetechnologies / mangrove-agent

mangrove-agentBLOCK

mcp/mangrovetechnologies/mangrove-agent

Claude agent for use with the Mangrove Developer API & MCP Server.

Verdict
BLOCK
Grade
D
Trust score
69 /100
Exposed tools
49 34r · 14w · 1d
Transport
stdio · streamable-http
License
MIT
Stars
5
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

mangrove-agent

An AI trading agent built on the Mangrove API. FastAPI + MCP. Autonomous strategy generation, cron-driven execution, full audit trail. CEX trade execution on Kraken · DEX execution via 1inch across 10 EVM chains

What this is

A local AI trading agent that:

  • Turns natural-language goals ("momentum on ETH") into backtested, ranked trading strategies via the MangroveAI API.
  • Runs live strategies on APScheduler cron jobs. Same evaluator path for paper and live.
  • Executes live DEX swaps through MangroveMarkets — 1inch routing across 10 EVM chains (Ethereum, Base, Arbitrum, Polygon, Optimism, BNB, Avalanche, zkSync Era, Gnosis, Linea; the agent defaults to Base). Client-side signing; the routing server never touches your keys.
  • Trades on Kraken too, with two connection modes: **bring
Read from source at commit bbdd8d0b84bfOBSERVED · 2026-10-11
Advertisement
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add mangrove-agent --env API_KEY=${API_KEY} --env BASE_MAINNET_PRIVATE_KEY=${BASE_MAINNET_PRIVATE_KEY} --env BASE_SEPOLIA_PRIVATE_KEY=${BASE_SEPOLIA_PRIVATE_KEY} --env KR_KEY=${KR_KEY} -- uvx mangrove-agent
claude-desktop
{
  "mcpServers": {
    "mangrove-agent": {
      "command": "uvx",
      "args": [
        "mangrove-agent"
      ],
      "env": {
        "API_KEY": "${API_KEY}",
        "BASE_MAINNET_PRIVATE_KEY": "${BASE_MAINNET_PRIVATE_KEY}",
        "BASE_SEPOLIA_PRIVATE_KEY": "${BASE_SEPOLIA_PRIVATE_KEY}",
        "KR_KEY": "${KR_KEY}"
      }
    }
  }
}
03

Exposed tools (49)

34 read · 14 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
agent_backtest_strategywriteRun a backtest against an existing strategy (mode=quick|full).
agent_build_strategy_from_referencereadMaterialize a reference into an agent_create_strategy_manual payload.
agent_create_strategy_autonomouswriteAutonomous strategy creation: goal → candidates → backtest → rank → winner.
agent_create_strategy_manualwriteManual strategy creation with explicit rules.
agent_evaluate_strategywriteManually trigger a single evaluation tick.
agent_get_strategyreadGet a strategy by ID.
agent_list_all_tradesreadAll trades across strategies.
agent_list_evaluationsreadEvaluation log for a strategy.
agent_list_strategiesreadList strategies, optionally filtered by status.
agent_list_tradesreadTrades for a strategy.
agent_search_reference_strategieswriteSearch curated reference strategies — Mechanism 2 of /create-strategy.
agent_update_strategy_statuswriteTransition strategy status. live + live→inactive require confirm=true;
cex_balancesreadKraken balances (BYOK — talks to Kraken directly with the local key).
cex_connect_krakenreadConnect Kraken by consuming a vault_token from scripts/stash-kraken-secret.sh.
cex_statusreadIs a Kraken (CEX) account connected on this machine? Free of Kraken key.
cex_sync_fillswritePull the user
cex_validate_orderwriteDry-run a Kraken order (validate=true) — no fill. Use before any live order.
create_walletwriteCreate + encrypt a wallet locally.
execute_swapwriteExecute a swap. Requires confirm=true + explicit slippage_pct.
get_allowancesreadERC-20 allowance check — has the wallet approved `spender`?
get_balancesreadToken balances for a wallet via mangrovemarkets.dex.balances.
get_dex_chartreadOHLC chart candles for a token pair on a DEX.
get_gas_pricereadCurrent gas price estimate for a chain.
get_signalreadServer price: 0.007 USDC
get_spot_pricereadCurrent spot price for one or more tokens.
get_swap_quotereadGet a DEX swap quote.
get_token_inforeadLook up token metadata (symbol, decimals, name) by contract address.
get_token_searchreadFuzzy-search tokens by symbol or partial name.
get_tx_statusreadCheck the status of a broadcast transaction.
import_walletwriteImport an existing wallet whose secret has been stashed in the vault.
list_dex_venuesreadList supported DEX venues.
list_toolsreadList all registered MCP tools with their access tier, parameters,
list_walletsreadList stored wallets (addresses + metadata only).
local_walletreadreturn
marketplace_preparereadPrepare a discovered Markets action for local approval without signing.
marketplace_searchreadFresh server description
marketplace_submitwriteAfter user approval of the prepared action, sign locally and submit once.
otherwritefrom src.api.routes.market import market_data as route
pay_signals_oncewriteAuthorize ONE local signals read, at most 0.001 Base Sepolia test USDC.
portfolio_defireadDeFi positions (LPs, lending, staking) for one or more wallets.
portfolio_historyreadOn-chain transaction history for a SINGLE wallet (not comma-separated).
portfolio_pnlreadRunning P&L across one or more wallets.
portfolio_tokensreadPer-token holdings for one or more wallets.
portfolio_valuereadAggregate USD value of one or more wallets.
quote_signalsreadCheck the local MangroveAI signals price without paying or signing.
readreadreturn backend().crypto_assets.get_market_data(symbol)
statusreadReturn agent status: version, wallets count, strategies by status,
x402_spend_resetdestructiveAuthorize a fresh x402 budget after the user has agreed to it.
x402_spend_statusreadOutbound x402 budget: spent, remaining, and what the money went on.
04

Trust audit

BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)FAIL
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (7 observation(s))
Shell
none-observed
Dependencies
not all pinned
Secrets in source
found

Findings (23)

HIGHPrompt injection · prompt.hide_from_user · CWE-94, CWE-1427
.claude/skills/michael/knowledge-graph/SKILL.md:205
`limit` when you need the total, and never tell the user "there are ten" from a capped result.
Why it matters. asks the agent to act without the user's knowledge
MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
scripts/wallet_backup.py:41
print(secret)
MEDIUMNetwork egress · net.raw_ip · CWE-200, CWE-319
.mcp.json.example:5
"url": "http://127.0.0.1:9080/mcp/",
MEDIUMHard-coded secrets · secret.generic · CWE-798, CWE-321
server/tests/unit/test_setup_flow.py:180
token = 'synthetic_vault_token_12345'
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
x402_spend_reset
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.mcp.json.example
.mcp.json.example
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWNetwork egress · net.metadata_ip · CWE-200, CWE-319
server/tests/unit/test_payment_hardening.py:213
"file:///tmp/a", "http://localhost:invalid", "http://169.254.169.254",
Why it matters. cloud metadata endpoint: the classic SSRF credential grab
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
SETUP.md:432
Done. Local agent authenticated at http://127.0.0.1:9080. Payment readiness is separate.
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/configuration.md:48
`"MANGROVEAI_BASE_URL": "http://127.0.0.1:5002/api/v1"` in the agent config and
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/mcp-contracts.md:70
python -B scripts/mcp_contract.py --upstream-url http://127.0.0.1:5002/mcp/
LOWNetwork egress · net.raw_ip · CWE-200, CWE-319
docs/mcp-contracts.md:117
python -B scripts/mcp_contract.py --upstream-url http://127.0.0.1:5002/mcp/ --refresh-upstream
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
server/scripts/_x402_demo.py:91
decoded = base64.b64decode(raw + "=" * (-len(raw) % 4), validate=True)
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
server/scripts/check_x402_e2e.py:108
envelope = json.loads(base64.b64decode(raw + "=" * (-len(raw) % 4), validate=True))
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
server/scripts/watch_x402_quote.py:48
envelope = json.loads(base64.b64decode(raw + "=" * (-len(raw) % 4), validate=True))
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
server/src/services/marketplace.py:141
return hmac.compare_digest(binding, _credential_binding(bytes.fromhex(parts[1])))
LOWObfuscation / stealth · obf.decode_call · CWE-506, CWE-94
server/src/services/payment_operations.py:213
response = httpx.Response(cached['status'], headers=cached['headers'], content=base64.b64decode(cached['body']))
LOWSupply chain · supply.unpinned · CWE-829, CWE-1357
server/requirements.txt
fastapi, uvicorn, pydantic, jsonschema, httpx, x402, cdp-sdk, mcp
Why it matters. 21 requirement(s) not pinned with ==
Fix. pin exact versions
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
docs/superpowers/plans/2026-05-08-mangrove-agent-rebrand.md:250
> Perform a security audit of `/tmp/mangrove-agent-rebrand` (a fork of MangroveTechnologies/app-in-a-box, a Python FastAPI + MCP trading bot that signs and submits onchain swaps via the MangroveMarket
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
INFOInventory / provenance · inv.oversize · CWE-1104
docs/archive/workshop/slides.pdf
docs/archive/workshop/slides.pdf
Why it matters. 1029023 bytes not read
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
SETUP.md:341
> 1. Open Windows Settings → search "Environment Variables".
Why it matters. asks the agent to read credentials
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
SETUP.md:350
## Step 6 — Choose access: API key or x402
Why it matters. asks the agent to read credentials
INFOPrompt injection · prompt.credential_read · CWE-94, CWE-1427
docs/setup-x402.md:26
Claude registration uses a dynamic `headersHelper` to read the local credential
Why it matters. asks the agent to read credentials
INFOPrompt injection · prompt.persistence · CWE-94, CWE-1427
docs/archive/workshop/setup-guide.md:132
- "python: command not found" on Windows → you forgot to check "Add to PATH." Uninstall and reinstall with the box checked.
Why it matters. instructs the agent to persist itself in the user's environment

Gates applied: instruction_override, no_behavioural_pass.

Audited 2026-10-11 · audit v0.4.1 · source sha bbdd8d0b84bffull audit observations/trust-audit/mcp-server/mangrovetechnologies__mangrove-agent.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-11bbdd8d0b84bfBLOCKD69first audit
06

Questions

What is the mangrove-agent MCP server?

Claude agent for use with the Mangrove Developer API & MCP Server.

What tools does mangrove-agent expose?

49 in total: 34 read-only, 14 that write, and 1 that can delete or overwrite (x402_spend_reset). Every one is listed on this page with its risk.

Is mangrove-agent safe to connect to an agent?

No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does mangrove-agent need?

It reads API_KEY, BASE_MAINNET_PRIVATE_KEY, BASE_SEPOLIA_PRIVATE_KEY, KR_KEY, KR_SECRET and MANGROVE_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How does mangrove-agent run?

It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on PyPI as mangrove-agent.

How current is this page?

The grade is for one exact copy of the source (bbdd8d0b84bf), read on 2026-10-11. The repository is watched and re-audited when it changes.

Advertisement