Connect VS Code to Narwhal MCP
Configure Visual Studio Code's remote MCP server entry for Narwhal with a secure Bearer token placeholder.
Visual Studio Code supports remote HTTP MCP servers in .vscode/mcp.json. Use an input variable so the API key is requested securely instead of stored in the workspace file.
Configure VS Code
Open MCP: Open Workspace Folder MCP Configuration from the Command Palette and add:
{
"inputs": [
{
"type": "promptString",
"id": "NARWHAL_API_KEY",
"description": "Narwhal API Bearer key",
"password": true
}
],
"servers": {
"narwhal": {
"type": "http",
"url": "https://api.narwhalapi.com/mcp",
"headers": {
"Authorization": "Bearer ${input:NARWHAL_API_KEY}"
}
}
}
}When VS Code prompts for NARWHAL_API_KEY, enter the key through the input prompt. Keep the file itself free of credentials. See VS Code's MCP server guide for current client behavior.
Verify the connection
Open the client's MCP server list and confirm that narwhal is connected. In the Command Palette, run MCP: List Servers.
Then ask the client to list the available Narwhal tools. Tool discovery does not consume data quota; each successful tools/call consumes one request.
Use the main MCP guide for the public tool list, arguments, response shape and quota rules.
Keep the key private
Use Cursor's or VS Code's secure variable/input storage for the placeholder. Do not commit a real key to mcp.json, paste it into a prompt, put it in a URL, or expose it in browser code.
Every request requires the Authorization: Bearer header. See the authentication guide for key storage and rotation.
Docs