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

# Getting Started with Cursor

> Connect your OpenMetadata MCP Server to Cursor IDE with OAuth or PAT-based authentication for AI-powered metadata exploration.

# Getting Started with Cursor

Connect your OpenMetadata instance to Cursor IDE for AI-powered metadata exploration.

## Prerequisites

Before you begin, ensure you have:

1. **OpenMetadata v1.8.0+** running
2. **MCP Application** installed in OpenMetadata
   * Navigate to `<YOUR-OpenMetadata-SERVER>/marketplace/apps/McpApplication`
   * Install **McpApplication** if not already installed
3. **Cursor IDE** installed with MCP support

## Connect with OAuth 2.0 (Recommended)

OAuth lets you authenticate using your existing OpenMetadata login, with no tokens to manage.

### Step 1: Open MCP Settings

In Cursor, navigate to **Settings** and click **Tools & MCP** in the left sidebar.

<img noZoom src="https://mintcdn.com/openmetadata/oMrqaOqRCTd0vWNF/public/images/how-to-guides/mcp/cursor-oauth-settings.png?fit=max&auto=format&n=oMrqaOqRCTd0vWNF&q=85&s=79872535aa0d166fc1f9343f10fb979f" alt="Cursor Settings showing Tools and MCP page" width="2168" height="1024" data-path="public/images/how-to-guides/mcp/cursor-oauth-settings.png" />

### Step 2: Add a New MCP Server

Click **New MCP Server**. This will open the `mcp.json` configuration file.

### Step 3: Configure the Server

Add the following configuration to `mcp.json`:

```json theme={null}
{
  "mcpServers": {
    "OpenMetadata": {
      "url": "https://<YOUR-OpenMetadata-SERVER>/mcp",
      "protocol": "sse"
    }
  }
}
```

Replace `<YOUR-OpenMetadata-SERVER>` with your OpenMetadata instance URL (e.g., `your-openmetadata-instance.com`).

<img noZoom src="https://mintcdn.com/openmetadata/oMrqaOqRCTd0vWNF/public/images/how-to-guides/mcp/cursor-oauth-config.png?fit=max&auto=format&n=oMrqaOqRCTd0vWNF&q=85&s=585c5e86fdffdee98ba4417509a51d96" alt="Cursor mcp.json with MCP server configuration" width="1034" height="566" data-path="public/images/how-to-guides/mcp/cursor-oauth-config.png" />

### Step 4: Authenticate

Save the file and Cursor will attempt to connect. A browser window will open prompting you to sign in with your OpenMetadata credentials. Follow the on-screen instructions based on your configured authentication method:

* **SSO (Google, Azure, Okta, etc.)**: You will be redirected to your SSO provider's login page
* **Basic Auth**: Enter your OpenMetadata username and password

Once authenticated, Cursor connects to your OpenMetadata MCP Server automatically. You should see your server listed with available tools and prompts.

## Connect with Personal Access Token (PAT)

If you prefer token-based authentication or OAuth is not available in your environment, you can use a Personal Access Token.

### Step 1: Generate a PAT

Follow the [Personal Access Token guide](/v1.12.x/how-to-guides/mcp#adding-a-personal-access-token-to-your-mcp-client) to generate your token.

### Step 2: Configure MCP Server

Cursor locates the MCP configuration file at:

**macOS/Linux:**

```bash theme={null}
~/.cursor/mcp.json
```

**Windows:**

```bash theme={null}
%APPDATA%\Cursor\mcp.json
```

Create the `.cursor` directory if it doesn't exist, then create or update the configuration file:

```json theme={null}
{
  "mcpServers": {
    "OpenMetadata": {
      "url": "https://<YOUR-OpenMetadata-SERVER>/mcp",
      "protocol": "sse",
      "headers": {
        "Authorization": "Bearer <YOUR-OpenMetadata-PAT>"
      }
    }
  }
}
```

Replace `<YOUR-OpenMetadata-SERVER>` with your server URL and `<YOUR-OpenMetadata-PAT>` with your Personal Access Token.

### Step 3: Restart Cursor

Save the configuration file and restart Cursor completely to load the MCP server:

* **macOS**: `Cmd+Q` or Cursor > Quit Cursor
* **Windows/Linux**: Close all Cursor windows and reopen

> **Project-Specific Configuration**: You can also create `.cursor/mcp.json` in your project root directory. Project-specific configuration takes precedence over global configuration.

## Try It Out

Once connected, test your setup by asking questions in Cursor's chat:

> "Imagine you're a data analyst tasked with building a customer retention dashboard. You need tables that track customer transactions, engagement metrics, and churn indicators. Find relevant customer and transaction tables in the metadata catalog."

You should see Cursor using the OpenMetadata MCP tools to search and retrieve information from your metadata catalog.

## Troubleshooting

If you encounter connection issues:

1. **Verify OpenMetadata is running**: `curl <YOUR-OpenMetadata-SERVER>/api/health`
2. **Check MCP endpoint**: `curl <YOUR-OpenMetadata-SERVER>/mcp` (should return 401)
3. **Verify MCP Application is installed**: Visit `<YOUR-OpenMetadata-SERVER>/marketplace/apps/McpApplication`
4. **Re-authenticate**: Remove and re-add the server in Cursor to trigger a fresh OAuth login
5. **Check configuration file syntax**: Ensure JSON is valid and file path is correct
6. **Token expired (PAT method)**: [Generate a new PAT](/v1.12.x/how-to-guides/guide-for-data-users/personal-access-token) and update your configuration
7. **Restart Cursor** after making configuration changes

## Additional Resources

* [OpenMetadata MCP Documentation](/v1.12.x/how-to-guides/mcp)
* [OAuth 2.0 Authentication](/v1.12.x/how-to-guides/mcp/oauth)
* [MCP Tools Reference](/v1.12.x/how-to-guides/mcp/reference)
* [MCP Protocol Specification](https://modelcontextprotocol.io)
* [Cursor Documentation](https://docs.cursor.com)
