Skip to content

ts ai connector

Show, update, or delete one MCP connector — a Model Context Protocol server the AI pipe can reach. ts ai connectors lists them all.

Usage

text
ts ai connectors [--csv] [--no-trunc]
ts ai connector <name>
ts ai connector set <name> <property> <value> [--workspace=WS]
ts ai connector delete <name> [--force]

Description

A connector points at one MCP server. Connectors are the most externally-facing part of the AI configuration — each one is a route out of your infrastructure — so ts ai connectors is the list to review when someone asks what the AI features are allowed to talk to. Disabled connectors are included, so a connector that was turned off rather than removed still shows up.

Rows are alphabetical by name. REACH says how the server gets to the MCP server. DirectUrl means the controller dials it directly, and TARGET is that URL. SessionApp and SessionStdio mean the MCP server runs inside a Turbo session and is reached through the session's tunnel; for those, TARGET shows the repository id instead of a URL. ORIGIN is local for a connector defined here, or the federation sync state — Synced, Conflicted, Unsupported — for one that came from an upstream source.

AUTH is the auth kind — None, Bearer, Header, or OAuth — with (set) appended when a secret is stored. Connector secrets are write-only: the server returns only the fact that one is configured. Unlike endpoint credentials there is no last-four cue for a connector, in the table or in --format=json, so Bearer (set) is the entire amount of information available about a stored token. To confirm a token is the right one, exercise the connector rather than inspecting it.

ts ai connector <name> prints one connector's name, id, description, and enabled state. The URL, reach, and auth kind are not in that view — read them from the listing, or from --format=json, which also carries port, path, repoId, and the published flag. Pass the name the listing shows, or the connector's id. Two connectors sharing a name is refused rather than resolved to one of them; that guess would silently repoint a route out of your network, so pass the id instead.

Rotating A Leaked Token

This is the operation the write commands exist for. Until now, replacing an MCP bearer token meant signing into the Administration site and editing the connector by hand — a poor property for incident response, when the person who needs to revoke a credential is often on a terminal, on a phone, or halfway through a script. Now it is one command:

bash
ts ai connector set "Issue tracker" secret mcp_live_…

The write goes through whatever the connector's auth kind already is: for Bearer the value is stored as the bearer token, for Header and OAuth as the header value. Nothing reads it back afterwards, and the only visible change is that AUTH gains (set) if it did not have it. Note what the write cannot do — it cannot change the auth kind. Storing a secret on a None connector parks a value the connector will never send; switch the auth kind in the Administration site first.

Rotation works on federated connectors too. That is deliberate: an incident does not wait for an upstream sync.

Changing Everything Else

set writes one property per invocation, in kebab-case: name, description, url, secret, enabled. true and false go out as booleans. A property that is not on that list is refused before anything is written.

url is validated as an http or https URL on a DirectUrl connector. Reach, port, path, and the tool allow-list are not settable from ts.

On a connector that arrived by federation, name, description, and url are immutable: the server accepts the request and silently keeps the upstream values, because the upstream definition owns them. enabled and secret are the two properties that always take effect. If an edit appears not to stick, check the ORIGIN column.

delete soft-deletes, and prompts first unless you pass --force. Run non-interactively without --force and it fails rather than guessing.

Global Enablement Versus --workspace

These are two different states, not two ways of saying the same thing.

set <name> enabled true|false with no --workspace writes the connector's global row. Disabled globally means off everywhere, in every workspace, no matter what any per-workspace row says — which makes it the switch to reach for when you want a route out of the network closed now.

set <name> enabled true|false --workspace=<ws> writes that one workspace's assignment instead, and leaves the global row alone. Those per-workspace rows are default-deny in their own right: a workspace with no assignment for a connector does not get the connector. Enabling globally therefore hands the connector to nobody by itself — it makes the connector eligible, and each workspace still has to be enabled explicitly.

A connector is reachable from a workspace only when it is enabled globally and enabled for that workspace. --workspace applies only to enabled; combine it with any other property and the command refuses. The workspace can be given as its id (the short name in URLs, such as acme) or its GUID.

Updates, deletes, and workspace enablement changes are recorded in the audit log as AgentMcpConnectorUpdated, AgentMcpConnectorDeleted, and AgentMcpConnectorWorkspaceEnablementChanged.

Options

FlagDescriptionDefault/ValuesNotes
--workspaceNarrow an enabled write to this workspace's assignment.Workspace id or GUIDset … enabled only; refused with any other property.
--force, -fDelete without confirming.delete only.
--csvTab-separated output, nothing truncated.ts ai connectors only.
--no-truncDo not truncate columns.ts ai connectors only.

Examples

bash
# What is the AI surface connected to?
ts ai connectors

# Full URLs, nothing clipped
ts ai connectors --no-trunc

# For a security review
ts ai connectors --csv > connectors.tsv

# Every field, including description, port, path, and published state
ts ai connectors --format=json

# Rotate a leaked MCP token
ts ai connector set "Issue tracker" secret mcp_live_…

# Close the route entirely, right now
ts ai connector set "Issue tracker" enabled false

# Move a connector to a new host
ts ai connector set "Issue tracker" url https://mcp.example.net/sse

# Revoke one workspace's access, leaving the connector live elsewhere
ts ai connector set "Issue tracker" enabled false --workspace=acme

# Remove a connector for good
ts ai connector delete "Build helper" --force
bash
# During an incident, order matters: close the route first, then rotate,
# then reopen. Rotating alone leaves the old token valid at the far end
# until the MCP server revokes it.
ts ai connector set "Issue tracker" enabled false
ts ai connector set "Issue tracker" secret mcp_live_…
ts ai connector set "Issue tracker" enabled true
bash
# "(set)" only proves a token exists. There is no last-four cue for
# connectors, so this cannot tell you which token is stored — not even
# whether the rotation above is the one that took effect.
ts ai connectors

Output

ts ai connectors:

text
NAME          REACH      TARGET                        AUTH           ENABLED  ORIGIN  ID
Issue tracker DirectUrl  https://mcp.example.net/sse   Bearer (set)   yes      local   6d1f0a92-...
Build helper  SessionApp acme/build-tools              None           no       local   b48c73e0-...

ts ai connector <name>:

text
Name:         Issue tracker
Id:           6d1f0a92-77b3-4c58-9e21-8a4f0d6b3c15
Description:  Issue tracker MCP bridge
Enabled:      True
Origin:

The Origin line is blank in this view — the single-connector response does not carry it. Read ORIGIN from ts ai connectors, or federated and federationState from --format=json.

Exit Codes

0 on success, including when no connectors are configured. -1 when the property is not settable, when --workspace is combined with a property other than enabled, when the name matches more than one connector, when the server rejects the write (a url that is not http or https on a DirectUrl connector), or when you decline the delete prompt. -2 when set is given fewer than three positionals. -3 when the server cannot be reached. -4 when no account is signed in or the ticket has expired. -5 when the account is not a Server Administrator. -6 when no connector has that name or id, or when --workspace names a workspace that does not exist.

  • ts ai — The rest of the namespace.
  • ts ai tools — Tools, including the Mcp tools discovered through these connectors.
  • ts ai endpoints — The model endpoints on the other side of the pipe.
  • ts ai transcripts — Evidence of what was actually called.
  • ts workspace — The workspaces connectors are enabled for.
  • ts audit — Operator changes to connectors, recorded as they happen.