Sign In

onesource-api-mcp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

onesource-api-mcp

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

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

onesource-api-mcp

MCP server for OneSource blockchain data. 34 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

# Claude Desktop / Cursor — add to MCP config:
{
  "mcpServers": {
    "onesource-api": {
      "command": "npx",
      "args": ["-y", "onesource-api-mcp"]
    }
  }
}

Tools (34)

Indexed Data (12 tools) — OpenSearch, cheaper, slight sync delay

ToolDescription
1s_address_txsAddress transaction history
1s_blockBlock details by number
1s_contract_infoContract metadata
1s_erc1155_balanceERC1155 token balance
1s_erc20_balanceERC20 token balance
1s_erc20_transfersERC20 transfer history
1s_eventsEvent log search
1s_nft_mediaNFT processed media URLs
1s_nft_metadataNFT metadata and traits
1s_nft_ownerNFT current owner
1s_tx_detailsTransaction with decoded events
1s_wallet_nftsWallet NFT portfolio

Live Chain Data (12 tools) — Direct RPC, real-time

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) — RPC only

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 the backend has payments enabled, tool calls return a 402 with payment details. Agents using @x402/fetch handle this automatically.

Configuration

VariableDefaultDescription
ONESOURCE_BASE_URLhttps://skills.onesource.ioSkills API endpoint
ONESOURCE_ANALYTICStrueSet false to disable analytics
ONESOURCE_ANALYTICS_URLDashboard endpoint for event ingestion
ONESOURCE_ANALYTICS_KEYAPI key for the analytics dashboard

Transport Modes

# stdio (default — for MCP clients)
npx onesource-api-mcp

# HTTP (for testing or remote access)
npx onesource-api-mcp --http
npx onesource-api-mcp --http --port=8080

HTTP mode binds to 127.0.0.1 by default.

Adding a New Tool

When a new SKILL.md is added to skills/OneSource*/, a corresponding MCP tool file needs to be created here.

Step 1: Create the SKILL.md in the skills repo (see the skills README for format).

Step 2: Scaffold the tool file:

cd mcp/
npm run new-tool

This prompts for:

  • Tool name1s_ prefix, snake_case (e.g. 1s_token_info)
  • Categoryindexed (OpenSearch), live (RPC with indexed counterpart), or chain (RPC-only utility)
  • Description — one-liner for the tool
  • Endpoint — REST API path (e.g. /api/chain/my-endpoint)
  • Method — GET or POST

It generates a tool file in src/tools/{category}/ with TODO markers.

Step 3: Edit the generated file — fill in the Zod schema parameters and handler logic. Use the shared params from src/types.ts (addressParam, txHashParam, tokenIdParam, hexDataParam, networkParam, limitParam, blockNumberParam).

Step 4: Build:

npm run build

This auto-regenerates the tool index and compiles. The new tool is immediately available in the MCP server.

License

MIT

Keywords

mcp

FAQs

Package last updated on 26 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts