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

@dexterai/dexter-x402

v1.1.1

Published

Moltbot plugin for Dexter x402 - 59+ Solana DeFi tools via MCP with OAuth authentication

Readme

Dexter x402 Plugin for Moltbot

Official Moltbot plugin providing access to 59+ Dexter Solana DeFi tools via the Model Context Protocol (MCP).

Overview

This plugin connects Moltbot to Dexter's MCP server, enabling:

  • Secure OAuth 2.0 Authentication with PKCE and Dynamic Client Registration
  • Real-time Tool Discovery via MCP tools/list
  • Direct Tool Execution via MCP tools/call
  • Automatic Token Refresh for seamless long-running sessions

Quick Start

1. Authenticate

moltbot models auth login --provider dexter-x402

This opens OAuth flow in your browser. Sign in with your Dexter account and authorize Moltbot.

2. Use Tools

The plugin exposes a single gateway tool dexter_x402 that provides access to all 59+ Dexter capabilities:

# List available tools
moltbot agent --local --session-id demo -m "Use dexter_x402 with action='list'"

# Call a specific tool
moltbot agent --local --session-id demo -m "Use dexter_x402 to check trending Solana tokens"

Or simply ask naturally:

moltbot agent --local --session-id demo -m "What's trending on Solana right now?"

Available Tools (59+)

💼 Wallet Management

| Tool | Description | |------|-------------| | resolve_wallet | Resolve the effective managed wallet for this session | | list_my_wallets | List all wallets linked to your Dexter account | | set_session_wallet_override | Override wallet for the current session | | auth_info | Diagnostics for wallet resolution and token state |

💱 Solana Trading

| Tool | Description | |------|-------------| | solana_resolve_token | Resolve token metadata by name, ticker, or address | | solana_send | Transfer SOL, USDC, DEXTER, PAYAI, or any SPL token | | solana_swap_preview | Preview a token swap before execution | | solana_swap_execute | Execute a previewed swap | | jupiter_quote_preview | Get Jupiter DEX swap quote | | jupiter_quote_pro | Jupiter quote with pro-tier features |

📊 Analytics & Research

| Tool | Description | |------|-------------| | search | Web search with real-time results | | fetch | Retrieve and summarize web pages | | pumpstream_live_summary | Live pump.fun stream analytics | | markets_fetch_ohlcv | Birdeye OHLCV candle data | | onchain_activity_overview | On-chain analytics for tokens/wallets | | onchain_entity_insight | Deep analysis of wallets, tokens, or signatures | | solscan_trending_tokens | Solscan trending tokens snapshot | | slippage_sentinel | Volatility analysis & optimal slippage calculation | | twitter_topic_analysis | Twitter sentiment and conversation analysis |

🎬 Creative & Media (x402 Paid)

| Tool | Description | |------|-------------| | sora_video_job | Generate video clips with OpenAI Sora | | meme_generator_job | AI-powered meme and image generation | | studio_breaking_news | Create newscast videos and infographics | | studio_news_status | Check breaking news job status |

🎮 Games

| Tool | Description | |------|-------------| | pokedexter_create_challenge | Create wagered Pokémon battle ($1-$25) | | pokedexter_accept_challenge | Accept a battle challenge | | pokedexter_make_move | Submit battle action | | pokedexter_get_battle_state | Get current battle state | | pokedexter_join_queue | Join quick match queue | | games_king_usurp | Become King of Dexter ($0.01) | | games_king_state | View current King state | | games_story_append | Add to the Infinite Story ($0.01) | | games_story_read | Read the Infinite Story |

🚀 Hyperliquid (Perpetuals)

| Tool | Description | |------|-------------| | hyperliquid_markets | List tradable perp symbols | | hyperliquid_opt_in | Provision agent wallet for perp trading | | hyperliquid_fund | Bridge SOL → USDC → Hyperliquid | | hyperliquid_bridge_deposit | Deposit from Arbitrum | | hyperliquid_perp_trade | Submit perpetual orders |

🔧 Codex Sessions

| Tool | Description | |------|-------------| | codex_start | Begin a new Codex conversation | | codex_reply | Follow-up to existing Codex session | | codex_exec | Run Codex with optional JSON schema |

🏭 Studio (Superadmin)

| Tool | Description | |------|-------------| | studio_create | Start a Studio agent task | | studio_status | Check job status | | studio_cancel | Cancel running job | | studio_inspect | Full job details | | studio_list | List recent jobs |

