> ## 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.

# Connect your Coding Agent

> Let any coding agent analyze data with your published models

The [modeling MCP tools](/how-to/developers/vscode-extension#modeling-mcp-tools) are for *building* models. To let your coding agent *analyze data* with your published models — the same governed access as [workspace chat](/how-to/analyzing/workspaces) — connect it to the **consumption MCP server** and authenticate with OAuth.

Use your organization's MCP server URL: `https://<your-org>.mcp.credibledata.com/mcp` (see [MCP Tools](/how-to/analyzing/ai-assistants-mcp#the-mcp-server) for workspace scoping).

<Note>
  Using Cursor? The [VS Code Extension](/how-to/developers/vscode-extension) covers it. Connecting a personal chat client like Claude, ChatGPT, or Gemini instead? See [Connect your Agent](/how-to/analyzing/connect-your-llm).
</Note>

<Tabs>
  <Tab title="VS Code Copilot">
    1. Open the Command Palette (`Cmd+Shift+P` on Mac, `Ctrl+Shift+P` on Windows/Linux) and run **"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 it in your 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="Claude Code">
    <Note>Requires a Pro or Max subscription plan</Note>

    ```bash theme={"languages":{"custom":["/languages/motly.tmGrammar.json","/languages/malloy.tmGrammar.json"]}}
    # 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={"languages":{"custom":["/languages/motly.tmGrammar.json","/languages/malloy.tmGrammar.json"]}}
    # 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 opens the `mcp_config.json` file
    3. Add your server configuration:

    ```json theme={"languages":{"custom":["/languages/motly.tmGrammar.json","/languages/malloy.tmGrammar.json"]}}
    {
      "mcpServers": {
        "CredibleData": {
          "serverUrl": "https://<your-org>.mcp.credibledata.com/mcp"
        }
      }
    }
    ```

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

Once connected, your agent has the `get_context` and `execute_query` tools — the same tools that power workspace chat.

## Next Steps

<CardGroup cols={2}>
  <Card title="MCP Tools" icon="robot" color="#5C7A93" href="/how-to/analyzing/ai-assistants-mcp">
    The tool reference — what get\_context and execute\_query do and how to call them
  </Card>

  <Card title="Discovery" icon="tags" color="#94793A" href="/how-to/modeling/metadata-tags">
    Better answers start in the model — enrich it with doc and index annotations
  </Card>
</CardGroup>
