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

# LLMs and MCP Tools

> Connect LLMs to query your semantic models using Model Context Protocol

Credible's MCP tools use the [Credible Context Engine](/concepts/context-engine) to ground your LLM in governed data definitions. When you ask a question, the `get_context` tool parses your input into semantic phrases and matches each phrase to data entities (dimensions, measures, views) in your semantic model — searching against the `#(doc)` descriptions and `#(index)` annotations declared in your model. Your LLM gets ranked entity matches and Malloy syntax guidance, so it can construct accurate queries without hallucinating field names or misunderstanding your data structure.

<Note>
  LLMs and MCP clients change frequently. If you encounter any issues with these integrations, please [contact support](mailto:support@credibledata.com).
</Note>

## Connecting LLMs

Use your organization's MCP server URL: `https://<your-org>.mcp.credibledata.com/mcp`

To restrict analysis to a specific workspace, use the workspace-scoped URL instead: `https://<your-org>.mcp.credibledata.com/mcp/workspace/{workspace_name}`. You can copy the full workspace-scoped URL from your workspace settings page.

<Tabs>
  <Tab title="Claude (web)">
    <Note>Requires a Pro or Max subscription, OR a business/enterprise account with custom connectors enabled</Note>

    1. Click on user icon (bottom-left)
    2. Connectors
    3. Browse
    4. Click on the link "add a custom one" (note this is not a button)
    5. Enter Name and URL: `https://<your-org>.mcp.credibledata.com/mcp`
    6. Leave advanced settings alone
    7. Click "connect" on the next page

    <Note>
      If you don't see the option to add custom connectors on an enterprise account, contact your Claude administrator to enable this feature.
    </Note>
  </Tab>

  <Tab title="ChatGPT (web)">
    <Note>Requires a Plus account or higher</Note>

    1. Click on user icon (bottom-left)
    2. Settings
    3. Apps & Connectors
    4. Click "Create"
    5. Add a name (e.g., "Credible") and the server URL: `https://<your-org>.mcp.credibledata.com/mcp`
    6. Leave authentication as "OAuth" and click "Create"
    7. Follow the OAuth authentication flow
    8. Now you can ask ChatGPT to use the Credible tool (or whatever you named it)

    <Note>
      You may need to enable "Dev mode" in Apps & Connectors settings (scroll to bottom) before you can create custom connectors.
    </Note>
  </Tab>

  <Tab title="VS Code Copilot">
    1. CMD-SHIFT-P -> "MCP Add Server"
    2. Select "HTTP"
    3. Enter your organization's MCP URL: `https://<your-org>.mcp.credibledata.com/mcp`
    4. Enter a server ID for the server (e.g., "credible")
    5. Press Enter and select "Global" or "Workspace" scoped
    6. A popup should redirect you to the OAuth flow - open in browser and complete the authentication
    7. The server should now show as "Running" (with a checkbox) in the mcp.json file
    8. Open Copilot to test it out
  </Tab>

  <Tab title="Cursor">
    1. CMD-SHIFT-P -> "Open MCP Settings"
    2. Click "New MCP Server"
    3. Add your server configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "CredibleData": {
          "url": "https://<your-org>.mcp.credibledata.com/mcp",
          "type": "http"
        }
      }
    }
    ```

    4. Click "Connect" to complete the OAuth authentication flow
    5. The server should show as connected with 2 tools enabled
  </Tab>

  <Tab title="Claude Code">
    <Note>Requires a Pro or Max subscription plan</Note>

    ```bash theme={null}
    # Add MCP server
    claude mcp add --transport http CredibleData https://<your-org>.mcp.credibledata.com/mcp

    # Start Claude Code
    claude

    # Inside Claude Code prompt, authenticate
    /mcp
    # Select "authenticate"
    ```
  </Tab>

  <Tab title="Gemini CLI">
    ```bash theme={null}
    # Install Gemini CLI
    npm install -g @google/gemini-cli

    # Add MCP server
    gemini mcp add -t http CredibleData https://<your-org>.mcp.credibledata.com/mcp

    # Run gemini to complete OAuth flow
    gemini
    # This will open a browser window for authentication

    # Verify the server is connected
    gemini mcp list
    ```
  </Tab>

  <Tab title="Windsurf">
    1. In the agent window, click on the plug icon
    2. Click "Settings" - this will open the `mcp_config.json` file
    3. Add your server configuration:

    ```json theme={null}
    {
      "mcpServers": {
        "CredibleData": {
          "serverUrl": "https://<your-org>.mcp.credibledata.com/mcp"
        }
      }
    }
    ```

    4. Save the file - this will automatically open the OAuth authentication flow
    5. Complete the authentication in your browser
  </Tab>
</Tabs>

## Available Tools

Once connected, your LLM has access to two tools:

* **get\_context** — Parses your question into phrases, matches each phrase to data entities (dimensions, measures, views) in your semantic model, and returns ranked matches grounded in your model's `#(doc)` and `#(index)` annotations
* **execute\_query** — Executes Malloy queries against your semantic models and returns JSON results

For complete technical details on parameters and responses, see the [MCP Reference](/reference/api/mcp).
