diff --git a/apps/docs/ai-code-gen/cursor.mdx b/apps/docs/ai-code-gen/cursor.mdx
new file mode 100644
index 0000000000..419736e16a
--- /dev/null
+++ b/apps/docs/ai-code-gen/cursor.mdx
@@ -0,0 +1,133 @@
+---
+title: Using Cursor with Unkey
+description: Leverage Cursor's AI capabilities to build applications with Unkey's APIs
+mode: "wide"
+---
+
+# Using Cursor with Unkey
+
+Cursor is an AI-powered code editor that can help you build applications faster. When combined with Unkey's APIs, you can quickly generate secure, scalable applications with API key management and rate limiting.
+
+## Prerequisites
+
+## Getting Started
+
+### 1. Set Up Your Unkey Workspace
+
+First, create your Unkey workspace and get your API keys:
+
+
+
+Navigate to the [Unkey Dashboard](https://app.unkey.com/apis) and create a new API for your project.
+
+
+
+Go to [Settings > Root Keys](https://app.unkey.com/settings/root-keys) and create a new root key with the necessary permissions.
+
+
+
+Copy your API ID from the dashboard - you'll need this for generating API keys.
+
+
+
+### 2. Set Up Unkey MCP Server (Optional)
+
+Cursor supports the Model Context Protocol (MCP) which allows you to connect directly to Unkey's APIs. This gives Cursor access to your Unkey workspace for more intelligent suggestions.
+
+#### Install Unkey MCP Server
+
+1. **Configure the MCP Server**
+
+ Create or update your Cursor configuration file with the Unkey MCP server:
+
+ ```json
+ {
+ "mcpServers": {
+ "Unkey": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${UNKEY_ROOT_KEY}"
+ ]
+ }
+ }
+ }
+ ```
+
+ For rate limiting specific operations, you can also add:
+
+ ```json
+ {
+ "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**
+
+ ```bash
+ export UNKEY_ROOT_KEY="your_root_key_here"
+ ```
+
+3. **Restart Cursor**
+
+ Restart Cursor to load the MCP server configuration.
+
+## Tips and Tricks for Cursor with Unkey
+
+### 1. Keep Your Requests Small
+
+When working with Cursor, break down complex tasks into smaller, focused requests:
+
+**Good:**
+```
+Create a function to verify an API key with Unkey that returns a boolean
+```
+
+**Better:**
+```
+Create a TypeScript function that:
+- Takes an API key string as input
+- Uses @unkey/api to verify the key
+- Returns a boolean indicating if the key is valid
+- Includes proper error handling
+```
+
+### 2. Update and Reference Your README.md
+
+Keep your project's README.md updated with Unkey-specific information. Cursor uses this context to provide better suggestions:
+
+```markdown
+# My Project
+
+This project uses Unkey for API authentication and rate limiting.
+
+## Environment Variables
+- `UNKEY_ROOT_KEY`: Your Unkey root key
+- `UNKEY_API_ID`: Your API ID from the Unkey dashboard
+
+## API Routes
+- `/api/protected` - Requires valid API key
+- `/api/keys` - Manage API keys (admin only)
+
+## Rate Limiting
+- Free tier: 100 requests/hour
+- Pro tier: 1000 requests/hour
+```
+
+## Add Unkey Documentation Context
+
+Adding Unkey docs can let you specifically refer to Unkey features when building your app.
+
+From Cursor Settings > Features > Docs add new doc, use the URL "https://unkey.com/docs"
diff --git a/apps/docs/ai-code-gen/overview.mdx b/apps/docs/ai-code-gen/overview.mdx
new file mode 100644
index 0000000000..9edf6435af
--- /dev/null
+++ b/apps/docs/ai-code-gen/overview.mdx
@@ -0,0 +1,35 @@
+---
+title: AI Code Gen with Unkey
+description: Use AI-powered code generation tools with Unkey's APIs and services
+mode: "wide"
+---
+
+# AI Code Gen with Unkey
+
+Unkey provides powerful integrations with AI code generation tools to help you build applications faster and more efficiently. Whether you're using Cursor, GitHub Copilot, Windsurf,you can leverage AI to generate code that integrates seamlessly with Unkey's APIs.
+
+## Available AI Tools
+
+
+
+ Use Cursor's AI capabilities with Unkey's API documentation and examples
+
+
+ Build Unkey applications with Windsurf's AI-powered development environment
+
+
+ Connect your favorite AI code generation tool to Unkey's APIs using Model Context Protocol
+
+
diff --git a/apps/docs/ai-code-gen/unkey-mcp.mdx b/apps/docs/ai-code-gen/unkey-mcp.mdx
new file mode 100644
index 0000000000..fadaeb9b57
--- /dev/null
+++ b/apps/docs/ai-code-gen/unkey-mcp.mdx
@@ -0,0 +1,369 @@
+---
+title: Unkey MCP (Model Context Protocol)
+description: Connect AI tools to Unkey's APIs using Model Context Protocol
+mode: "wide"
+---
+
+# Unkey MCP (Model Context Protocol)
+
+The Unkey Model Context Protocol (MCP) servers provide direct integration between AI tools and Unkey's APIs. This allows you to interact with your Unkey workspace directly, enabling AI-powered API key management, rate limiting configuration, and analytics queries.
+
+## What is MCP?
+
+Model Context Protocol (MCP) is an open standard that allows AI applications to securely access external data and services. Unkey's MCP servers give Claude Desktop direct access to your Unkey APIs, enabling intelligent assistance with API key management and rate limiting.
+
+## Available MCP Servers
+
+Unkey provides two MCP servers:
+
+
+
+ Full access to Unkey's API management capabilities
+
+
+ Specialized server for rate limiting operations
+
+
+
+## Prerequisites
+
+- [Unkey account](https://app.unkey.com/auth/sign-up) created
+- Unkey root key with appropriate permissions
+- Node.js installed (for npx command)
+
+## Installation
+
+Below is an example of using Unkey MCP with Claude but it can also be used with other AI applications.
+
+### Unkey API MCP
+
+The main Unkey MCP server provides access to the complete Unkey API:
+
+1. **Open Claude Desktop Configuration**
+
+ Navigate to your Claude Desktop configuration file:
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
+
+2. **Add the MCP Server Configuration**
+
+ Add the following configuration to your `claude_desktop_config.json`:
+
+ ```json
+ {
+ "mcpServers": {
+ "Unkey": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${UNKEY_ROOT_KEY}"
+ ]
+ }
+ }
+ }
+ ```
+
+3. **Set Environment Variable**
+
+ Set your Unkey root key as an environment variable:
+
+ ```bash
+ # macOS/Linux
+ export UNKEY_ROOT_KEY="unkey_xxx"
+
+ # Windows
+ set UNKEY_ROOT_KEY=unkey_xxx
+ ```
+
+4. **Restart Claude Desktop**
+
+ Close and restart Claude Desktop to load the MCP server.
+
+### Unkey Rate Limiting MCP
+
+For specialized rate limiting operations, use the dedicated rate limiting MCP server:
+
+1. **Add Rate Limiting MCP Configuration**
+
+ Add this configuration to your `claude_desktop_config.json`:
+
+ ```json
+ {
+ "mcpServers": {
+ "UnkeyRateLimiting": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/ratelimits/",
+ "--header",
+ "MCP-UNKEY-V2-ROOT-KEY:${UNKEY_ROOT_KEY}"
+ ]
+ }
+ }
+ }
+ ```
+
+2. **Use Both Servers**
+
+ You can configure both MCP servers simultaneously:
+
+ ```json
+ {
+ "mcpServers": {
+ "Unkey": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${UNKEY_ROOT_KEY}"
+ ]
+ },
+ "UnkeyRateLimiting": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/ratelimits/",
+ "--header",
+ "MCP-UNKEY-V2-ROOT-KEY:${UNKEY_ROOT_KEY}"
+ ]
+ }
+ }
+ }
+ ```
+
+## Getting Your Root Key
+
+To use the MCP servers, you need a Unkey root key with appropriate permissions:
+
+
+
+Go to [Settings > Root Keys](https://app.unkey.com/settings/root-keys) in your Unkey dashboard.
+
+
+
+Click "Create New Root Key" and select the permissions you need:
+- **API Key Management**: For creating, updating, and deleting API keys
+- **Rate Limiting**: For configuring rate limits
+- **Analytics**: For querying usage data
+
+
+
+Copy your root key and store it securely. You'll use this as your environment variable.
+
+
+
+## Using MCP with Claude Desktop
+
+Once configured, you can interact with your Unkey workspace directly through Claude Desktop:
+
+### API Key Management
+
+Ask Claude to help with API key operations:
+
+```
+Can you create a new API key for my mobile app with the following settings:
+- Name: "Mobile App Production"
+- Rate limit: 1000 requests per hour
+- Expiration: 90 days from now
+- Metadata: {"app": "mobile", "version": "1.0", "environment": "production"}
+```
+
+### Rate Limiting Configuration
+
+Configure rate limits through natural language:
+
+```
+I need to set up rate limiting for my API with these tiers:
+- Free tier: 100 requests per hour
+- Pro tier: 1000 requests per hour
+- Enterprise tier: 10000 requests per hour
+
+Can you help me configure these limits?
+```
+
+### Analytics and Monitoring
+
+Query your API usage data:
+
+```
+Show me the API usage statistics for the last 7 days, including:
+- Total requests
+- Top 5 API keys by usage
+- Error rates
+- Geographic distribution of requests
+```
+
+### Troubleshooting
+
+Get help with common issues:
+
+```
+I'm seeing 401 errors for API key verification. Can you help me debug this?
+The API key is: uk_xxx
+The API ID is: api_xxx
+```
+
+## Available Commands
+
+### API Key Operations
+
+- **Create API Key**: Generate new API keys with custom settings
+- **List API Keys**: View all API keys in your workspace
+- **Update API Key**: Modify existing API key properties
+- **Delete API Key**: Remove API keys from your workspace
+- **Verify API Key**: Check if an API key is valid and active
+
+### Rate Limiting Operations
+
+- **Configure Rate Limits**: Set up rate limiting rules
+- **Check Rate Limit Status**: Monitor current rate limit usage
+- **Update Rate Limits**: Modify existing rate limit configurations
+- **Delete Rate Limits**: Remove rate limiting rules
+
+### Analytics and Monitoring
+
+- **Usage Analytics**: Query API usage statistics
+- **Error Analysis**: Investigate API errors and issues
+- **Performance Metrics**: Monitor API performance data
+- **Usage Reports**: Generate custom usage reports
+
+## Example Conversations
+
+### Creating an API Key
+
+**You**: "Create a new API key for my development environment with a rate limit of 500 requests per hour and set it to expire in 30 days."
+
+**Claude**: "I'll create a new API key for your development environment with the specified settings. Let me use the Unkey MCP to create this key with a 500 requests/hour rate limit and 30-day expiration."
+
+### Analyzing API Usage
+
+**You**: "What are my top 3 API keys by usage this month?"
+
+**Claude**: "Let me query your Unkey analytics to find your top 3 API keys by usage this month. I'll pull the usage data and provide you with detailed statistics."
+
+### Debugging Issues
+
+**You**: "I'm getting rate limit errors but I thought my limit was higher. Can you check my current rate limit configuration?"
+
+**Claude**: "I'll check your current rate limit configuration using the Unkey MCP. Let me examine your rate limiting settings and current usage to help diagnose the issue."
+
+## Security Best Practices
+
+### Environment Variables
+
+- Store your root key in environment variables, never in configuration files
+- Use different root keys for different environments (development, staging, production)
+- Regularly rotate your root keys
+
+### Permissions
+
+- Grant only the minimum required permissions to your root keys
+- Use separate root keys for different operations when possible
+- Monitor root key usage through audit logs
+
+### Access Control
+
+- Limit access to your Claude Desktop configuration
+- Use secure storage for your root keys
+- Implement proper backup and recovery procedures
+
+## Troubleshooting
+
+### Common Issues
+
+1. **MCP Server Not Loading**
+ - Check that Node.js is installed and accessible
+ - Verify your configuration file syntax
+ - Ensure environment variables are set correctly
+
+2. **Authentication Errors**
+ - Verify your root key is correct and has proper permissions
+ - Check that the environment variable is set
+ - Confirm your root key hasn't expired
+
+3. **Connection Issues**
+ - Ensure you have internet connectivity
+ - Check if your firewall is blocking connections
+ - Verify the MCP server URLs are correct
+
+### Getting Help
+
+If you encounter issues:
+
+1. Check the Claude Desktop logs for error messages
+2. Verify your configuration matches the examples exactly
+3. Test your root key directly with the Unkey API
+4. Join the [Unkey Discord](https://go.unkey.com/discord) for community support
+
+## Advanced Configuration
+
+### Custom Environment Variables
+
+You can use custom environment variable names:
+
+```json
+{
+ "mcpServers": {
+ "Unkey": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${MY_CUSTOM_UNKEY_KEY}"
+ ]
+ }
+ }
+}
+```
+
+### Multiple Workspaces
+
+Configure multiple Unkey workspaces:
+
+```json
+{
+ "mcpServers": {
+ "UnkeyProduction": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${UNKEY_PROD_KEY}"
+ ]
+ },
+ "UnkeyStaging": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${UNKEY_STAGING_KEY}"
+ ]
+ }
+ }
+}
+```
+
+## Next Steps
+
+- Explore [Cursor with Unkey](/ai-code-gen/cursor) for IDE-based AI assistance
+- Check out [Windsurf with Unkey](/ai-code-gen/windsurf) for collaborative development
+
+## Resources
+
+- [Unkey API Reference](/api-reference/authentication)
+- [Unkey Dashboard](https://app.unkey.com)
+- [Community Discord](https://go.unkey.com/discord)
diff --git a/apps/docs/ai-code-gen/windsurf.mdx b/apps/docs/ai-code-gen/windsurf.mdx
new file mode 100644
index 0000000000..9cb1be7c9c
--- /dev/null
+++ b/apps/docs/ai-code-gen/windsurf.mdx
@@ -0,0 +1,83 @@
+---
+title: Using Windsurf with Unkey
+description: Build applications with Windsurf's AI-powered development environment and Unkey's APIs
+mode: "wide"
+---
+
+# Using Windsurf with Unkey
+
+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:
+
+
+
+Navigate to the [Unkey Dashboard](https://app.unkey.com/apis) and create a new API for your project.
+
+
+
+Go to [Settings > Root Keys](https://app.unkey.com/settings/root-keys) and create a new root key with appropriate permissions.
+
+
+
+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**
+
+ ```json
+ {
+ "mcpServers": {
+ "Unkey": {
+ "command": "npx",
+ "args": [
+ "mcp-remote",
+ "https://mcp.unkey.com/mcp/v1",
+ "--header",
+ "MCP-UNKEY-BEARER-AUTH:${UNKEY_ROOT_KEY}"
+ ]
+ }
+ }
+ }
+ ```
+
+ For rate limiting specific operations, you can also add:
+
+ ```json
+ {
+ "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**
+
+ ```bash
+ export UNKEY_ROOT_KEY="your_root_key_here"
+ ```
+
+3. **Restart Windsurf**
+
+ Restart Windsurf to load the MCP server configuration.
diff --git a/apps/docs/docs.json b/apps/docs/docs.json
index 40c17ab04b..c85d1319d7 100644
--- a/apps/docs/docs.json
+++ b/apps/docs/docs.json
@@ -23,6 +23,7 @@
"introduction",
{
"group": "Quickstart",
+ "icon": "rocket",
"pages": [
{
"group": "Onboarding",
@@ -57,6 +58,7 @@
},
{
"group": "Security",
+ "icon": "shield",
"pages": [
"security/overview",
"security/root-keys",
@@ -65,6 +67,16 @@
"security/github-scanning",
"security/delete-protection"
]
+ },
+ {
+ "group": "AI Code Gen",
+ "icon": "robot",
+ "pages": [
+ "ai-code-gen/overview",
+ "ai-code-gen/cursor",
+ "ai-code-gen/windsurf",
+ "ai-code-gen/unkey-mcp"
+ ]
}
]
},
@@ -74,7 +86,10 @@
{
"group": "Identities",
"icon": "fingerprint",
- "pages": ["concepts/identities/overview", "concepts/identities/ratelimits"]
+ "pages": [
+ "concepts/identities/overview",
+ "concepts/identities/ratelimits"
+ ]
}
]
},
@@ -83,6 +98,7 @@
"pages": [
{
"group": "Keys",
+ "icon": "key",
"pages": [
"apis/introduction",
{
@@ -117,6 +133,7 @@
},
{
"group": "Ratelimiting",
+ "icon": "bolt",
"pages": [
"ratelimiting/introduction",
"ratelimiting/modes",
@@ -126,23 +143,26 @@
},
{
"group": "Audit logs",
+ "icon": "scroll",
"pages": ["audit-log/introduction", "audit-log/types"]
},
{
"group": "Analytics",
+ "icon": "chart-bar",
"pages": ["analytics/overview", "analytics/quickstarts"]
}
]
},
- {
- "group": "Integrations",
- "icon": "bolt",
- "pages": ["integrations/vercel"]
- },
{
"group": "Migrations",
- "icon": "plane-arrival",
- "pages": ["migrations/introduction", "migrations/keys"]
+
+ "pages": [
+ {
+ "icon": "plane",
+ "group": "Migrating API Keys",
+ "pages": ["migrations/introduction", "migrations/keys"]
+ }
+ ]
}
]
},
@@ -362,7 +382,9 @@
},
{
"group": "Migrations",
- "pages": ["libraries/ts/sdk/migrations/migrate-to-unkey"]
+ "pages": [
+ "libraries/ts/sdk/migrations/migrate-to-unkey"
+ ]
},
{
"group": "Permissions",