Skip to main content
pipeshub is a small command-line tool over the PipesHub MCP endpoint. It is built for coding agents and scripts: output is JSON by default, and exit codes are fixed so a caller can branch on them. It ships in the @pipeshub-ai/mcp npm package, next to the local stdio server.

Install

This page describes @pipeshub-ai/mcp 4.8.0.

Sign in

The CLI never takes a token as an argument. It gets one in one of two ways:
  • pipeshub login: you approve a code in the browser, and the CLI stores the sign-in in a file only you can read.
  • Environment variables: PIPESHUB_TOKEN (or PIPESHUB_MCP_TOKEN) holding a personal access token, plus PIPESHUB_BASE_URL.
A token in the environment wins over a stored sign-in. A stored sign-in is only sent to the instance that issued it.
login uses the OAuth device flow. It prints a link and a code, then waits until you approve them in the browser. If the instance does not offer CLI sign-in, login says so; set PIPESHUB_TOKEN to a personal access token instead.

Sign-in from an agent

An agent only sees a command’s output when the command ends. Split the sign-in in two:

Where the sign-in is stored

pipeshub login writes credentials.json to $XDG_CONFIG_HOME/pipeshub/, or ~/.config/pipeshub/ when XDG_CONFIG_HOME is unset. The file has mode 0600. The CLI refreshes the access token before it expires when the instance issued a refresh token. If it did not, login tells you, and the sign-in ends when the token expires. pipeshub logout deletes the file and asks the server to revoke the tokens.

Commands

All commands print JSON. Every JSON result carries a requestId. --text prints a short sentence instead for login, logout, get, upload, connect, mcp install and auth connect-help. The other commands print JSON even with --text. pipeshub auth set, auth import and auth add do not exist on purpose: they exit with code 2 and point you to pipeshub login.
--app <id> limits results to one connector and --kb <id> to one collection. Both can repeat. Get the ids from pipeshub sources. --limit takes 1 to 100 (default 10). Pass the nextOffset from a previous result as --offset to get the next page.

ask

--conversation continues an earlier conversation. An answer with no citations exits with code 6. ask needs agent:execute, and a pipeshub login sign-in does not get that scope. pipeshub auth status lists it under missingScopes. To use ask, set PIPESHUB_TOKEN to a personal access token that has conversation:chat and agent:execute. Without an AI model set up on the instance, ask fails with exit code 1.

get

Without --out, get prints the record’s text, cut to --max-chars (default 2000). Binary content cannot be printed; use --out <path> to save it. --as <format> asks the server to convert the file first.

collection create, upload and status

upload walks folders. Inside a folder it skips files and folders whose names start with a dot, and symbolic links. Files with an unsupported extension are skipped and listed under skipped. Indexing runs in the background; use status to follow it. upload exits with code 1 if any file failed.

connect

Prints the page where you connect a source; the CLI writes nothing. With a name (matched case-insensitively), the link opens that connector. The JSON result has url (your personal connectors page) and adminUrl (connect for the whole organization). Check the result later with pipeshub sources.

mcp install

--client takes claude-code, cursor, codex, gemini or claude-desktop. Sign in first: mcp install needs an instance and a credential. The entry runs the local stdio server, npx -y @pipeshub-ai/mcp@>=4.7.0 start --server-url <origin>, which reads the pipeshub login sign-in. No token is written into the client’s config. --dry-run shows what would change and changes nothing. --force replaces an existing pipeshub entry. Restart the client afterwards.

init-qm

Writes the QM bundle into the directory. --force overwrites files that already exist. See QM.

Options

An unknown option is an error (exit code 2), not ignored.

Environment variables

When no URL variable is set, the CLI uses the instance of the stored sign-in.

Cleartext HTTP

The CLI sends credentials over http:// only to private hosts: localhost and other loopback addresses, private IP ranges, host.docker.internal, single-label names such as Docker Compose service names, and names ending in .local, .internal, .svc or .svc.cluster.local. For any other host it refuses with exit code 2. Use https://, or pass --insecure-http if the host really is private.

Exit codes