# Create Compute Environment — Seqera

> Creates a new compute environment in Seqera Tower. See the documentation

- Key: `seqera-create-compute-environment`
- Type: Action (Write)
- Version: 0.0.3
- App: Seqera (`seqera`) — https://pipedream.com/apps/seqera.md
- This page (HTML): https://pipedream.com/apps/seqera/actions/create-compute-environment
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/seqera/actions/create-compute-environment/create-compute-environment.mjs

## Description

Creates a new compute environment in Seqera Tower. [See the documentation](https://docs.seqera.io/platform/23.3.0/api/overview)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | A unique name for this compute environment. Use only alphanumeric, dash, and underscore characters. Eg. My-Env_1 |
| `description` | `string` | No | The description of the compute environment. |
| `platformId` | `string` | Yes | The ID of the platform to use for the compute environment. Options are loaded from the connected account. |
| `workspaceId` | `string` | No | The ID of the workspace to use. Options are loaded from the connected account. |
| `credentialsId` | `string` | No | The ID of the credentials to use for the compute environment. Options are loaded from the connected account. |
| `config` | `object` | No | The configuration of the compute environment. For the model reference look here. |

## 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": "seqera",
      },
    },
  },
)

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: "seqera-create-compute-environment",
  arguments: {
    name: "Name",
    description: "Description",
  },
})
```

**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: "seqera-create-compute-environment",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    seqera: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    description: "Description",
  },
})

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": "seqera-create-compute-environment",
    "configured_props": {
      "seqera": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "description": "Description"
    }
  }'
```

---

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