# servers

```graphql
query Servers($input: ServersInput!) {
  servers(input: $input) {
    data {
      id
      shortId
      userId
      environmentIds
      hostname
      status
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List servers: REST lists your servers, or one project's with project\_reference; GraphQL and MCP list the servers of one project. Requires project.read.

## Arguments

| Name                     | Type            | Required | Description                                                                 |
| ------------------------ | --------------- | -------- | --------------------------------------------------------------------------- |
| `input`                  | ServersInput!   | Yes      |                                                                             |
| `input.projectReference` | String          |          |                                                                             |
| `input.limit`            | Int             |          | Integer page size from 1 to 100; defaults to 20.                            |
| `input.cursor`           | ID              |          | Server ID from this project's preceding page. Unknown cursors are rejected. |
| `input.sortBy`           | ServerSortBy    |          | Sort field. Defaults to created\_at. One of `name`, `status`, `created_at`. |
| `input.sortOrder`        | ServerSortOrder |          | Sort order. Defaults to desc. One of `asc`, `desc`.                         |

## Variables

```json
{
  "input": {}
}
```

## Responses

| Status | Description                             |
| ------ | --------------------------------------- |
| 200    | The ServersConnection! in data.servers. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query Servers($input: ServersInput!) {\n  servers(input: $input) {\n    data {\n      id\n      shortId\n      userId\n      environmentIds\n      hostname\n      status\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "input": {}
  }
}'
```

## Example response

```json
{
  "data": {
    "servers": {
      "data": [
        {
          "id": "string",
          "shortId": "string",
          "userId": "string",
          "environmentIds": [
            "string"
          ],
          "hostname": "string",
          "status": "string",
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
