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

@zenfix/intent-swap-mcp

v0.1.0

Published

MCP server for intent-based DeFi swaps — swap tokens with natural language

Readme

intent-swap MCP Server

An MCP (Model Context Protocol) server that lets AI agents execute DeFi swaps via natural language.

What it does

Connect this to Claude Desktop (or any MCP-compatible agent) and say:

"Swap 1 ETH for USDC"
"把0.5个以太换成USDT"
"Get me a quote for swapping 100 USDC to DAI"

The agent will parse your intent, fetch a real-time Uniswap V3 quote, and build the transaction for your wallet to sign.

Tools

| Tool | Description | |------|-------------| | parse_swap_intent | Natural language → structured swap params | | get_token_price | Real-time USD price via CoinGecko | | get_swap_quote | Live Uniswap V3 quote (best fee tier auto-selected) | | build_swap_tx | Generate calldata for wallet signing | | list_supported_tokens | All supported tokens with prices |

Supported Tokens

ETH, WETH, WBTC, USDC, USDT, DAI, ARB, UNI, LINK, MATIC, OP, PEPE, SHIB, AAVE, CRV

Setup

Install

npm install -g intent-swap-mcp

Claude Desktop config

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "intent-swap": {
      "command": "intent-swap-mcp",
      "env": {
        "OPENAI_API_KEY": "sk-..."
      }
    }
  }
}

OPENAI_API_KEY is optional — without it, the server uses rule-based parsing (works for most common intents).

Run locally (dev)

git clone https://github.com/Lovelle-Zhang/intent-swap
cd projects/intent-swap-mcp
npm install
npm run dev

Architecture

User (natural language)
    ↓
parse_swap_intent  →  structured { fromToken, toToken, amount, ... }
    ↓
get_swap_quote     →  real-time Uniswap V3 quote (QuoterV2 on-chain)
    ↓
build_swap_tx      →  calldata for SwapRouter02
    ↓
User wallet signs & broadcasts

No custody. No API keys for on-chain operations. The server never holds private keys.

Security

  • The server never requests or stores private keys
  • build_swap_tx only generates calldata — the user must sign in their own wallet
  • ERC-20 swaps require a separate approve transaction (noted in the response)

Roadmap

  • [ ] ERC-4337 (Account Abstraction) support for smart contract wallets
  • [ ] Multi-hop routing
  • [ ] Conditional orders ("buy ETH when it drops below $3000")
  • [ ] Arbitrum / Base / Optimism support
  • [ ] Publish to npm

License

MIT