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

# Coding with agents

> Give your coding agent access to your lake, pipelines, and lineage through the oleander MCP server and CLI.

oleander exposes a remote [MCP server](https://modelcontextprotocol.io) and a [CLI](/cli/introduction) that agents can use to query, run, and reason about your data infrastructure without leaving the editor. Wire either one up once and your agent gains the full context of your lake:

* Tables and catalogs
* Run history and lineage
* Costs, logs, and traces

## What agents can do

With the MCP server connected, an agent can:

* Query your Iceberg lake tables directly with SQL
* Upload and submit Spark jobs, then monitor their progress
* Pull run lineage, cost breakdowns, and logs for any pipeline execution
* Discover and inspect catalog tables and schemas
* Investigate failures and surface downstream impact before shipping a change

A common pattern is building or debugging a data pipeline end to end from the editor: the agent reads from your lake, writes a transformation, submits it, then verifies the output and lineage without you switching contexts.

## Cost-aware compute routing

oleander exposes DuckDB, Spark, and Polars through the MCP. An agent can choose the right engine for the job: DuckDB for fast, cheap ad hoc queries, Polars for DataFrame workloads, and Spark for large-scale processing. Because the agent sees cost per run, it can suggest or automatically prefer the lower-cost option for a given workload and scale up only when needed.

## Install

<Tabs>
  <Tab title="MCP (Claude Code)">
    ```bash theme={null}
    claude mcp add --transport http oleander https://oleander.dev/mcp
    ```

    Authenticate via the OAuth flow when prompted. See [Claude Code setup](/mcp/claude-code) for details.
  </Tab>

  <Tab title="MCP (Codex)">
    Add to `~/.codex/config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "oleander": {
          "type": "streamableHttp",
          "url": "https://oleander.dev/mcp"
        }
      }
    }
    ```

    See [Codex setup](/mcp/codex) for details.
  </Tab>

  <Tab title="MCP (Cursor)">
    Add to `.cursor/mcp.json`, then authenticate:

    ```bash theme={null}
    agent mcp login oleander
    ```

    See [Cursor setup](/mcp/cursor) for details.
  </Tab>

  <Tab title="MCP (OpenCode)">
    ```bash theme={null}
    opencode mcp add oleander --url https://oleander.dev/mcp
    opencode mcp auth oleander
    ```

    See [OpenCode setup](/mcp/opencode) for details.
  </Tab>

  <Tab title="CLI">
    <CodeGroup>
      ```bash Homebrew theme={null}
      brew tap OleanderHQ/tap
      brew install oleander-cli
      ```

      ```bash Ubuntu (APT) theme={null}
      sudo apt-get update
      sudo apt-get install -y curl ca-certificates gnupg

      curl -fsSL https://oleander-cli-releases.s3.amazonaws.com/keys/oleander-archive-keyring.gpg \
        | sudo tee /usr/share/keyrings/oleander-archive-keyring.gpg >/dev/null

      sudo tee /etc/apt/sources.list.d/oleander.sources >/dev/null <<'EOF'
      Types: deb
      URIs: https://oleander-cli-releases.s3.amazonaws.com/apt
      Suites: stable
      Components: main
      Signed-By: /usr/share/keyrings/oleander-archive-keyring.gpg
      EOF

      sudo apt-get update
      sudo apt-get install -y oleander-cli
      ```
    </CodeGroup>

    Authenticate with the API key from your [oleander settings](https://oleander.dev/app/settings/api-keys).

    ```bash theme={null}
    oleander configure --api-key <YOUR_API_KEY>
    ```

    See the [CLI reference](/cli/introduction) for all available commands.
  </Tab>
</Tabs>

## How it works

Both the MCP server and CLI authenticate with your oleander API key. The MCP server runs remotely at `https://oleander.dev/mcp` and streams tool results back to your agent over the Model Context Protocol. The CLI is a local binary that talks to the same API.

Use the MCP when working interactively with a coding agent. Use the CLI when scripting, automating, or running from a pipeline.
