Skip to main content

MCP connector for perquants — pay-per-call Hyperliquid derivatives data (funding, basis, HIP-3 health) over x402.

Project description

perquants-mcp

MCP connector for perquants — specialized Hyperliquid derivatives data for AI agents, pay-per-call over x402 (USDC on Base). No account, no API key — your agent pays a few cents per call from its own wallet.

Three tools:

Tool Returns Price
get_funding(coin) Funding rate: latest, annualized, 24h/7d means, sign streaks ~$0.01
get_basis(coin) Spot-perp premium (basis) in bps + means, streaks, churn ~$0.01
get_hip3_health(dex, asset) HIP-3 builder-market health: oracle deviation, liquidity, OI vs cap, risk flags, 0–100 score ~$0.02

get_hip3_health is the differentiator — risk analytics for builder-deployed perps (tokenized stocks, commodities, forex, pre-IPO) that no free API packages.

Install

Run it with no install via uvx straight from the repo:

uvx --from git+https://github.com/CarlosTejeiro/perquants-mcp perquants-mcp

Or install into an environment:

pip install git+https://github.com/CarlosTejeiro/perquants-mcp

Once published to PyPI this becomes simply uvx perquants-mcp / pip install perquants-mcp.

Configure your wallet

Paid calls are settled on Base mainnet in USDC, so the connector needs a wallet private key with a little USDC (and a few cents of ETH for nothing — x402 settlement is gasless for the buyer). Use a dedicated, low-balance wallet, never your main one.

export PERQUANTS_BUYER_KEY=0x<private key of a Base wallet funded with USDC>

Without PERQUANTS_BUYER_KEY, the tools return a clear "payment required" error.

Use in Claude Desktop / Cursor

Add to your MCP config (e.g. claude_desktop_config.json):

{
  "mcpServers": {
    "perquants": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/CarlosTejeiro/perquants-mcp", "perquants-mcp"],
      "env": { "PERQUANTS_BUYER_KEY": "0x<your Base wallet private key>" }
    }
  }
}

Then ask your agent things like "what's the funding on HYPE?" or "is the xyz:NVDA HIP-3 market healthy?" and it calls the tools (paying per call).

Use from Python

from perquants_mcp import PerquantsClient

client = PerquantsClient(buyer_key="0x...")   # omit to only read free/402 responses
print(client.get_json("/api/v1/hip3/xyz/NVDA"))

How it works

The connector is a thin client: it GETs the hosted perquants API, and on a 402 Payment Required it signs an x402 USDC payment with your wallet and retries. It holds no funds and runs locally — your key never leaves your machine.

Returns data/metrics, not financial advice.

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perquants_mcp-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

perquants_mcp-0.1.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file perquants_mcp-0.1.0.tar.gz.

File metadata

  • Download URL: perquants_mcp-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for perquants_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4872a1f1357c10b72710f4e021bb49f1909bada9ea4da7ff2b719c0dca779550
MD5 3685a711e229832bd9e7778cd570679c
BLAKE2b-256 13c26f2938158e4e0af14f45deb0f12b4ea3b338f1161368eff258cc77a97363

See more details on using hashes here.

File details

Details for the file perquants_mcp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: perquants_mcp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for perquants_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2d3efeaec569ad5871b24f699d8520a09252c8f63943f49575e9152fd1e98a83
MD5 fc2d5e7569558b00921df662477b8532
BLAKE2b-256 148211f163f90570b76ddaab452f02a37cc94c74b18d56532c2d8e615b4c7680

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page