# TradeDeFi

> TradeDeFi is an MCP server for finance and payments. MCP server for backtesting, publishing and trading DeFi strategies from an agent wallet. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Platforms:** CLI, API, Web
- **MCP Registry name:** fi.traderoll/tradedefi
- **Categories:** [finance and payments](https://ai-powered.com/categories/finance-and-payments), [trading tools](https://ai-powered.com/categories/trading-tools), [crypto and web3](https://ai-powered.com/categories/crypto-and-web3)
- **Listing updated:** 2026-12-03

## About

TradeDeFi gives an AI agent a set of tools for working with DeFi trading strategies. An agent can backtest a strategy, save versions of it, publish it, and trade using a wallet that belongs to the agent itself rather than to a human user.

The server runs over stdio from an npm package or connects through a hosted streamable HTTP endpoint. Wallet setup is handled by an initialization tool that creates a keystore protected by a password supplied through an environment variable, so the private key never has to appear in the client configuration. Reading tables and saved strategy versions, and publishing them, both go through a configurable TradeDeFi API.

It suits developers and operators who want an agent to run its own trading logic on-chain and need the backtesting, versioning and wallet plumbing already in place.

## Features

- **Strategy backtesting:** Test a trading strategy against historical data before any capital is committed.
- **Strategy versioning and publishing:** Save revisions of a strategy and publish a chosen version to the TradeDeFi platform.
- **Agent-owned wallet:** An initialization tool creates a keystore for the agent so trades run from its own wallet.
- **Encrypted key handling:** The wallet key is stored in a password-protected keystore rather than in the server config.
- **Hosted and local transports:** Available as a local stdio npm package or as a remote streamable HTTP endpoint.

## Good for

- Backtest a DeFi trading idea before running it live
- Let an agent publish and version its own strategies
- Give an autonomous agent a dedicated wallet for on-chain trades
- Connect a trading agent in an MCP-compatible client to TradeDeFi tables and data

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http tradedefi https://mcp.traderoll.win/mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "type": "http",
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://mcp.traderoll.win/mcp
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "type": "http",
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://mcp.traderoll.win/mcp
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add tradedefi --url https://mcp.traderoll.win/mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.tradedefi]
url = "https://mcp.traderoll.win/mcp"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "httpUrl": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http tradedefi https://mcp.traderoll.win/mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "serverUrl": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "url": "https://mcp.traderoll.win/mcp",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "type": "streamableHttp",
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "tradedefi": {
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "tradedefi": {
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "tradedefi": {
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://mcp.traderoll.win/mcp
```

Enter a Name (for example "TradeDeFi"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin. When we checked, this server asked for OAuth sign-in. If its docs give you an OAuth client ID and secret, enter them in the form's OAuth Client ID and Client Secret fields.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "tradedefi": {
      "type": "http",
      "url": "https://mcp.traderoll.win/mcp"
    }
  }
}
```

## FAQ

### How is the agent's private key protected?

The key is kept in a keystore created by defi_agent_init and encrypted with a password set in an environment variable. The key itself is not placed in the configuration.

### How can I connect to TradeDeFi?

You can run the npm package tradedefi over stdio, or connect to the hosted streamable HTTP endpoint at mcp.traderoll.win.

### Does it need a TradeDeFi API address?

Yes. Reading tables and saved versions and publishing require the TRADEDEFI_API_URL environment variable.

### How do I add TradeDeFi to Claude Code?

Run this command in your terminal: claude mcp add --transport http tradedefi https://mcp.traderoll.win/mcp

### What are the best alternatives to TradeDeFi?

The closest alternatives to TradeDeFi are Steyble Global API, Tradestaq MCP, Haiku DeFi MCP, Trading and Backtest360.

## Where this comes from

- Description: written from its MCP Registry entry.
- Status: checked automatically by AIPoweredBot on 5 December 2026.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Steyble Global API](https://ai-powered.com/mcp/steyble-global-api): Steyble Global API is a freemium MCP server for finance and payments.
- [Tradestaq MCP](https://ai-powered.com/mcp/tradestaq-mcp): Tradestaq MCP is a freemium MCP server for finance and payments.
- [Haiku DeFi MCP](https://ai-powered.com/mcp/haiku-defi-mcp): Haiku DeFi MCP is an open-source MCP server for finance and payments.
- [Trading](https://ai-powered.com/mcp/trading): Trading is a freemium MCP server for finance and payments.
- [Backtest360](https://ai-powered.com/mcp/backtest360): Backtest360 is a freemium MCP server for finance and payments.
- [MCP Defi Router](https://ai-powered.com/mcp/mcp-defi-router): MCP Defi Router is an MCP server for finance and payments.
- [Crypto Market Intelligence MCP](https://ai-powered.com/mcp/crypto-market-intelligence-mcp): Crypto Market Intelligence MCP is a freemium MCP server for finance and payments.
- [BlaidTrades](https://ai-powered.com/mcp/blaidtrades): BlaidTrades is an MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/tradedefi
