---
title: "Alpaca Integration"
description: "Trade US equities and crypto with Alpaca: account, orders, positions, clock, and assets"
---
The Alpaca integration provides access to trade US equities and crypto with Alpaca: account, orders, positions, clock, and assets through the Integrate MCP server.

## Installation

The Alpaca integration is included with the SDK:

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

## Setup

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

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

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

### Client-Side Usage

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

const result = await client.alpaca.getAccount({});

console.log(result);
```

## Environment Variables

- `ALPACA_API_KEY` (when supported by this integration)

## Configuration Options

<AutoTypeTable
  path="../src/integrations/alpaca.ts"
  name="AlpacaIntegrationOptions"
/>


## Tools

### `alpaca_get_account`

Get account

_No parameters._

### `alpaca_list_positions`

List positions

_No parameters._

### `alpaca_get_position`

Get position

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaGetPositionParams"
/>

### `alpaca_list_orders`

List orders

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaListOrdersParams"
/>

### `alpaca_get_order`

Get order

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaGetOrderParams"
/>

### `alpaca_create_order`

Create order

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaCreateOrderParams"
/>

### `alpaca_cancel_order`

Cancel order

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaCancelOrderParams"
/>

### `alpaca_cancel_all_orders`

Cancel all orders

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaCancelAllOrdersParams"
/>

### `alpaca_get_clock`

Get clock

_No parameters._

### `alpaca_get_calendar`

Get calendar

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaGetCalendarParams"
/>

### `alpaca_list_assets`

List assets

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaListAssetsParams"
/>

### `alpaca_get_asset`

Get asset

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaGetAssetParams"
/>

### `alpaca_get_portfolio_history`

Get portfolio history

<AutoTypeTable
  path="generated/tool-params/alpaca.ts"
  name="AlpacaGetPortfolioHistoryParams"
/>

## Notes

- Category: Finance
- Authentication mode: API key
