Browse all documentation

Connect Cursor to Narwhal MCP

Configure Cursor for Narwhal's hosted Streamable HTTP MCP server with a secure Bearer token placeholder.

Cursor accepts hosted HTTP MCP servers in .cursor/mcp.json. The configuration below uses a variable placeholder for the Narwhal Bearer key.

Configure Cursor

Create or open .cursor/mcp.json in the project or your user configuration, then add:

.cursor/mcp.json
{
  "mcpServers": {
    "narwhal": {
      "url": "https://api.narwhalapi.com/mcp",
      "headers": {
        "Authorization": "Bearer ${env:NARWHAL_API_KEY}"
      }
    }
  }
}

Make sure the variable is available to the client that launches Cursor. Restart or reload MCP servers after saving the file. See Cursor's MCP configuration guide for current client behavior.

Verify the connection

Open the client's MCP server list and confirm that narwhal is connected. For a command-line check, run agent mcp list.

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.