Developer docs
CLI commands and configuration
Use the CLI to inspect API schemas, send JSON requests, sign in through the browser and configure your MCP connection.
Read as MarkdownReviewed by SosoAPI team ·
Commands
Check --help for the flags your installed version supports. With no arguments, sosoapi starts the MCP stdio server. Run the commands below separately; they are not a shell pipeline.
npx sosoapi --help
npx sosoapi auth login
npx sosoapi auth login --no-open
npx sosoapi auth status
npx sosoapi auth refresh
npx sosoapi auth logoutnpx sosoapi connect threads
npx sosoapi connect instagram --no-opennpx sosoapi api contract --summary
npx sosoapi api contract --route /studio-api/scheduled-posts/
npx sosoapi api contractCall an API route with JSON stdin
Use api post for routes on the CLI’s public allowlist, including reads that use HTTP POST. Save the request body in request.json with a file editor so customer text is not interpreted by the shell. Check http_status and the response body; a zero exit code alone does not establish API success.
This example reads workspace context. Before sending a write, look up the operation’s schema and confirm the destination you are authorized to use. Save the returned ID and check the result before retrying a request that timed out.
{}npx sosoapi api post /identity-api/workspace/list < request.jsonEnvironment variables
Set these variables on the process that runs your MCP server. Optional telemetry excludes arguments, prompts, results and file paths; set SOSOAPI_TELEMETRY=0 to turn it off. Using a custom API address requires explicit opt-in, and the CLI will not send VICKY_API_KEY to that address.
| Variable | Effect |
|---|---|
| SOSOAPI_TOOL_PROFILE=core | Everyday tools; default is full. Does not grant permissions. |
| SOSOAPI_OUTPUT_SCHEMAS=1 | Include output schemas in tools/list; results are structured either way. |
| SOSOAPI_UPLOAD_ROOTS | Additional local media roots, separated by : (; on Windows). |
| SOSOAPI_TELEMETRY=0 | Disable optional usage reporting. |
| SOSOAPI_DEBUG=1 | Print CLI failure stack traces; review and redact before sharing. |
| VICKY_API_KEY | Personal access token for scripts/CI; prefer OAuth for agents. |
| VICKY_API_BASE_URL | Custom HTTPS API base (localhost may use HTTP); also needs SOSOAPI_ALLOW_CUSTOM_BASE_URL=1. |
Handling untrusted content
Comments and usernames can contain instructions written by other people. For covered responses, the CLI adds untrusted_content and untrusted_notice labels and a warning on stderr. It also sanitizes and truncates content, but your agent must still treat it as data rather than authority to take an action.