npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

deeplens-trade-mcp

v0.1.1

Published

MCP server for trading perpetuals on Aftermath Finance (Sui) via deeplens-trade SDK

Readme

deeplens-trade-mcp

MCP server that lets AI assistants trade perpetuals on Aftermath Finance (Sui blockchain). Works with Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.

Powered by the deeplens-trade SDK.

Install

npm install -g deeplens-trade-mcp

Setup

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "deeplens-trade": {
      "command": "deeplens-trade-mcp"
    }
  }
}

That's it. No private key needed.

How Trading Access Works

The MCP server uses Aftermath's agent wallet system instead of requiring your private key:

  1. On first run, the server auto-generates an agent keypair at ~/.deeplens/mcp-agent.json
  2. Ask the AI: "What's my agent setup status?" — it calls agent_setup and shows the agent address
  3. From your main wallet (web app or CLI), grant trading permissions to that agent address
  4. Send ~0.1 SUI to the agent address for gas
  5. The agent can now trade on your account

Why this is better than a private key:

  • Your main wallet key never leaves your control
  • Agent can trade but cannot withdraw funds
  • You can revoke access from your main wallet at any time
  • Key is auto-generated and stored with 600 permissions

Read-Only Mode

To block all trading operations (market data + paper trading only):

{
  "mcpServers": {
    "deeplens-trade": {
      "command": "deeplens-trade-mcp",
      "env": { "DEEPLENS_READONLY": "true" }
    }
  }
}

Advanced: Direct Private Key (not recommended)

If you prefer to use a raw key instead of agent delegation:

{
  "mcpServers": {
    "deeplens-trade": {
      "command": "deeplens-trade-mcp",
      "env": { "DEEPLENS_PRIVATE_KEY": "suiprivkey1..." }
    }
  }
}

Tools (21)

Setup

| Tool | Description | |------|-------------| | agent_setup | Check agent wallet status, get address for granting permissions |

Market Data (no wallet needed)

| Tool | Description | |------|-------------| | get_prices | Live perpetual prices for BTC, ETH, SUI, XAUT, XAG | | get_market_stats | 24h stats — volume, funding rate, open interest | | get_orderbook | Bid/ask depth for a specific market | | get_signals | Trading signals via momentum + MA crossover + funding fade | | get_vaults | List all Aftermath LP vaults |

Account & Positions (wallet required)

| Tool | Description | |------|-------------| | get_account | Account summary — collateral, equity, margin, PnL | | get_positions | All open perpetual positions with live PnL | | get_order_history | Past order history | | get_balances | Wallet token balances (SUI, USDC, etc.) |

Trading (wallet required)

| Tool | Description | |------|-------------| | open_position | Open a long or short with leverage, SL/TP | | close_position | Close a position by market symbol | | deposit_collateral | Deposit USDC into perps account | | withdraw_collateral | Withdraw USDC from perps account |

Swaps (wallet required)

| Tool | Description | |------|-------------| | get_swap_quote | Get a swap quote without executing | | swap_tokens | Execute a token swap |

DCA (wallet required)

| Tool | Description | |------|-------------| | create_dca_order | Create a dollar-cost averaging order | | get_dca_orders | List active DCA orders |

Paper Trading (no wallet needed)

| Tool | Description | |------|-------------| | paper_open | Open a simulated position with virtual funds | | paper_close | Close a paper position at current market price | | paper_portfolio | View portfolio, PnL, win rate |

Example Conversations

"Set up my trading agent"

Calls agent_setup → shows agent address and instructions for granting access.

"What's the BTC funding rate?"

Calls get_market_stats → responds with the current funding rate.

"Open a 3x long on ETH with $50"

Calls open_position with { market: "ETH", side: "long", collateral: 50, leverage: 3 }.

"Paper trade a short on SUI with $200 at 2x"

Calls paper_open — no real funds used.

License

MIT