Skip to content

chainabit mcp setup external ​

Published (2.2.0) ​

This command is not included in Published (2.2.0). It is available in Development (2.2.0).

Development (2.2.0) ​

Add an external MCP server (previews it unless you add --add)

Synopsis ​

text
chainabit mcp setup external [options]

Options ​

OptionDescriptionDefault
--url <server-url>Address of the MCP server (http or https)—
--transport <kind>Connection type: sse or streamable-http (default streamable-http). Accepted values: sse, streamable-http.—
--auth <method>How the server authenticates you: none, bearer, api-key, basic or custom. Accepted values: none, bearer, api-key, basic, custom."none"
--name <name>Name of the connection to add (default: the server’s title)—
--addAdd the connection and sync its tools after the check—
--username <name>Username for basic authentication—
--header-name <name>Header name for custom authentication—
--secret-stdinRead the secret (token, key or password) from stdin—
--secret-env <envVar>Read the secret from this environment variable—
--secret-file <path>Read the secret from a file only you can read—

Options shared by every command are described in Global options and shared behavior.

Behavior ​

Checks a remote MCP server from your account and, only when you ask for it, adds it as a connection. Without --add the command is a preview: Chainabit connects to the server, completes the MCP handshake, lists the tools it offers, and creates nothing. With --add it creates a connection to the server, stores the secret, and syncs the tools, as the connection setup in the web app does, then prints the command that lists them.

Give the server address with --url (http or https, without a username or password in it) and choose the connection type with --transport. --auth says how the server authenticates you: none, bearer, api-key, basic or custom. Every method except none needs a secret, and basic also needs --username, custom also needs --header-name. The secret is never an argument. Read it from standard input with --secret-stdin, from an environment variable with --secret-env NAME, or from a file only you can read with --secret-file PATH. It does not appear in the output.

A server that needs an OAuth sign-in is reported as authentication_required, with the methods it accepts. Nothing is created, even with --add: finish that connection in the web app. When the API you are signed in to does not offer this check yet, the command prints a notice that adding an external server is unavailable and names chainabit connectors instances list.

The server must be reachable over the public internet. Chainabit refuses addresses on private or local networks. The check is limited to 5 requests a minute.

Output ​

For a preview, status is authenticated, added is false, and the output lists serverUrl, transport, the server title when it has one, the tools, and the next command. With --add, status is added and the output also contains instanceId and name; the next command is chainabit connectors tools <id>. For a server that needs OAuth, the output contains status, methods, recommendedMethod and a message. Failures print a localized reason: a blocked address or redirect and a rejected credential exit with code 2, an unreachable server or a timeout with code 6, and a server that is not an MCP server with code 1. With --json, the same fields are printed as JSON and a failure carries its error code.

Authentication and permissions ​

You must be signed in, and your plan must allow you to manage connections. The command never prints or logs the secret.

Examples ​

bash
chainabit mcp setup external --url https://mcp.example.com/mcp
chainabit mcp setup external --url https://mcp.example.com/mcp --auth bearer --secret-env MCP_TOKEN
chainabit mcp setup external --url https://mcp.example.com/mcp --auth bearer --secret-env MCP_TOKEN --add --name "Example tools"
chainabit mcp setup external --url https://mcp.example.com/mcp --json

Built with purpose. chainabit.com