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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@kasarlabs/extended-mcp

v0.1.5

Published

MCP server for extended functionality on Starknet

Downloads

405

Readme

Ask-Starknet - Extended MCP

The Extended MCP provides tools for interacting with Extended, a high-performance perpetual derivatives exchange built on Starknet. Extended combines off-chain order matching with on-chain settlement on Starknet L2.

Tools

This MCP provides the following tools:

Public Market Data

  • extended_get_markets: Get list of available markets with configurations, trading statistics, and Layer 2 settings
  • extended_get_market_stats: Get latest trading statistics for a market including volume, price changes, funding rate, and open interest
  • extended_get_market_orderbook: Get current order book (bids and asks) for a specific market with configurable depth
  • extended_get_market_trades: Get latest trades for a specific market showing price, quantity, side, and trade type
  • extended_get_candles_history: Get historical OHLCV candles data for trades, mark prices, or index prices with customizable intervals
  • extended_get_funding_rates_history: Get historical funding rates for a market (calculated every minute, applied hourly)

Account Management (use API key)

  • extended_get_balance: Get current account balance including collateral, equity, available for trade, unrealized PnL, and margin ratios
  • extended_get_user_account_info: Get account details including status, account ID, L2 keys, vault information, and Starknet bridge address
  • extended_get_positions: Get all currently open positions with size, PnL, liquidation price, leverage, and TP/SL settings
  • extended_get_open_orders: Get all currently open orders including limit, market, conditional, and TP/SL orders
  • extended_get_order_by_id: Get a specific order by its Extended-assigned order ID
  • extended_get_trades_history: Get historical trades executed by the account with optional filters for market, type, and side
  • extended_get_orders_history: Get historical orders (filled, canceled, or rejected) with optional filters
  • extended_get_positions_history: Get historical closed positions with realized PnL
  • extended_get_funding_payments: Get historical funding payments made or received for perpetual positions
  • extended_get_leverage: Get current leverage settings for all markets
  • extended_get_fees: Get the current fee schedule including maker, taker, and margin fees
  • extended_get_bridge_config: Get supported EVM chains and bridge contract addresses for cross-chain deposits/withdrawals
  • extended_get_bridge_quote: Get a quote for bridging funds between EVM chains and Starknet with estimated fees

Trading (use API key and private key)

  • extended_create_limit_order: Create a limit order with configurable price, quantity, time-in-force, post-only, and reduce-only options
  • extended_create_limit_order_with_tpsl: Create a limit order with attached Take Profit and Stop Loss triggers based on the order
  • extended_create_market_order: Create a market order that executes immediately at current market price with configurable slippage
  • extended_add_position_tpsl: Add or update Take Profit and Stop Loss orders to an existing position for risk management
  • extended_cancel_order: Cancel an existing open order by its Extended-assigned order ID
  • extended_update_leverage: Update the leverage multiplier for a specific market (affects margin requirements)

Configuration

This MCP requires the following environment variables:

EXTENDED_API_URL=https://api.starknet.extended.exchange
EXTENDED_API_KEY=your_api_key_here
EXTENDED_PRIVATE_KEY=your_stark_private_key_here

Getting an API Key

  1. Visit Extended Exchange
  2. Create an account
  3. Navigate to API settings in your account : More > API > Account
  4. Generate a new API key
  5. Add it to your .env file in the EXTENDED_API_KEY environment variable

Getting your Stark Private Key

  1. The Stark key is derived from your EVM or starknet private key during account registration
  2. You can export it from your Extended account dashboard in section More > API > Account > Show API details
  3. Add it to your .env file in the EXTENDED_PRIVATE_KEY environment variable

Usage

The Extended MCP is used internally by the Ask-Starknet unified router or can be used directly by Claude Code and compatible MCP clients. When configured, it enables Extended trading functionality through natural language queries.

Example Queries

"What's my current balance on Extended?"  // Uses extended_get_balance
"Show me my account details"  // Uses extended_get_user_account_info
"Show me my open positions"  // Uses extended_get_positions
"Get 1-hour candles for BTC-USD"  // Uses extended_get_candles_history
"Show funding rate history for ETH-USD"  // Uses extended_get_funding_rates_history
"Create a limit buy order for 0.1 BTC at 60000 USD"  // Uses extended_create_limit_order
"Place a market order to sell 0.5 ETH"  // Uses extended_create_market_order
"Create a limit order with take profit at 65000"  // Uses extended_create_limit_order_with_tpsl
"Add stop loss to my BTC position at 58000"  // Uses extended_add_position_tpsl

Resources