# Harvest — Pipedream Connect

> Online Time Tracking and Invoicing Software

- API slug: `harvest` (use in MCP headers and tool keys)
- Auth: OAuth (Pipedream-managed)
- Categories: Productivity
- Website: https://www.getharvest.com/
- This page (HTML): https://pipedream.com/apps/harvest
- Tools: 5 actions · 2 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: harvest`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "harvest",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Timesheet Entry:
const result = await mcp.callTool({
  name: "harvest-create-timesheet-entry",
  arguments: {
    accountId: "Account ID",
    projectId: "Project ID",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Harvest endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://id.getharvest.com/api/v2/accounts

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9pZC5nZXRoYXJ2ZXN0LmNvbS9hcGkvdjIvYWNjb3VudHM?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "harvest-create-timesheet-entry",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    harvest: { authProvisionId: "apn_xxxxxxx" },
    accountId: "Account ID",
    projectId: "Project ID",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (5)

### `harvest-create-timesheet-entry` — Create Timesheet Entry (Write)

Creates a new time entry object. Create a time entry via duration documentation, Create a time entry via start and end time documentation

Full schema: https://pipedream.com/apps/harvest/actions/create-timesheet-entry.md

### `harvest-get-projects` — Get Projects (Read-only)

Retrieve data for a project or projects. See docs here

Full schema: https://pipedream.com/apps/harvest/actions/get-projects.md

### `harvest-list-account-id-options` — List Account ID Options (Read-only)

Retrieves available options for the Account ID field.

Full schema: https://pipedream.com/apps/harvest/actions/list-account-id-options.md

### `harvest-start-timer` — Start Time Entry (Write)

Restart a stopped timer entry. See docs here

Full schema: https://pipedream.com/apps/harvest/actions/start-timer.md

### `harvest-stop-timer` — Stop Time Entry (Write)

Stop a timer entry. See docs here

Full schema: https://pipedream.com/apps/harvest/actions/stop-timer.md

## Triggers (2)

### `harvest-new-invoice-entry` — New Invoice Entry (Polling)

Emit new notifications when a new invoice is created

Full schema: https://pipedream.com/apps/harvest/triggers/new-invoice-entry.md

### `harvest-new-timesheet-entry` — New Timesheet Entry (Polling)

Emit new notifications when a new timesheet entry is created

Full schema: https://pipedream.com/apps/harvest/triggers/new-timesheet-entry.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
