CLI
CLI overview
The planned mcpsail CLI for command-line MCP server management, tool editing, and agent configuration.
The
mcpsailCLI is planned but not yet available. This page describes the intended design so you can plan your workflows.
The mcpsail CLI will be a single binary covering everything available in the dashboard and API. It supports both interactive humans (OAuth login) and headless automation (service account tokens).
Authentication#
Two auth modes, matching tools like gh, gcloud, and stripe:
flowchart LR
Interactive["Interactive\nmcpsail auth login"] --> PKCE["OAuth 2.1 PKCE\nBrowser flow"]
PKCE --> Keychain["OS keychain storage"]
Headless["Headless\nService account token"] --> ClientCreds["OAuth 2.0\nClient Credentials"]
ClientCreds --> Env["MCPSAIL_TOKEN env var"]Token resolution order: --token flag, MCPSAIL_TOKEN env var, keychain entry, error.
Profiles#
Named profiles for multi-environment workflows:
# ~/.config/mcpsail/config.toml
[profile.default]
endpoint = "https://api.mcpsail.com"
org = "org_abc123"
[profile.staging]
endpoint = "https://staging.mcpsail.com"
org = "org_staging"Override per command with MCPSAIL_PROFILE, MCPSAIL_ENDPOINT, MCPSAIL_ORG.
Key workflows#
| Workflow | Command |
|---|---|
| Generate from OpenAPI | mcpsail mcp generate --openapi <spec> |
| Connect existing MCP | mcpsail mcp connect --url <url> |
| Edit tool rules | mcpsail tool patch <server> <tool> --when-to-use "..." |
| Refresh OpenAPI | mcpsail mcp refresh-openapi <server> --dry-run |
| Create agent | mcpsail agent create --name "Support Agent" |
| Interactive chat | mcpsail agent chat <agent-id> |
Output modes#
All commands accept --output table|json|yaml and --quiet. Default is human-friendly table.
See Command reference for the full specification.