📺 Stream Engagement

| Tool | Description | |------|-------------| | stream_public_shout | Submit shout-out for live stream | | stream_shout_feed | Get latest public shouts |

Architecture

┌─────────────────┐     OAuth 2.0 + PKCE      ┌──────────────────┐
│    Moltbot      │◄─────────────────────────►│  Dexter OAuth    │
│  (dexter-x402    │                           │  (dexter-api)    │
│    plugin)      │                           └──────────────────┘
└────────┬────────┘
         │
         │  MCP Protocol (JSON-RPC over HTTP)
         │  - tools/list
         │  - tools/call
         ▼
┌─────────────────┐     Internal      ┌──────────────────┐
│   Dexter x402    │◄─────────────────►│  Dexter Backend  │
│    Server       │                   │  (59+ tools)     │
│ mcp.dexter.cash │                   │                  │
└─────────────────┘                   └──────────────────┘

Authentication Flow

  1. Dynamic Client Registration (DCR): Plugin registers with Dexter's OAuth server, declaring http://localhost:51199/oauth-callback as redirect URI
  2. PKCE Authorization: Browser-based OAuth with S256 code challenge
  3. Token Exchange: Authorization code exchanged for access + refresh tokens
  4. Automatic Refresh: Tokens refreshed automatically before expiry

MCP Integration

The plugin uses the official @modelcontextprotocol/sdk to:

  1. Establish StreamableHTTPClientTransport connection to mcp.dexter.cash/mcp
  2. Send tools/list JSON-RPC requests to discover available tools
  3. Execute tools/call JSON-RPC requests for tool invocation
  4. Handle response content (text, JSON, images)

Configuration

Optional settings in ~/.moltbot/moltbot.json:

{
  "plugins": {
    "dexter-x402": {
      "baseUrl": "https://mcp.dexter.cash/mcp",
      "autoRefreshTools": true
    }
  }
}

| Option | Default | Description | |--------|---------|-------------| | baseUrl | https://mcp.dexter.cash/mcp | MCP server endpoint | | autoRefreshTools | true | Refresh tool list on connection |

How It Works

The dexter_x402 Gateway

Rather than registering 59+ individual tools (which would overwhelm the agent's context), this plugin exposes a single dexter_x402 gateway with two actions:

{
  action: "list" | "call",
  tool?: string,      // Tool name (required for "call")
  args?: string       // JSON arguments for the tool
}

List tools:

{ "action": "list" }

Call a tool:

{ 
  "action": "call", 
  "tool": "solscan_trending_tokens",
  "args": "{\"limit\": 10}"
}

Credential Storage

OAuth credentials are stored in:

~/.clawdbot/agents/main/agent/auth-profiles.json

Format:

{
  "version": 1,
  "profiles": {
    "dexter-x402:default": {
      "type": "oauth",
      "provider": "dexter-x402",
      "access": "eyJ...",
      "refresh": "...",
      "expires": 1769639417118,
      "baseUrl": "https://mcp.dexter.cash/mcp"
    }
  }
}

Troubleshooting

"Not connected to Dexter"

The tool couldn't find valid credentials. Run:

moltbot models auth login --provider dexter-x402

OAuth callback fails on remote server

If you're SSH'd into a remote server, Cursor's port forwarding should handle localhost:51199 redirects automatically. If not:

  1. The plugin shows the OAuth URL
  2. Open it in your local browser
  3. After signing in, you'll see "Connected to Dexter"
  4. The callback is received via the forwarded port

Token expired

Tokens auto-refresh. If refresh fails, re-authenticate:

moltbot models auth login --provider dexter-x402

MCP connection errors

Check that mcp.dexter.cash is accessible:

curl https://mcp.dexter.cash/mcp/health

Tools not appearing

Ensure the plugin is enabled:

cat ~/.moltbot/moltbot.json | jq '.plugins'

Development

Building

cd /path/to/moltbot-research
pnpm build

Testing OAuth Flow

./moltbot.mjs models auth login --provider dexter-x402

Testing Tool Execution

export ANTHROPIC_API_KEY="sk-ant-..."
./moltbot.mjs agent --local --session-id test -m "Use dexter_x402 with action='list'"

Dependencies

  • @modelcontextprotocol/sdk - Official MCP client SDK
  • @sinclair/typebox - Runtime type validation

Links

License

MIT