---
title: 'Tutorial: Connect Your AI Agent to Crypto Data via MCP'
lastUpdated: '2026-06-06'
byline: founder
nextjs:
  metadata:
    title: MCP Integration Tutorial | Hive Intelligence
    description: Step-by-step guide to connecting Claude, Cursor, or header-capable MCP agents to live crypto data through Hive Intelligence.
    alternates:
      canonical: https://www.hiveintelligence.xyz/tutorials/mcp-integration
---

Most AI agents cannot answer crypto questions with current data unless they call a live tool. Ask Claude "what's the TVL on Aave?" without a data connection and the answer comes from training data, not today's number. This tutorial connects your AI agent to Hive Intelligence — the managed crypto MCP server for AI agents — through Hive's MCP endpoint.

{% ai-doc-actions path="/tutorials/mcp-integration" title="MCP Integration Tutorial" /%}

---

## What you'll build

By the end of this tutorial, your Claude Desktop, Claude Code, or Cursor agent will be able to:

- Check current token prices across supported assets
- Analyze DeFi protocol yields, TVL, and fee revenue
- Audit wallet security and token contract risk
- Query prediction markets, NFT data, and on-chain DEX activity

All of this comes from market data, DeFi analytics, wallet intelligence, security checks, and more — normalized behind a single MCP connection. See [Data Sources](/data-sources) for the full list of upstream providers Hive unifies.

---

## The integration problem: provider contracts multiply

For a basic token-safety answer, the agent needs more than one market-data endpoint.

To answer that properly, the agent needs:

1. **Price data** from CoinGecko - current price, market cap, volume
2. **Contract security** from GoPlus - is the contract a honeypot? Is there a proxy? Can the owner mint?
3. **Liquidity depth** from an on-chain DEX surface - is there enough liquidity to exit?
4. **Protocol TVL** from a DeFi analytics surface - is the underlying protocol growing or bleeding?

That creates four API integrations: four keys, four rate limiters, four authentication schemes, four input schemas, and four error-handling paths.

Scale that across the full crypto data surface and you're managing:

- Many separate API keys and billing accounts
- Different rate limiting strategies per source (per-second, monthly credits, or both)
- Different response formats to parse per source
- Many individual endpoints, each with its own parameter schema

When any upstream provider changes an API version, field, or rate-limit policy, your agent integration has to account for that change.

---

## The solution: one endpoint, one key, the tools your workflow needs

Hive Intelligence sits between your AI agent and the supported crypto data surfaces it normalizes. You connect to one MCP endpoint. You authenticate with one API key. Your agent gets access to the current 369-tool catalog: 351 provider tools organized into 10 categories plus 18 Hive-native stateful tools.

The MCP protocol lets your agent discover available tools at runtime instead of relying only on hardcoded function definitions. When Hive adds tools or providers, your agent can inspect the current schemas on the next connection.

---

## Step 1: Get your API key

