---
title: Connect Hive to VS Code
lastUpdated: '2026-06-03'
nextjs:
  metadata:
    title: "Install Hive in VS Code | Crypto MCP for GitHub Copilot Chat"
    description: "Connect VS Code and GitHub Copilot Chat to Hive's remote MCP endpoint for prices, DeFi, wallets, and security tools."
    alternates:
      canonical: https://www.hiveintelligence.xyz/install/vs-code
    keywords: "vscode crypto, vscode mcp crypto, github copilot crypto, hive vscode, vs code mcp server"
---

**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. {% .lead %}

{% ai-doc-actions path="/install/vs-code" title="VS Code Install Guide" /%}

---

## Before you start

1. VS Code installed from [code.visualstudio.com](https://code.visualstudio.com).
2. GitHub Copilot Chat extension installed and signed in.
3. A Hive API key from [/dashboard/keys](/dashboard/keys).

---

## Configure VS Code (per-project)

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

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "hive-api-key",
      "description": "Hive API Key",
      "password": true
    }
  ],
  "servers": {
    "hive": {
      "type": "http",
      "url": "https://mcp.hiveintelligence.xyz/mcp",
      "headers": {
        "Authorization": "Bearer ${input:hive-api-key}"
      }
    }
  }
}
```

VS Code prompts for the key the first time it starts the server and stores the input value for later use.

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 to `mcp.hiveintelligence.xyz` directly and authenticates with `Authorization: Bearer` - no Node subprocess. Reference: [Add and manage MCP servers in VS Code](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) and the [MCP configuration reference](https://code.visualstudio.com/docs/copilot/reference/mcp-configuration).

### 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: stdio via the local Node wrapper

For older VS Code builds without HTTP transport, or for air-gapped environments:

```json
{
  "servers": {
    "hive": {
      "command": "npx",
      "args": ["-y", "-p", "hive-intelligence", "hive"],
      "env": {
        "HIVE_API_KEY": "YOUR_HIVE_API_KEY"
      }
    }
  }
}
```

The `HIVE_API_KEY` env var feeds the local wrapper, which then sends `Authorization: Bearer` to Hive on every request — authentication is identical to the HTTP path, just with one extra hop. Requires Node 20+ 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 — 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

Do not commit a `.vscode/mcp.json` file that contains a literal Hive API key. The input-variable config above is safe to share because the secret is stored separately by VS Code.

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 20+ from [nodejs.org](https://nodejs.org).

**API key rejected.** Regenerate at [/dashboard/keys](/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

- [Cursor](/install/cursor) — Cursor is VS Code-based with tighter MCP integration
- [Claude Desktop](/install/claude-desktop) — for non-IDE workflows
- [All clients](/install) — full list

---

## Next steps

- [Agent Resources](/ai-agent-hub) — what Copilot Chat can build once connected
- [JavaScript integration](/sdk/javascript) — REST examples and TypeScript adapter notes for VS Code projects
- [Tools Reference](/tools) — every tool Copilot can call
