---
title: "Better Stack Integration"
description: "Ingest and manage log sources, collectors, and metrics with Better Stack Logs (Logtail) Telemetry API"
---
The Better Stack integration provides access to ingest and manage log sources, collectors, and metrics with Better Stack Logs (Logtail) Telemetry API through the Integrate MCP server.

## Installation

The Better Stack integration is included with the SDK:

```typescript
import { betterstackIntegration } from "integrate-sdk/server";
```

## Setup

Add Better Stack to your server configuration. Provide credentials via environment variables or integration config:

```typescript
import { createMCPServer, betterstackIntegration } from "integrate-sdk/server";

export const { client: serverClient } = createMCPServer({
  apiKey: process.env.INTEGRATE_API_KEY,
  integrations: [
    betterstackIntegration({
      // See configuration options below
    }),
  ],
});
```

### Client-Side Usage

```typescript
import { client } from "integrate-sdk";

const result = await client.betterstack.listSources({});

console.log(result);
```

## Environment Variables

- `BETTERSTACK_API_KEY` (when supported by this integration)

## Configuration Options

<AutoTypeTable
  path="../src/integrations/betterstack.ts"
  name="BetterStackIntegrationOptions"
/>


## Tools

### `betterstack_list_sources`

List sources

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackListSourcesParams"
/>

### `betterstack_get_source`

Get source

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackGetSourceParams"
/>

### `betterstack_create_source`

Create source

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackCreateSourceParams"
/>

### `betterstack_update_source`

Update source

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackUpdateSourceParams"
/>

### `betterstack_delete_source`

Delete source

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackDeleteSourceParams"
/>

### `betterstack_list_source_groups`

List source groups

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackListSourceGroupsParams"
/>

### `betterstack_get_source_group`

Get source group

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackGetSourceGroupParams"
/>

### `betterstack_update_source_group`

Update source group

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackUpdateSourceGroupParams"
/>

### `betterstack_list_collectors`

List collectors

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackListCollectorsParams"
/>

### `betterstack_list_source_metrics`

List source metrics

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackListSourceMetricsParams"
/>

### `betterstack_ingest_logs`

Ingest logs

<AutoTypeTable
  path="generated/tool-params/betterstack.ts"
  name="BetterstackIngestLogsParams"
/>

## Notes

- Category: Engineering
- Authentication mode: API key
