Install in Your AI Client

Connect Hive to VS Code

Written by , Product docsLast updated

Connect VS Code to Hive so GitHub Copilot Chat can call live crypto tools from agent mode. Use per-project MCP config for repo-specific setup, or add a user-level server when you want Hive available across workspaces.


Before you start

  1. VS Code installed from code.visualstudio.com.
  2. GitHub Copilot Chat extension installed and signed in.

Configure VS Code (per-project)

1. Create .vscode/mcp.json in your project root

json
{
  "servers": {
    "hive": {
      "type": "http",
      "url": "https://mcp.hiveintelligence.xyz/mcp"
    }
  }
}

VS Code discovers Hive's OAuth metadata and opens a browser authorization window the first time it starts the server. The project file contains no secret.

Requires VS Code 1.102 or newer with HTTP MCP transport (the type: "http" field). If your VS Code rejects the field, update with Code -> Check for Updates and reload, or fall back to the stdio config below. VS Code connects directly and handles OAuth in a browser - no Node subprocess. Reference: Add and manage MCP servers in VS Code and the MCP configuration reference.

2. Reload VS Code

Run Developer: Reload Window from the command palette (⌘⇧P on macOS).

3. Verify it worked

Open Copilot Chat, switch to agent mode, and ask:

"Using the Hive MCP server, what is the current price of BTC, ETH, and SOL?"

Copilot should call Hive's get_price tool and return live data.

Alternative: local stdio server

For older VS Code builds without HTTP transport, or when you want to run Hive locally with your own provider credentials:

json
{
  "servers": {
    "hive": {
      "command": "npx",
      "args": ["-y", "-p", "hive-intelligence@latest", "hive"]
    }
  }
}

This starts the self-hosted Hive MCP server and does not use HIVE_API_KEY. Add provider-specific variables to env only when needed. The 1.3.0 release candidate requires Node 22.12+ on your PATH.


Global setup (all projects)

If you want Hive available in every workspace:

  1. Open VS Code settings (⌘, on macOS).
  2. Search for mcp.
  3. Under Chat: MCP, add a server entry pointing at the same config shape as above.

Global config lives in VS Code's user settings JSON. The exact path depends on your OS.


What to ask in VS Code

Copilot Chat is especially useful for building crypto-aware code:

  • "Generate a TypeScript function that calls Hive's get_pool_info tool and returns typed pool stats."
  • "Build a React component that shows live BTC, ETH, and SOL prices using Hive."
  • "Check this contract address for security issues before I import its ABI: 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  • "Write a GitHub Action that posts a daily crypto market summary to Slack using Hive."

Copilot Chat chains Hive tool calls with code generation automatically.


API key security

The URL-only .vscode/mcp.json above is safe to share because browser authorization is stored separately by VS Code. Never commit a literal Hive API key.

If you used a quick local config with a literal key, add this line to .gitignore:

text
.vscode/mcp.json

Do not put an env block under an HTTP server. In VS Code's MCP schema, env is for stdio servers. HTTP auth belongs in headers, preferably through an input variable:

json
"headers": {
  "Authorization": "Bearer ${input:hive-api-key}"
}

Troubleshooting

Copilot Chat doesn't list Hive. Reload the window. Check the MCP output panel for errors: View → Output → MCP.

"npx: command not found". Install Node.js 22.12 or newer from nodejs.org.

API key rejected. Regenerate at /dashboard/keys.

Tools work in agent mode but not in chat mode. MCP tools are only available in Copilot's agent mode (not the basic inline chat). Switch via the toggle above the chat input.


Other clients


Next steps