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

# Lovable

> Connect Lovable to your data in Nekt.

Lovable is an AI-powered app builder that turns prompts into working web applications. These are the most common ways to connect it to your data in Nekt.

| Method            | Best for                                                 | How it works                                                           |
| :---------------- | :------------------------------------------------------- | :--------------------------------------------------------------------- |
| **MCP Server**    | AI-driven exploration, prototyping from live schemas     | Lovable queries Nekt in real-time through the MCP protocol             |
| **Supabase**      | Production apps that need a live database                | Nekt sends data to the Supabase instance your Lovable app already uses |
| **Google Sheets** | Quick setups, read-only data, non-technical teams        | Nekt sends data to a spreadsheet that Lovable can read from            |
| **Data API**      | Custom integrations, on-demand SQL queries from app code | Your Lovable app queries Nekt directly via HTTP using SQL              |

## MCP Server

Connect Lovable directly to Nekt's MCP Server so the Lovable Agent can explore your schemas, preview data, and generate apps grounded in your actual tables.

<Info>Requires a **paid Lovable plan** (for custom MCP servers) and a **paid Nekt plan** (for MCP Server access).</Info>

### Setup

<Steps>
  <Step title="Activate the MCP Server in Nekt">
    Go to **Integrations > MCP Server** in Nekt and enable the server. See the [MCP setup guide](/mcp-server/setup) for detailed instructions.
  </Step>

  <Step title="Add Nekt as a custom MCP server in Lovable">
    In Lovable, go to **Settings > Connectors > Personal connectors** and click **New MCP server**.

    * **Server name** — enter `Nekt`
    * **Server URL** — paste the **Endpoint** from the MCP Server page in Nekt
  </Step>

  <Step title="Authenticate">
    Choose one of the following methods:

    **OAuth (recommended)** — Select OAuth and click **Add & authorize**. You will be redirected to log in with your Nekt credentials and select a token.

    **Bearer token** — Select the bearer token option and paste a token from the **MCP Tokens** section in Nekt.

    <Note>
      Tokens created during the OAuth flow use the creating user's permissions by
      default. Tokens created manually can be scoped to specific tables for
      fine-grained access control.
    </Note>
  </Step>

  <Step title="Confirm the connection">
    Nekt should now appear in your list of personal connectors. You can verify it is active by clicking on the connector in your settings.
  </Step>
</Steps>

### Example prompts

| Scenario                 | Prompt                                                                                    |
| :----------------------- | :---------------------------------------------------------------------------------------- |
| Explore available data   | *List the tables available in Nekt and describe their schemas.*                           |
| Build a dashboard        | *Build a dashboard that shows monthly revenue trends using the `orders` table from Nekt.* |
| Prototype from real data | *Preview the `products` table and build a product catalog page based on its structure.*   |

***

## Supabase Destination

If your Lovable app already uses Supabase as its database, you can send processed data from Nekt directly into the same Supabase instance. Your app reads from Supabase as usual — Nekt keeps the data fresh on a schedule.

### Setup

<Steps>
  <Step title="Get your Supabase connection details">
    In your Supabase project, click **Connect** in the top navigation bar and select the **Session pooler** tab. Copy the host, port, user, password, and database values.

    <Warning>You must use the **Session pooler** connection method. Transaction mode and direct connections are not supported.</Warning>
  </Step>

  <Step title="Add a Supabase destination in Nekt">
    Go to **Destinations** in Nekt, click **Add destination**, and select **Supabase**. Enter the Session pooler credentials from the previous step and choose a load method (append, upsert, or overwrite).

    See the full [Supabase destination guide](/destinations/supabase) for details on IP whitelisting, SSL, and load methods.
  </Step>

  <Step title="Select the tables to send">
    Choose which tables from your Catalog should be sent to Supabase. Define a primary key for each table and set a schedule for how often data should be refreshed.
  </Step>

  <Step title="Use the data in Lovable">
    Your Lovable app can now query the synced tables through its standard Supabase connection. No additional configuration is needed in Lovable — the data appears in your existing database.
  </Step>
</Steps>

### When to use this method

* Your Lovable app needs to **query data at runtime** (filters, search, pagination).
* You want Lovable to work with **production-ready tables** managed by Nekt.
* You need **scheduled refreshes** so the app always has current data.

***

## Google Sheets Destination

For simpler setups, you can send data from Nekt to a Google Sheet and have Lovable read from it. This works well for read-only data, small datasets, or teams that want to get started quickly.

### Setup

<Steps>
  <Step title="Add a Google Sheets destination in Nekt">
    Go to **Destinations** in Nekt, click **Add destination**, and select **Google Sheets**. Paste the link to your spreadsheet and grant Editor access to the email address provided by Nekt.

    See the full [Google Sheets destination guide](/destinations/google-sheets) for details on tab mapping and cell range configuration.
  </Step>

  <Step title="Select the tables to send">
    Choose which tables from your Catalog should be sent. Each table is written to a separate tab in the spreadsheet. Set a schedule for how often data should be refreshed.
  </Step>

  <Step title="Connect the sheet to Lovable">
    In your Lovable prompt, reference the Google Sheet URL and ask the agent to read from it. Lovable can parse the sheet data to build tables, charts, or app views.

    Example: *Read the data from this Google Sheet \[URL] and build a reporting dashboard.*
  </Step>
</Steps>

### When to use this method

* You need a **quick, low-effort setup** without database configuration.
* The data is **read-only** and doesn't require filtering or pagination at runtime.
* Non-technical team members want to **review or edit the data** in the spreadsheet before it reaches the app.

***

## Data API

If your Lovable app needs to query Nekt data on demand from its own code, you can use the Data API. Your app sends a SQL query over HTTP and receives the results as a downloadable file (Parquet or CSV).

<Info>Requires a **paid Nekt plan** and an **API key** created in your workspace settings.</Info>

### Setup

<Steps>
  <Step title="Create an API key in Nekt">
    Go to **Workspace Settings > API Keys** in Nekt and [create an API key](https://app.nekt.ai/settings/api-keys).
  </Step>

  <Step title="Call the Data API from your Lovable app">
    In your Lovable prompt, ask the agent to add a server-side function (e.g. a Supabase Edge Function) that calls the Nekt Data API endpoint with a SQL query. The API returns a download link to the results.

    Example: *Add an Edge Function that queries the `orders` table from Nekt using the Data API and returns the results as JSON.*

    See the full [Data API documentation](/data-api/introduction) for endpoint details and output formats.
  </Step>

  <Step title="Use the results in your app">
    Parse the downloaded file in your app logic and display the data in your UI. The download link is valid for 1 hour after each query.
  </Step>
</Steps>

### When to use this method

* Your app needs to **run arbitrary SQL** against Nekt data at runtime.
* You want **on-demand queries** rather than scheduled syncs.
* You are building a **custom integration** that doesn't fit the MCP, Supabase, or Sheets patterns.

***

## Privacy and security

Regardless of the method you choose, Nekt enforces authentication and permission rules at every layer. MCP access is scoped using tokens, Supabase connections use encrypted sessions, and Google Sheets access is limited to the spreadsheets you explicitly share.

For details on how Lovable handles data, refer to [Lovable's security documentation](https://docs.lovable.dev/integrations/mcp-servers#security-and-permissions).

***

## Need help?

Contact our support team if you encounter issues during setup.
