> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leanmcp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# For Personal Users

> Use AI Gateway to monitor and secure your personal AI coding assistant usage

# AI Gateway for Personal Users

If you use AI coding assistants like **Windsurf**, **Cursor**, or **VS Code with Copilot alternatives**, the AI Gateway gives you complete visibility into what data is being sent to AI providers.

## Why Should You Care?

When you use AI coding assistants, your code is sent to AI providers for processing. This includes:

* **Your source code** - potentially proprietary or sensitive
* **Environment variables** - which might contain API keys or secrets
* **Configuration files** - database credentials, service endpoints
* **Comments and documentation** - business logic, internal notes

<Warning>
  Without visibility, you have no idea if sensitive data like passwords, API keys, or personal information is being sent to AI providers.
</Warning>

## What AI Gateway Shows You

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/leanmcp/images/ai-gateway-personal-dashboard.png" alt="Personal Dashboard" />
</Frame>

### Every Request Logged

See exactly what is being sent to AI providers:

* **Full request content** - the actual code and context being sent
* **Model used** - which AI model processed your request
* **Token count** - how many tokens each request used
* **Timestamp** - when each request was made

### Sensitive Data Detection

The gateway automatically scans for:

<CardGroup cols={2}>
  <Card title="API Keys & Secrets" icon="key">
    AWS keys, GitHub tokens, database passwords
  </Card>

  <Card title="Personal Information" icon="id-card">
    Email addresses, phone numbers, addresses
  </Card>

  <Card title="Financial Data" icon="credit-card">
    Credit card numbers, bank account info
  </Card>

  <Card title="Internal URLs" icon="link">
    Private endpoints, internal service URLs
  </Card>
</CardGroup>

## Setting Up for Personal Use

### Step 1: Get Credits

1. Go to [app.leanmcp.com/billing](https://app.leanmcp.com/billing)
2. Create an account if you haven't already
3. Purchase credits (start with a small amount to test)

<Note>
  Credits are required to use the AI Gateway. The cost is similar to direct API usage plus a small gateway fee.
</Note>

### Step 2: Generate Your API Key

1. Navigate to **Settings** > **API Keys**
2. Create a new API key
3. Copy and save it securely

### Step 3: Configure Your IDE

<Tabs>
  <Tab title="Windsurf">
    1. Open Windsurf Settings
    2. Navigate to AI Configuration
    3. Set Base URL: `https://aigateway.leanmcp.com/v1/openai`
    4. Set API Key: Your LeanMCP API key
  </Tab>

  <Tab title="Cursor">
    1. Open Cursor Settings (Cmd/Ctrl + ,)
    2. Find the AI/LLM configuration section
    3. Update the base URL to: `https://aigateway.leanmcp.com/v1/openai`
    4. Enter your LeanMCP API key
  </Tab>

  <Tab title="Custom Setup">
    For any tool that allows custom OpenAI-compatible endpoints:

    * **Base URL:** `https://aigateway.leanmcp.com/v1/openai`
    * **API Key:** Your LeanMCP API key
  </Tab>
</Tabs>

### Step 4: Start Coding

Use your IDE normally. All AI requests will now flow through the gateway.

## Viewing Your Data

### Request Logs

Access your logs at [app.leanmcp.com/observability](https://app.leanmcp.com/observability):

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/leanmcp/images/ai-gateway-request-log.png" alt="Request Log View" />
</Frame>

Each log entry shows:

* Full request content (what was sent to AI)
* Response received
* Token usage and cost
* Any sensitive data detected

### Download Your Data

You can export all your logged requests:

1. Open [app.leanmcp.com/observability](https://app.leanmcp.com/observability)
2. Select date range
3. Click **Export** to download as JSON or CSV

This gives you a complete record of all data that has been sent to AI providers.

## Security Features

### Sensitive Data Alerts

When the gateway detects potentially sensitive data, you'll see:

* **Real-time alerts** in your dashboard
* **Highlighted entries** in the log viewer
* **Summary reports** of detected sensitive data

### Taking Action

If you find sensitive data was exposed:

1. **Review the log** - see exactly what was sent
2. **Rotate credentials** - if API keys or passwords were exposed
3. **Update .gitignore** - prevent sensitive files from being included
4. **Set up blocking rules** - prevent future exposure (see [Security](/ai-gateway/security))

## Cost Tracking

<Frame>
  <img src="https://mintlify.s3.us-west-1.amazonaws.com/leanmcp/images/ai-gateway-cost-tracking.png" alt="Cost Tracking" />
</Frame>

Track your AI spending:

* **Daily/weekly/monthly usage** graphs
* **Cost per model** breakdown
* **Token usage** statistics
* **Credit balance** monitoring

## Best Practices

<AccordionGroup>
  <Accordion title="Review logs regularly">
    Check your logs weekly to ensure no sensitive data is being exposed.
  </Accordion>

  <Accordion title="Set up alerts">
    Configure notifications for when sensitive data patterns are detected.
  </Accordion>

  <Accordion title="Use .env files properly">
    Keep secrets in .env files and ensure they're in .gitignore.
  </Accordion>

  <Accordion title="Be mindful of context">
    AI assistants send surrounding code as context - be aware of what's nearby.
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Security Features" icon="shield" href="/ai-gateway/security">
    Set up blocking rules for sensitive data
  </Card>

  <Card title="Token Optimization" icon="chart-pie" href="/ai-gateway/token-optimization">
    Reduce costs and optimize usage
  </Card>
</CardGroup>

***

<Card title="Ready? Open your Observability Dashboard →" icon="eye" href="https://app.leanmcp.com/observability" color="#ff6b35">
  View your first logged AI request at **app.leanmcp.com/observability**
</Card>
