> ## Documentation Index
> Fetch the complete documentation index at: https://docs.servflow.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> The servflowai command line

This page lists every `servflowai` command, what each one is for, and what shape of data it reads or prints. Use it with [Configuration](https://docs.servflow.io/references/configuration.md), [Available entry handlers](https://docs.servflow.io/references/entry-handlers.md), [Available actions](https://docs.servflow.io/references/actions.md), [Available integrations](https://docs.servflow.io/references/integrations.md), and [Available providers](https://docs.servflow.io/references/providers.md).

The settings of one entry handler, action, integration, or provider are not on this page. Each has its own section on its catalog page: [Available entry handlers](https://docs.servflow.io/references/entry-handlers.md), [Available actions](https://docs.servflow.io/references/actions.md), [Available integrations](https://docs.servflow.io/references/integrations.md), and [Available providers](https://docs.servflow.io/references/providers.md).

## Commands

| Command | Purpose |
| - | - |
| [`servflowai server`](#server) | Runs the HTTP server and dashboard. |
| [`servflowai resource <noun> <verb>`](#resource) | Reads and writes agents, integrations, providers, secrets, and workspaces, and prints the catalogs. |
| [`servflowai install`](#install) | Installs a template into the running server. |
| [`servflowai version`](#version) | Prints the binary's version. |

## server

Runs the HTTP server and dashboard.

```bash theme={null}
servflowai server -c ./server.toml
```

## resource

Reads and writes saved resources and prints the catalogs the server uses.

### Nouns and verbs

| Noun | Verbs | Addressed by |
| - | - | - |
| `agent` | `list`, `get`, `create`, `update`, `delete`, `enable`, `disable`, `schema` | `config_id` |
| `integration` | `list`, `get`, `create`, `update`, `delete`, `enable`, `disable`, `types`, `describe` | `integrationId` generated from the integration's name at creation |
| `provider` | `list`, `get`, `create`, `update`, `delete`, `types`, `describe` | `providerId` |
| `secret` | `list`, `get`, `create`, `update`, `delete` | `name` |
| `workspace` | `list`, `get`, `create`, `update`, `delete` | `uid` |

### Common flags

| Flag | Meaning |
| - | - |
| `-c, --config <path>` | Server config file. |
| `-f, --file <path or ->` | Body file for create and update. `-` reads stdin. |
| `--dry-run` | Validate and print what would be written, without saving it. |
| `--reload` | Reload the running engine after a successful write. |

### The body for create and update

#### Agent

| Key | Type | Required | Meaning |
| - | - | - | - |
| `name` | string | Yes | The agent's name. |
| `config_id` | string | No | The id the agent is stored and addressed under. Derived from the name when missing. |
| `description` | string | No | A description shown in lists. |
| `enabled` | boolean | No | Whether the agent is served. Ignored on create and update: save stores the config, and `enable` or `disable` changes what is served. |
| `config` | object | Yes | The agent itself: `entries`, each with its optional `steps`, and `agents`. |

```bash theme={null}
servflowai resource agent create -f agent.yaml --dry-run
```

### Integration

Each field of `config` is an object holding a literal, as `value`, or the name of a stored secret, as `secret`. The fields of each type are on [Available integrations](https://docs.servflow.io/references/integrations.md).

Each integration body takes a user-facing `name`. ServFlow generates the integration's internal `integrationId` from that name when it is created and returns it in the result. Updates keep the same `integrationId` even if you rename the integration later.

OAuth-guided integrations, such as `notion_mcp`, have no config fields in the body. Creating one this way leaves it unusable until you complete its sign-in in the dashboard. A created integration is stored disabled; `servflowai resource integration enable <integrationId>` is what serves it.

```json theme={null}
{
  "name": "Vectors",
  "type": "qdrant",
  "config": {
    "url": { "value": "http://localhost:6333" }
  }
}
```

### Provider

`config` holds the type's fields as plain values. `api_key` is the key itself, not the name of a secret. The fields of each type are on [Available providers](https://docs.servflow.io/references/providers.md).

```json theme={null}
{
  "name": "OpenAI production",
  "type": "openai",
  "config": { "api_key": "sk-...", "model": "gpt-4.1" }
}
```

### Workspace

```json theme={null}
{
  "name": "Team handbook",
  "description": "Files the support agent reads."
}
```

The server names the workspace's folder and creates it.

### Secret

A secret takes flags, not a body.

```bash theme={null}
servflowai resource secret create --name discord-token --value "<value>" --description "Bot token"
```

## The shape of an agent

The document under `config`. `servflowai resource agent schema` prints the same shape as JSON Schema, and is the authority when this page and the binary differ.

## install

Installs a template into the running server.

| Flag | Meaning |
| - | - |
| `--server <url>` | The server to install into. |
| `--token <token>` | Bearer token for the server. |
| `--integration key=integrationId` | The integration that meets one of the template's requirements. Repeatable. |
| `--provider key=providerId` | The provider that meets one of the template's requirements. Repeatable. |
| `--workspace key=uid` | The workspace that meets one of the template's requirements. Repeatable. |

## MCP server tools

ServFlow serves the management MCP server at `/api/mcp`. Send your auth token in the `Authorization` header, as `Bearer <token>`.

The management MCP server exposes these tools:

| Group | Tools |
| - | - |
| Configs | `list_configs`, `get_config`, `validate_config`, `create_config`, `update_config`, `delete_config`, `set_config_enabled`, `config_schema`, `config_example` |
| Integrations | `list_integrations`, `get_integration`, `create_integration`, `update_integration`, `delete_integration`, `set_integration_enabled`, `list_integration_types`, `describe_integration_type` |
| Providers | `list_providers`, `get_provider`, `create_provider`, `update_provider`, `delete_provider`, `list_provider_types`, `describe_provider_type` |
| Secrets | `list_secrets`, `get_secret`, `create_secret`, `update_secret`, `delete_secret` |
| Workspaces | `list_workspaces`, `get_workspace`, `create_workspace`, `update_workspace`, `delete_workspace` |
| Discovery | `list_actions`, `describe_action`, `list_entry_handlers`, `describe_entry_handler`, `list_template_functions` |

`list_actions` lists every built-in action type. `describe_action` describes one or more action types and returns their schema and field metadata. `config_schema` returns the stored config shape as JSON Schema, and `config_example` returns a complete example config you can adapt. `list_entry_handlers` lists every built-in entry type. `describe_entry_handler` describes one or more handler types and returns their fields, injected variables, and whether each is a listener. `list_template_functions` lists the template functions available in dynamic content and tool guards, optionally filtered by category.

## version

Prints the binary's version.

```bash theme={null}
servflowai version
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.