# MCP Server

## Overview

The Select Star MCP Server enables MCP Clients like Cursor and Claude Desktop to access your Select Star MCP tools. Using the Model Context Protocol (MCP), your AI assistant can search for tables, dashboards, and columns, retrieve detailed asset information, and help you understand your data lineage.

## What is MCP?

Model Context Protocol (MCP) is a standard that allows AI assistants to connect to external systems and data sources securely. When you configure the Select Star MCP Server, your AI assistant gains the ability to:

* Answer questions about your data catalog
* Find relevant tables and columns for your analysis
* Provide context about data sources and their relationships
* Help you understand data lineage and dependencies
* Support dbt development workflows with schema discovery and production usage insights

## Getting started

#### Prerequisites

Before you can use the Select Star MCP Server, you'll need:

1. [Select Star API Token](https://docs.selectstar.com/select-star-api/authentication)
2. MCP Client (Claude Desktop, Cursor IDE, etc.)
3. When using `mcp-remote@latest` in the configuration: Node.js (version 18 or higher)
   * Download and install Node.js from [nodejs.org](https://nodejs.org/en/download)
   * Follow the installation guide for your operating system
   * Verify installation by running `node --version` in your terminal

#### Quick Setup

The Select Star MCP Server works with any MCP Client. Here's how to configure it:

#### Cursor IDE

In Cursor, you need to configure the MCP server in your settings:

1. Open Cursor Settings
2. Navigate to "Tools & Integrations" → Click on "New MCP Server"
3. Add the following configuration to your MCP servers section:

```json
{
  "mcpServers": {
    "select-star": {
      "url": "https://mcp.production.selectstar.com/mcp",
      "headers": {
        "Authorization": "Bearer <your_actual_api_token_here>"
      }
    }
  }
}
```

**Important:** Replace `<your_actual_api_token_here>` with your Select Star API token.

#### Claude Code

For Claude Code, run this command in your terminal to add within the user scope:

```bash
claude mcp add --transport http select-star https://mcp.production.selectstar.com/mcp --header "Authorization: Bearer <your_actual_api_token_here>" -s user
```

**Important:** Replace `<your_actual_api_token_here>` with your Select Star API token.

#### Claude Desktop

For Claude Desktop, you need to modify the configuration file. You can follow the guide [here](https://modelcontextprotocol.io/quickstart/user) or:

1. Open Claude Settings
2. Navigate to "Developer" → Click on "Edit Config"
3. Add the following configuration to your MCP servers section in `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "select-star": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@latest",
        "https://mcp.production.selectstar.com/mcp",
        "--header",
        "Authorization:${SELECT_STAR_TOKEN}"
      ],
      "env": {
        "SELECT_STAR_TOKEN": "Bearer <your_actual_api_token_here>"
      }
    }
  }
}
```

**Important:** Replace `<your_actual_api_token_here>` with your Select Star API token.

#### Other MCP Clients

This server follows the standard MCP protocol and should work with any MCP Client. Adapt the configuration format to match your client's requirements while using the same connection details.

## Available Tools

We're continuously expanding the MCP Server's capabilities. If you need functionality that isn't currently available, please reach out to us at <support@getselectstar.com> - we'd love to understand your use case and may be able to prioritize it in our roadmap.

### `search_metadata`

Search across all data catalog metadata with advanced filtering capabilities.

### `get_asset_details`

Retrieve comprehensive information about a specific data asset.

### `get_table_info`

Retrieve detailed table schema and usage information.

### `traverse_lineage`

Explore data lineage relationships and dependencies.

### `get_asset_queries`

Retrieve data warehouse queries connected to tables or columns.

### `search_semantic_models`

Search for semantic models in the data catalog.

### `get_semantic_model_details`

Retrieve complete details about a specific semantic model, including YAML content.

## Troubleshooting

#### Authentication Failed

1. Verify your API token is correct
2. Ensure the token is properly formatted with "Bearer " prefix

#### Node.js Issues

1. Ensure Node.js version 18 or higher is installed
2. Try running `npx --version` to verify npx is available
3. Clear npx cache with `npx --cache-dir clear` if you encounter package issues

#### Connection Issues

1. Verify your internet connection
2. Check if your firewall allows connections to `https://mcp.production.selectstar.com/mcp`
3. Try running the npx command manually in your terminal to test connectivity
