Skip to main content

Set Up VS Code (GitHub Copilot)

Preview

The MCP server is currently in preview. The configurations below point to api-preview.stoxiio.com.

Connect Stoxiio to GitHub Copilot in VS Code using the built‑in MCP support. This lets you ask Copilot Chat questions about your portfolios, wealth, and dashboards directly from your editor.

Prerequisites

  • VS Code 1.99+ (MCP support was added in 1.99)
  • GitHub Copilot extension installed and active
  • A Stoxiio Read‑only API key — see Generate an API Key

Configuration

Create a .vscode/mcp.json file at the root of your project:

{
"inputs": [
{
"id": "stoxiio-api-key",
"type": "promptString",
"description": "Stoxiio API Key (starts with stx_)",
"password": true
}
],
"servers": {
"stoxiio": {
"type": "http",
"url": "https://api-preview.stoxiio.com/mcp",
"headers": {
"X-Api-Key": "${input:stoxiio-api-key}"
}
}
}
}

This file can safely be committed to version control — the API key itself is never stored in the file. VS Code will prompt you for the key on first use and then persist it securely in its built‑in secret storage. The key survives restarts — you only need to enter it once.

Option 2 — User‑level configuration (global)

Open your VS Code User Settings (settings.json) and add:

{
"mcp": {
"inputs": [
{
"id": "stoxiio-api-key",
"type": "promptString",
"description": "Stoxiio API Key (starts with stx_)",
"password": true
}
],
"servers": {
"stoxiio": {
"type": "http",
"url": "https://api-preview.stoxiio.com/mcp",
"headers": {
"X-Api-Key": "${input:stoxiio-api-key}"
}
}
}
}
}

Connect

  1. Open the Copilot Chat panel (Ctrl+Shift+I / Cmd+Shift+I).
  2. Click the Agent mode selector (or use @ to switch modes).
  3. Make sure you are in Agent mode — MCP tools are only available in Agent mode.
  4. On first use, VS Code will prompt you for your API key. Enter your stx_… key — it is stored in VS Code's secure secret storage and persists across restarts.
  5. You should see a 🔧 icon or the tools list showing Stoxiio tools are available.

VS Code MCP tools indicator

Verify the connection

In Copilot Chat (Agent mode), type:

What are my portfolios?

Copilot should call the list_portfolios tool and return your portfolio data.

Troubleshooting

ProblemSolution
No tools showingMake sure you're in Agent mode, not Ask or Edit mode.
401 UnauthorizedCheck that your API key is correct and has the Read scope.
Connection timeoutVerify your network can reach https://api-preview.stoxiio.com/mcp.
"MCP server not found"Ensure the mcp.json file is in .vscode/ at your workspace root.
Need to re‑enter keyOpen the Command Palette → "MCP: Reset Cached Input" to clear the stored key and be prompted again.
tip

You can check the MCP server status in the Output panel → select MCP from the dropdown.