Windsurf is an AI-powered development environment that combines the power of AI assistance with a full-featured IDE. When integrated with Unkey’s APIs, you can rapidly build secure, scalable applications with intelligent code generation and real-time collaboration features.

Getting Started

1. Set Up Your Unkey Environment

Before working with Windsurf, ensure you have your Unkey credentials ready:

1

Create Your API

Navigate to the Unkey Dashboard and create a new API for your project.

2

Generate Root Key

Go to Settings > Root Keys and create a new root key with appropriate permissions.

3

Copy API Details

Note down your API ID and root key - you’ll need these for your application.

2. Set Up Unkey MCP Server (Optional)

Windsurf supports the Model Context Protocol (MCP) which allows you to connect directly to Unkey’s APIs. This gives Windsurf access to your Unkey workspace for more intelligent suggestions.

Install Unkey MCP Server

To get started with Windsurf, open “Windsurf Settings > Cascade > Model Context Protocol (MCP) Servers”, click on “Add Server”, click “Add custom server”, and add the following configuration for Unkey.

  1. Configure the MCP Server

    {
      "mcpServers": {
        "Unkey": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "https://mcp.unkey.com/mcp/v1",
            "--header",
            "MCP-UNKEY-BEARER-AUTH:${UNKEY_ROOT_KEY}"
          ]
        }
      }
    }
    

    For ratelimiting specific operations, you can also add:

    {
      "mcpServers": {
        "UnkeyRateLimiting": {
          "command": "npx",
          "args": [
            "mcp-remote",
            "https://mcp.unkey.com/mcp/ratelimits/",
            "--header",
            "MCP-UNKEY-V2-ROOT-KEY:${UNKEY_ROOT_KEY}"
          ]
        }
      }
    }
    
  2. Set Environment Variable

    export UNKEY_ROOT_KEY="your_root_key_here"
    
  3. Restart Windsurf

    Restart Windsurf to load the MCP server configuration.