# List Project Statuses — GitHub

> List the options of a Project (V2) Status field (e.g. Todo, In Progress, Done), returning each option's name and id. Use this to discover the valid status values for a project before calling Update Project (V2) Item Status. Get the project…

- Key: `github-list-project-statuses`
- Type: Action (Read-only)
- Version: 0.0.2
- App: GitHub (`github`) — https://pipedream.com/apps/github.md
- This page (HTML): https://pipedream.com/apps/github/actions/list-project-statuses
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/github/actions/list-project-statuses/list-project-statuses.mjs

## Description

List the options of a Project (V2) Status field (e.g. `Todo`, `In Progress`, `Done`), returning each option's name and id. Use this to discover the valid status values for a project before calling **Update Project (V2) Item Status**. Get the project number from **List Projects**. Discover organization logins with **List Organizations**. [See the documentation](https://docs.github.com/en/graphql/reference/projects#object-projectv2singleselectfield)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `owner` | `string` | Yes | The account that owns the Project (V2) — an organization login (e.g. my-org), or a repository owner when Repository is also set. Required, and it must come from the user. If the user has not said which owner/organization the project belongs to, ask them — do NOT guess an owner or enumerate organizations to find one. If they named an organization but you need its exact login, use List Organizations. User-owned Projects are not supported. |
| `repo` | `string` | No | Optional. The repository name without the owner (e.g. my-repo, not my-org/my-repo) when the Project (V2) is repository-scoped. Leave blank to target an organization-owned Project. |
| `project` | `integer` | Yes | The Project (V2) number as shown in the project URL and UI (e.g. 5 in /orgs/my-org/projects/5) — not the node ID. Required. If the user has not provided it, ask them — do NOT guess. Once you know the owner, you can look up numbers with List Projects. |

## Run it

**MCP**

```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": "github",
      },
    },
  },
)

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

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "github-list-project-statuses",
  arguments: {
    owner: "Owner",
    repo: "Repository",
  },
})
```

**TypeScript**

```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: "github-list-project-statuses",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    github: { authProvisionId: "apn_xxxxxxx" },
    owner: "Owner",
    repo: "Repository",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "github-list-project-statuses",
    "configured_props": {
      "github": { "authProvisionId": "apn_xxxxxxx" },
      "owner": "Owner",
      "repo": "Repository"
    }
  }'
```

---

- App: https://pipedream.com/apps/github.md · All apps: https://pipedream.com/apps
