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

# Build Pipelines with Your AI Coding Agent

> Use the Indexing Co MCP server to build, test, and stream blockchain data pipelines from any MCP-compatible coding agent

# Build Pipelines with Your AI Coding Agent

The Indexing Co [MCP server](https://github.com/indexing-co/indexing-co-mcp) connects AI coding agents to the Indexing Co API and live event stream. Describe your data needs in natural language, and the agent handles pipeline creation, transformation logic, testing, and deployment — no dashboard or config files required.

<img src="https://mintcdn.com/theindexingcompany-7e3a0cd4/6DanD_ao3C-AMh-T/images/preview-cli.svg?fit=max&auto=format&n=6DanD_ao3C-AMh-T&q=85&s=f859e40c621e79600d263f838b678cf5" alt="Live Event Stream Preview — colorized terminal output showing USDC transfer events streaming in real-time" width="720" height="620" data-path="images/preview-cli.svg" />

## What You Get

| Component       | What it does                                                                                                                                                                                                     |
| --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **MCP Server**  | Connects your agent to the Indexing Co API and live event stream via WebSocket                                                                                                                                   |
| **Skill**       | Teaches the agent how to build pipelines — filter/transformation/destination patterns, event signatures, debugging. The MCP server provides the tools; the skill provides the knowledge to use them effectively. |
| **Preview CLI** | Streams live pipeline events to your terminal with colorized, formatted output                                                                                                                                   |

## Setup

### 1. Install the MCP Server

```bash theme={null}
git clone https://github.com/indexing-co/indexing-co-mcp.git
cd indexing-co-mcp
npm install && npm run build
```

### 2. Add Your Credentials

Create `~/.indexing-co/credentials` with your API key:

```
API_KEY=your_api_key
```

Sign up at [accounts.indexing.co](https://accounts.indexing.co) if you don't have an API key yet.

### 3. Register with Your Agent

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --scope user indexing-co -- node /path/to/indexing-co-mcp/dist/index.js
    ```

    Install the skill to give Claude pipeline workflow knowledge — how to structure filters, write transformations, pick destinations, and debug delivery:

    ```bash theme={null}
    claude skill add --scope user https://github.com/indexing-co/indexing-co-pipeline-skill
    ```
  </Tab>

  <Tab title="Codex CLI">
    ```bash theme={null}
    codex mcp add indexing-co -- node /path/to/indexing-co-mcp/dist/index.js
    ```

    Codex automatically recognizes MCP tools. For the full pipeline workflow knowledge, install the skill as a custom instruction or system prompt — see the [skill repo](https://github.com/indexing-co/indexing-co-pipeline-skill) for details.
  </Tab>

  <Tab title="Other MCP Agents">
    Point your agent's MCP configuration at the server entry point:

    ```
    node /path/to/indexing-co-mcp/dist/index.js
    ```

    Any MCP-compatible agent can connect by registering the server and providing API credentials. Pair it with the [skill](https://github.com/indexing-co/indexing-co-pipeline-skill) (as a system prompt or instruction set) for the best results.
  </Tab>
</Tabs>

## What You Can Do

Once set up, just describe what you want in natural language:

* *"Index all USDC transfers on Base to my Postgres database"*
* *"Set up a webhook for Uniswap V3 swaps on Ethereum"*
* *"Stream Aave supply events on Arbitrum so I can see them live"*

The agent will walk through the full pipeline workflow: create a filter, write and test a transformation, set up the destination, deploy, and verify.

## MCP Server Tools

The MCP server gives your agent direct access to the Indexing Co API:

| Tool                                                                      | Purpose                                       |
| ------------------------------------------------------------------------- | --------------------------------------------- |
| `list_pipelines` / `get_pipeline` / `create_pipeline` / `delete_pipeline` | Manage pipelines                              |
| `backfill`                                                                | Backfill historical blocks for a pipeline     |
| `list_filters` / `get_filter` / `create_filter` / `delete_filter_values`  | Manage address filters                        |
| `list_transformations` / `get_transformation` / `create_transformation`   | Manage transformation code                    |
| `test_transformation`                                                     | Dry-run a transformation against a live block |
| `subscribe` / `unsubscribe`                                               | Subscribe to live event channels              |
| `get_events` / `query` / `describe_data`                                  | Query stored events with SQL                  |

## Live Event Preview

For pipelines using the `DIRECT` adapter, you can stream events straight to your terminal with the preview CLI:

```bash theme={null}
node /path/to/indexing-co-mcp/dist/cli/preview.js <channel>
```

This renders a live, colorized stream of events as they flow through your pipeline — addresses in magenta, transaction hashes in blue, numbers in yellow, and nested objects indented with recursive colorization. Press Ctrl+C to see a summary with total event count, duration, and average throughput.

### DIRECT Adapter Setup

To use the preview CLI, configure your pipeline with the `DIRECT` adapter:

```json theme={null}
{
  "adapter": "DIRECT",
  "connectionUri": "my-channel-name"
}
```

The `connectionUri` is the channel name you pass to the preview CLI. Events are only sent when at least one subscriber is connected.

<Note>
  The DIRECT adapter can run alongside any other adapter. For example, you can stream to both Postgres and the preview CLI simultaneously by creating two pipelines with the same filter and transformation but different delivery configs.
</Note>

## Example Workflow

Here's what a typical session looks like:

1. **You:** *"I want to track all USDC transfers on Base"*
2. **Agent:** Creates a filter with the Base USDC contract address
3. **Agent:** Writes a transformation using `utils.evmDecodeLogWithMetadata` for Transfer events
4. **Agent:** Tests the transformation against a recent block
5. **Agent:** Deploys the pipeline with your chosen destination
6. **Agent:** Backfills a few blocks and verifies data arrives
7. **You:** *"Stream the events so I can see them"*
8. **Agent:** Launches the preview CLI and triggers a backfill — live events appear in your terminal

## Security

The MCP server runs locally — API credentials stay on your machine. The agent operates with the same permissions as your API key, so treat your credentials accordingly.

## Resources

| Resource        | Link                                                                                                           |
| --------------- | -------------------------------------------------------------------------------------------------------------- |
| MCP Server repo | [github.com/indexing-co/indexing-co-mcp](https://github.com/indexing-co/indexing-co-mcp)                       |
| Skill repo      | [github.com/indexing-co/indexing-co-pipeline-skill](https://github.com/indexing-co/indexing-co-pipeline-skill) |
| Full API docs   | [docs.indexing.co](https://docs.indexing.co)                                                                   |
| Sign up         | [accounts.indexing.co](https://accounts.indexing.co)                                                           |
| Support         | [hello@indexing.co](mailto:hello@indexing.co)                                                                  |
