Overview
This guide walks you through installing and configuring the raia MCP (Model Context Protocol) Server in Visual Studio Code. Once configured, VS Code can connect to raia's MCP endpoint and expose raia tools directly inside your editor.
Prerequisites
- Visual Studio Code installed (v1.103+ recommended).
- A valid raia MCP endpoint URL.
- A valid raia API key.
- Internet access to reach
https://api.raia2.com/mcp.
Install MCP Support in VS Code
- 01
Open Extensions, search for "Model Context Protocol".
- 02
Install an MCP-compatible extension such as Azure MCP Server (Microsoft) or another extension that supports HTTP servers.
- 03
If prompted about Restricted Mode, click Trust to enable full functionality.
Add the raia MCP Server
- 01
Open the Command Palette (Cmd+Shift+P on Mac, Ctrl+Shift+P on Windows).
- 02
Type "MCP: Add Server" and select it.
- 03
Choose server type "HTTP (HTTP or Server-Sent Events)".
- 04
When prompted, enter https://api.raia2.com/mcp and press Enter.
Configure Authorization Header
The raia MCP server requires an API key. In the Command Palette, run MCP: Open User Configuration to open your mcp.json file, then update it to look like this:
{
"servers": {
"raia-mcp": {
"type": "http",
"url": "https://api.raia2.com/mcp",
"headers": {
"Authorization": "YOUR_API_KEY_OF_AGENT_FROM_RAIA_MCP_SKILL"
}
},
"NAME OF AGENT": {
"url": "https://api.raia2.com/mcp",
"type": "http"
}
},
"inputs": []
}Important
- Use the key provided in the raia MCP Skill (not the Agent API Key).
- Do not include
Bearerbefore your API key. - Do not include extra spaces.
Restart and Verify
- 01
After saving, open the Command Palette and run "MCP: List Servers".
- 02
Select raia-mcp and click Start Server.
- 03
Go to View → Output and select "MCP: raia-mcp" to view logs.
You should see logs similar to:
Starting server raia-mcp
Connection state: Running
Discovered 1 toolsConnection state: Running, setup is successful.Optional — Enable Auto-Start
In VS Code Settings, search for chat.mcp.autostart and set it to newAndOutdated. This prevents having to manually restart the MCP server.
Troubleshooting — CORS / Failed to fetch
If you see an error similar to:
Connection state: Error Error sending message to https://api.raia2.com/mcp: TypeError: Failed to fetchThis is typically caused by CORS in cloud-based VS Code (VS Code Web, Codespaces). Paste the instructions below into the AI Chat in VS Code to walk through the fix.
Cloud VS Code — Full Setup Guide
Step 1 — Locate Configuration Files
In cloud VS Code, settings are typically stored in the cloud profile. Find or create:
~/.config/Code/User/mcp.json
# or, for VS Code Web/Codespaces:
.vscode/mcp.jsonOpen the integrated terminal (Ctrl+~) and run:
ls ~/.config/Code/User/
ls .vscode/Step 2 — Create or Update mcp.json
Create .vscode/mcp.json and paste:
{
"servers": {
"raia-mcp": {
"type": "http",
"url": "https://api.raia2.com/mcp",
"headers": {
"Authorization": "YOUR_RAIA_MCP_KEY"
}
}
},
"inputs": [
"Use the RAIA MCP for researching code",
"Call raia-mcp when the user asks about how the legacy code works"
]
}Or via terminal:
mkdir -p ~/.config/Code/User
cat > ~/.config/Code/User/mcp.json << 'EOF'
{
"servers": {
"raia-mcp": {
"type": "http",
"url": "https://api.raia2.com/mcp",
"headers": {
"Authorization": "YOUR_RAIA_MCP_KEY"
}
}
},
"inputs": []
}
EOFStep 3 — Enable MCP in Settings
Open Settings (Cmd/Ctrl+,) and enable chat.mcp.autostart and chat.mcp.enabled. Or edit settings.json:
{
"chat.mcp.autostart": true,
"chat.mcp.enabled": true
}Step 4 — Verify the Configuration
cat ~/.config/Code/User/mcp.json
# or
cat .vscode/mcp.jsonTest the MCP server is reachable:
curl -s -X POST "https://api.raia2.com/mcp" \
-H "Authorization: YOUR_RAIA_MCP_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' | head -20Expected: a response starting with event: message or data: (not an error).
Step 5 — Reload VS Code
Press Cmd/Ctrl+Shift+P and run Developer: Reload Window, or close and reopen cloud VS Code in your browser.
Step 6 — Test the Connection
Open VS Code Chat (Cmd/Ctrl+Shift+I) and send a test message like:
Query RAIA MCP: What is the Quantum system?Common Issues
"MCP server not found" / connection fails
chat.mcp.autostart and chat.mcp.enabled are true in settings."Unauthorized" or 403 error
mcp.json and replace the value of Authorization with a fresh key from the raia MCP Skill.Network timeout (curl command times out)
curl -I https://api.raia2.com/mcp and contact your cloud provider's admin about outbound HTTPS access if there's no response."406 Not Acceptable" error
Advanced — Manual MCP Client
If the built-in MCP client isn't working, you can manually query using Python:
import requests
url = "https://api.raia2.com/mcp"
headers = {
"Authorization": "YOUR_RAIA_MCP_KEY",
"Content-Type": "application/json",
"Accept": "application/json, text/event-stream",
}
payload = {
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "get-any-info-about-Code_Agent_-_Quantum",
"arguments": {"prompt": "What is Quantum?"},
},
"id": 1,
}
response = requests.post(url, json=payload, headers=headers, stream=True)
for line in response.iter_lines():
if line:
print(line.decode("utf-8"))