1. Go to [hiveintelligence.xyz/dashboard](https://www.hiveintelligence.xyz/dashboard)
2. Sign up or log in
3. Navigate to **API Keys** and create a new key
4. Store the key securely; you will add it to the selected client setup path in the next step

See [Pricing](/pricing) for current monthly credits, rate limits, and plan details.

---

## Step 2: Configure your AI client

Pick the client you use. You only need to follow one of these sections.

### Option A: Claude Desktop

Remote MCP servers are added through Claude Desktop's Custom Connectors UI, not via `claude_desktop_config.json` (which is stdio-only).

1. Open **Settings → Connectors**.
2. Hover **Add custom**, click **Web**.
3. **Name** = `Hive`, **URL** = `https://mcp.hiveintelligence.xyz/mcp`, **Authentication** = Bearer token, **Token** = your Hive API key from Step 1.
4. Click **Add** and wait for Claude to validate and list the tools.

Custom Connectors are available on Free (1 connector), Pro, Max, Team, and Enterprise plans. The [Claude Desktop install page](/install/claude-desktop) walks through the same flow with screenshots, plus a stdio fallback for air-gapped setups.

### Option B: Claude Code

Run this command in your terminal:

```bash
claude mcp add --transport http hive "https://mcp.hiveintelligence.xyz/mcp" --header "Authorization: Bearer YOUR_HIVE_API_KEY"
```

Replace `YOUR_HIVE_API_KEY` with your actual key. The URL is a positional argument (there is no `--url` flag on `claude mcp add`). Claude Code will confirm the server was added; the tools will be available in your next session. See [Install in Claude Code](/install/claude-code) for the HTTP-transport variant and scope flags.

### Option C: Cursor

Create or edit `.cursor/mcp.json` in your project root:

```json
{
  "mcpServers": {
    "hive": {
      "url": "https://mcp.hiveintelligence.xyz/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_HIVE_API_KEY"
      }
    }
  }
}
```

Replace `YOUR_HIVE_API_KEY` with your actual key. Restart Cursor or reload the MCP server list from the command palette.

---

## Step 3: Verify a live tool call

After the client reloads, verify that Hive is actually being called. Start with a price prompt, then test one or two domain workflows:

### Price check

> "What's the current price of Bitcoin and Ethereum?"

This calls `get_price` under the hood - one of the simplest tools. Your agent should return current prices from CoinGecko with provider freshness metadata.

You are ready to continue when the response shows a Hive tool call, current provider-backed data, and freshness or runtime metadata instead of a model-only answer.

### DeFi overview

> "Show me the top DeFi protocols by TVL"

This uses `get_defi_protocols` from DeFiLlama. You'll get a ranked list of protocols with their current total value locked.

### Token security audit

> "Is the token at contract address 0x6982508145454Ce325dDbE47a25d4ec3d2311933 safe to interact with?"

This triggers GoPlus security detection tools. The agent will check for honeypot risk, proxy contracts, owner privileges, and other red flags. (That address is PEPE - a real token you can test with.)

### Wallet balances

> "What are my wallet balances at 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045?"

This uses Moralis wallet tools to pull token balances for any public wallet. (That address is vitalik.eth - publicly known.)

### Prediction markets

> "What prediction markets are active on Polymarket right now?"

This queries Polymarket data through Hive's prediction markets category.

---

## Step 4: Use category endpoints for focused agents

The root endpoint (`/mcp`) exposes the compact discovery and routing layer - great for general-purpose agents. If you're building a focused agent that only needs market data, connect to a category endpoint so the direct tool list stays smaller.

Hive provides 10 category-scoped endpoints. Each exposes only the tools relevant to that domain:

| Category | Endpoint | Use case |
|----------|----------|----------|
| Market Data | `/hive_market_data/mcp` | Prices, market caps, trending coins |
| DeFi Protocols | `/hive_defi_protocol/mcp` | TVL, yields, fees, protocol analytics |
| DEX Analytics | `/hive_onchain_dex/mcp` | On-chain trading, pools, liquidity |
| Security & Risk | `/hive_security_risk/mcp` | Contract audits, honeypot detection |
| Portfolio & Wallet | `/hive_portfolio_wallet/mcp` | Wallet balances, transaction history (EVM + Solana) |
| Token & Contract | `/hive_token_contract/mcp` | Token metadata, contract details, Solana DAS |
| NFT Analytics | `/hive_nft_analytics/mcp` | NFT collections, floor prices, compressed NFTs |
| Prediction Markets | `/hive_prediction_markets/mcp` | Polymarket events and outcomes |
| Search & Discovery | `/hive_search_discovery/mcp` | Cross-provider search |
| Network & Infrastructure | `/hive_network_infrastructure/mcp` | Chain info, gas, block data, Solana RPC |

To use a category endpoint, replace the URL in a config-file client such as Cursor, VS Code, Windsurf, Codex CLI, or Gemini CLI. For example, a market-data-only Cursor agent:

```json
{
  "mcpServers": {
    "hive-market-data": {
      "url": "https://mcp.hiveintelligence.xyz/hive_market_data/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_HIVE_API_KEY"
      }
    }
  }
}
```

You can also connect multiple category endpoints if your agent needs a specific combination - for example, market data plus security:

```json
{
  "mcpServers": {
    "hive-market-data": {
      "url": "https://mcp.hiveintelligence.xyz/hive_market_data/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_HIVE_API_KEY"
      }
    },
    "hive-security": {
      "url": "https://mcp.hiveintelligence.xyz/hive_security_risk/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_HIVE_API_KEY"
      }
    }
  }
}
```

---

## Troubleshooting

### "Invalid API key" or 401 errors

- Verify your key is correct by copying it exactly from the [dashboard](https://www.hiveintelligence.xyz/dashboard)
- Make sure you're using the `Authorization: Bearer YOUR_KEY` header (the `x-api-key` legacy alias also works; don't send both at once)
- Check that there are no trailing spaces or newline characters in your key

### Rate limiting (429 errors)

Rate limits depend on the current plan and runtime window. If you hit `429`:

- Wait for the `Retry-After` window before retrying.
- Check usage and credit state in the dashboard.
- Reduce polling, cache repeated discovery and market-data calls, or review [Rate Limits](/rate-limits) and [Pricing](/pricing) before increasing traffic.

### "Tool not found" errors

- The tool name may have changed. Use `tools/list` or the `hive://tools` resource to see the current catalog
- Check that you're connected to the right endpoint - category endpoints only expose tools in that category
- Tool names use snake_case (e.g., `get_price`, not `getPrice`)

### MCP server not connecting

- Ensure your client supports MCP over HTTP (streamable HTTP or SSE transport)
- Check that you've restarted your client after editing the configuration
- Verify the endpoint URL has no typos: `https://mcp.hiveintelligence.xyz/mcp`

---

## Next steps

- **[API Integration](/api-integration)** - Full reference for MCP, REST, and discovery endpoints
- **[Tools Reference](/tools)** - Browse all tools with input schemas and descriptions
- **[Quick Start](/quick-start)** - Default first-run path for key creation, client setup, live-call verification, and discovery
