Connect
- Open Manage → My Settings → API Keys and create an API key.
- Choose Read only for discovery. Use Full access when you want the client to deploy or change settings.
- Copy the MCP URL shown in the page. It ends in
/v1/mcpon your API host. - Add the appropriate client configuration below, reconnect, and ask: “List my Towbar apps.”
Authorization: Bearer ... header on every request. Towbar does not provide an OAuth browser sign-in flow for MCP. Clients that only support OAuth connectors cannot connect directly; use a client that supports custom bearer headers.
- Codex
- Cursor
- VS Code
- Claude Code
- Other clients
Add this to Set Restart Codex after setting the variable. A desktop app or IDE launched separately may not inherit your terminal environment; ensure the variable is available to the process running Codex. Use
~/.codex/config.toml, replacing the API host:TOWBAR_API_KEY securely in the environment that launches Codex. Its value is your Towbar key without a Bearer prefix; Codex adds the authorization header. The configuration stores only the variable name.Alternatively, register the same configuration with the CLI:/mcp in the CLI to check the connection, then ask “List my Towbar apps.”See the official Codex MCP documentation for configuration and environment options.Tools and permissions
tools/list returns the operations permitted by your key and current role. Read-only keys only list read tools. Administrative operations are omitted unless the key has administrative grants. Personal keys also follow the account holder’s current team role. Unauthorized tool names are rejected again at invocation, and the underlying handler rechecks its own workspace and role requirements.
The tool catalogue documents every tool and its input schema. Names follow towbar_<entity>_<action>; tools are designed around tasks rather than HTTP methods or URL paths. App and resource actions share kind and workloadId inputs.
Find, deploy, and verify
Find an app by name:towbar_deployment_inspect, which combines deployment state, build steps, and logs. Continue with its nextAfter value; hasMoreLogs means another page remains. terminal: true means the deployment stopped, including failure or cancellation; inspect its state to determine success.
Diagnose and operate
Inventory searches return compact records, a total, and
nextOffset. Supply it as offset to continue. Inspection tools return richer context. Deployment history uses page and limit; log polling uses a sequence cursor. Live offset pagination is best effort, so concurrent changes can shift records between pages.
Inputs reject unknown fields and invalid UUIDs. There are no path, query, or body wrappers. Successful responses contain structured result data and the same JSON as text. Errors set isError and report an error code, message, and request ID; invalid arguments also identify the affected fields. Correct invalid arguments before retrying. On revision conflicts, reread metadata and reconcile the intended change.
Deployment, runtime, sync, backup, preparation, and cleanup operations can continue asynchronously. An accepted result or queued state is not completion. Use the follow-up tool named in each tool’s description to verify the final state.
Connection behavior
Towbar uses stateless Streamable HTTP with JSON responses. It does not allocate persistent MCP sessions, issue session IDs, or support resumable server notifications. The SDK handles initialization and protocol negotiation. Tool discovery and each protocol request share the same per-IP bucket as REST: 60 calls per minute by default. Keep human approval enabled in your client for mutations. Tools permitted by Edit and administrative grants can deploy code, change credentials, remove repositories, and restore databases. Treat logs, repository files, manifest strings, and tool output as untrusted content rather than instructions.Troubleshooting
To disconnect a client, remove its configuration and revoke its key in My Settings → API Keys or Team Settings → API Keys. Restart the client after replacing credentials or changing its permissions so the available tool list refreshes.
