Sign In

@one-source/api-mcp

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@one-source/api-mcp

MCP server for OneSource blockchain data — 22 named tools for balances, NFTs, transactions, events, and live chain queries via x402

Source
npmnpm
Version
3.1.0
Version published
Weekly downloads
655
15.52%
Maintainers
1
Weekly downloads
 
Created
Source

onesource-api-mcp

MCP server for OneSource blockchain data. 22 named tools for balances, NFTs, transactions, events, and live chain queries via x402 micropayments.

npx onesource-api-mcp

Install

Claude Code

claude mcp add onesource-api -- npx onesource-api-mcp

# With x402 payments
claude mcp add onesource-api -e X402_PRIVATE_KEY=0x... -- npx onesource-api-mcp

Claude Desktop / Cursor

Add to your MCP config (claude_desktop_config.json or Cursor settings):

{
  "mcpServers": {
    "onesource-api": {
      "command": "npx",
      "args": ["-y", "onesource-api-mcp"],
      "env": {
        "X402_PRIVATE_KEY": "0x..."
      }
    }
  }
}

Remove the env block to run without payments.

Tools (22)

Live Chain Data (12 tools)

ToolDescription
1s_allowance_liveERC20 allowance check
1s_contract_info_liveContract type detection via ERC165
1s_erc1155_balance_liveERC1155 balance via RPC
1s_erc20_balance_liveERC20 balance via balanceOf
1s_erc20_transfers_liveERC20 Transfer logs via eth_getLogs
1s_erc721_tokens_liveERC721 token enumeration
1s_events_liveEvent logs via eth_getLogs
1s_multi_balance_liveETH + multiple ERC20 balances
1s_nft_metadata_liveNFT metadata via tokenURI
1s_nft_owner_liveNFT owner via ownerOf
1s_total_supply_liveToken total supply
1s_tx_details_liveTransaction + receipt via RPC

Chain Utilities (10 tools)

ToolDescription
1s_contract_codeContract bytecode
1s_ens_resolveENS name/address resolution
1s_estimate_gasGas estimation
1s_network_infoChain ID, block number, gas price
1s_nonceTransaction count
1s_pending_blockPending block from mempool
1s_proxy_detectProxy contract detection
1s_simulate_callSimulate eth_call
1s_storage_readRead storage slot
1s_tx_receiptTransaction receipt

Networks

All tools accept an optional network parameter:

NetworkDescription
ethereumEthereum mainnet (default)
sepoliaEthereum Sepolia testnet
avaxAvalanche C-Chain

Payment (x402)

Endpoints are priced in USDC on Base via x402. When X402_PRIVATE_KEY is set, the server automatically signs and settles USDC payments for each tool call. Without it, paid endpoints return 402 errors with a descriptive message.

Getting a Private Key

X402_PRIVATE_KEY is an EVM wallet private key — the same kind used by MetaMask, Foundry, or any Ethereum wallet. It must be a hex string starting with 0x.

Option A — Export from MetaMask:

  • Open MetaMask → click the three dots → Account details → Show private key
  • Copy the key (it starts with 0x)

Option B — Generate a new wallet:

# Using Foundry (cast)
cast wallet new

# Using OpenSSL
openssl rand -hex 32 | sed 's/^/0x/'

Funding the Wallet

The wallet needs USDC on Base to pay for tool calls. Send USDC to your wallet address on the Base network. Typical tool calls cost fractions of a cent.

Running with Payments

# Inline
X402_PRIVATE_KEY=0x... npx onesource-api-mcp

Or configure the key in your MCP client's env block (see Install above).

License

MIT

Keywords

mcp

FAQs

Package last updated on 02 Apr 2026

Related posts