Cross-chain wallet analysis with OpenAI and Hive

OpenAI's Responses API can call remote MCP servers from server-side code by passing a server_url and authorization token. Register Hive as the MCP tool provider and your OpenAI agent can call get_wallet_balances, get_wallet_history, and get_nfts_for_owner across EVM and Solana in one workflow — returning a cross-chain portfolio view with USD-denominated values, top holdings, transaction history, and active token approvals. Eligible ChatGPT workspaces can instead create a custom app with Hive's URL and complete OAuth in the browser.

Client: OpenAI Responses API · Workflow: Wallet analysis

Hive tools used

  • get_wallet_balances: Cross-chain wallet balances (EVM + Solana) with USD valuations and consistent Hive execution metadata regardless of upstream provider.
  • get_wallet_history: Transaction history with chain, type (transfer/swap/approval), counterparty, and asset breakdown.
  • get_nfts_for_owner: NFT holdings with collection metadata, floor prices (if available), and rarity signals where the upstream provides them.
  • get_token_approvals: Active token approvals — surfaces unrevoked approvals to potentially-malicious contracts for safety review.

Steps

  1. Add Hive as an OpenAI remote MCP tool

    In server-side OpenAI API code, set the MCP tool server_url to Hive and pass the Hive API key as the MCP authorization token. Keep the Hive key out of prompts and client-side code.

    tools: [{
      type: "mcp",
      server_label: "hive",
      server_url: "https://mcp.hiveintelligence.xyz/mcp",
      authorization: process.env.HIVE_API_KEY
    }]
  2. Test with a known wallet

    Send a wallet-analysis prompt through your OpenAI agent. The model calls Hive's wallet tools and returns balances, history, NFTs, and approvals as a structured summary.

  3. Ask for cross-chain context

    For wallets active across multiple chains (for example Ethereum, Base, Arbitrum, and Solana), the agent can call Hive separately per chain and merge the results. Keep one receipt per call. fetched_at, observed_at, and cache_age_ms record Hive's retrieval/cache timeline; provider block, slot, or timestamp values establish source recency across chains.

  4. Surface security risks

    Ask the agent to flag stale approvals or unusual history such as sudden large outflows, dust attacks, or MEV-bot interactions. It can call get_token_approvals to enumerate active approvals and recommend revocations.

  5. Plan the ChatGPT app path separately

    For ChatGPT developer mode, create a custom app with Hive's public MCP URL, choose OAuth, scan the tools, and complete browser consent. Keep the authorization-token form below for headless Responses API agents.

Example prompt

Analyze wallet 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 across supported chains. Show holdings over $1K, recent activity, and any risky approvals I should review.

Example output shape

Example output shape (illustrative values; run the tools for live data):

I analyzed the wallet across supported EVM and Solana surfaces and grouped the response by chain.

Top holdings over $1K:
- ETH (Ethereum): value, token balance, and price timestamp
- USDC (Base): value, token balance, and price timestamp
- WBTC (Arbitrum): value, token balance, and price timestamp

Recent activity:
- Swaps, transfers, and contract interactions grouped by chain
- Any unusually large inflows or outflows called out with transaction hashes

Approval review:
- Spender address, token, allowance, chain, and risk reason
- Suggested action: review in the wallet UI or revoke with a trusted revocation tool after verifying the spender.

Related glossary terms

Related recipes

See also