clihub CLI

clihub turns any MCP server into a ready CLI: each tool becomes a subcommand and the result is one static binary with no runtime dependencies

  • 666 ★ on the repository
  • Last commit
  • MIT
CLI

Broad access

Why this level

  • Through `--stdio` it launches an arbitrary command to ask the server for its tool list, generates Go code and compiles it
  • Stores OAuth tokens and keys in `~/.clihub/credentials.json` and accepts them through command-line flags
  • Generated programs call the server's tools, including writing ones, on behalf of your account
All reasons and checks

thellimist/clihub

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/clihub

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • Through `--stdio` it launches an arbitrary command to ask the server for its tool list, generates Go code and compiles it
  • Stores OAuth tokens and keys in `~/.clihub/credentials.json` and accepts them through command-line flags
  • Generated programs call the server's tools, including writing ones, on behalf of your account

This is third-party code. Review the repository files before installing.

What it does

clihub is a Go generator: it connects to an MCP server, learns the list of its tools and builds a standalone command-line program from them. The command `clihub generate --url https://mcp.linear.app/mcp` creates the binary `./out/linear`, where every server tool has become a subcommand and the flags are derived from the JSON Schema of its parameters. It works with servers over streamable HTTP (`--url`) and over stdio (`--stdio "npx @modelcontextprotocol/server-github"`, with environment variables passed through the `--env` flag). The pipeline has four steps: connect to the server, fetch the tool list through `tools/list`, generate Go code with one subcommand per tool and compile it into a static binary. The finished program does not depend on clihub and runs without configuration files. The `--platform` flag builds binaries for several systems at once, for example `linux/amd64,darwin/arm64,windows/amd64`, while `--include-tools` and `--exclude-tools` limit the set of tools. Each subcommand takes its parameters as flags or whole through `--from-json`. The generated CLI handles authorization itself. The `auth` subcommand starts an OAuth browser sign-in with PKCE, accepts a token through `--token`, and `auth status` and `auth logout` show and reset the state. Bearer, a header key, Basic, server-to-server OAuth 2.0 and a Google service account are supported. Credentials are saved in `~/.clihub/credentials.json`.

Who it is for. For developers and agent setup owners who find it easier to call a tool as a terminal, script or CI command than to keep an MCP server connected.

Good fit when

  • You need an MCP server in a script, CI or over SSH where no agent runs, and calling its tools as an ordinary command is handier
  • You want to hand colleagues one executable for a server such as Linear or Notion, built for `linux/amd64`, `darwin/arm64` and `windows/amd64`
  • You want to keep only a few tools out of a server's large set with `--include-tools`
  • You need to sign in to a server with OAuth through `auth` or with a token through `--auth-token` and do not want the key in the agent configuration
  • The agent works through a shell, and calling `./out/linear create-issue --from-json '{...}'` is easier for it than setting up MCP

Not a fit when

  • The machine has no Go: clihub invokes the compiler, the README requires Go 1.24 or newer and `go.mod` says 1.25.6
  • The server is available only over SSE or another transport: the `--url` flag takes a streamable HTTP address
  • You want to work with several servers on the fly with no build: mcp2cli builds commands at run time, with no code generation
  • You cannot keep a token on disk: after sign-in it is saved in `~/.clihub/credentials.json`

Example request

Use clihub to build a CLI for the Linear MCP server at https://mcp.linear.app/mcp, sign in through the browser and show the list of commands

Limitations

  • The license is MIT. The `VERSION` file holds 0.0.8 and there are no GitHub releases: it installs from source through `go install`.
  • Go is required: the README says 1.24+ while `go.mod` requires 1.25.6, so go by the newer one. If the `clihub` command is not found after install, add `$(go env GOPATH)/bin` to `PATH`.
  • For some MCP servers authorization is needed already at generation, because without it the server does not return its tool list. The needed flags are shown by `clihub generate --help-auth`.
  • The authorization resolution order is fixed: the `--auth-token` flag, then `--auth-type` with its flags, the `CLIHUB_AUTH_TOKEN` variable, the `~/.clihub/credentials.json` file, otherwise an unauthenticated request.
  • The README's AGENTS.md example has the agent build missing CLIs with `go run github.com/thellimist/clihub@latest`, that is, download and run code from the network. Decide whether to allow that.

How to disable. Delete the `clihub` binary from `$(go env GOPATH)/bin` or `~/.local/bin`, and the generated programs from the `./out/` folder or the project's `bin`. Saved tokens live in `~/.clihub/credentials.json`: to sign out of one server run `./out/<name> auth logout`, and to clear everything delete the file. If you added the README rule to AGENTS.md, remove it.

FAQ

How does the generated CLI differ from the MCP server itself?

It runs as an ordinary command-line program with no agent running. The server's tools are subcommands, parameters are flags, and the output is easy to pass to scripts. The server stays the same, and the program only connects to it when called.

How do I pass the call parameters as a whole?

Each subcommand takes a `--from-json` flag with a JSON object: `./out/linear create-issue --from-json '{"title":"Bug report","priority":"high"}'`. It cannot be combined with typed flags in one call. If a tool already has a `from-json` parameter, `--clihub-from-json` is used.

How do I connect a server that requires OAuth?

Add the `--oauth` flag at generation, for example `clihub generate --url https://mcp.notion.com/mcp --oauth`. The generated program opens a browser for sign-in when `auth` is called. Endpoints are discovered per RFC 9728 and RFC 8414, and client registration follows RFC 7591.

Which authorization types are supported?

Seven: OAuth 2.0 with PKCE, dynamic client registration, a Bearer token, a header key (`X-API-Key` by default), Basic, browserless client-credentials OAuth 2.0 and a Google service account with a signed JWT.

Can I build binaries for other systems?

Yes, with the `--platform` flag taking GOOS/GOARCH pairs separated by commas or the value `all`. The result lands in `./out/`, and the folder can be changed with `--output`. For Linear the README example gives a size of 6.5 MB.

How do I limit the set of tools?

With the `--include-tools` and `--exclude-tools` flags, each taking names separated by commas. The filter works at generation, so the extra subcommands never get into the program. It is implemented in `internal/toolfilter` and allows fuzzy name matching.

Discussion

No questions or reviews yet.

CLI tools

A lightweight CLI to discover, inspect and call MCP server tools straight from the shell

CLIExtended access1.3KRepository stars

An MCP server that lets an agent read files, search code and run commands in a workspace

MCP serverBroad access1.2KRepository stars

A CLI and TypeScript runtime for calling MCP servers from a terminal, scripts and generated typed clients

CLIExtended access5.1KRepository stars

A generator of Go CLIs and MCP servers for any API: /printing-press studies docs and competitors and builds a tool with a local SQLite store

PluginBroad access4.9KRepository stars

A plugin with skills for building TypeScript MCP servers and MCP apps: the agent scaffolds, edits, debugs and verifies them

PluginExtended access10.8KRepository stars

An MCP server that gives Claude Desktop and other clients file tools, a shell and sub-agents in the style of Claude Code

MCP serverBroad access305Repository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialRepository starsMain difference
clihub (this entry)no666
mcp2clino2,424builds commands at run time with no code generation and also handles OpenAPI and GraphQL
MCPorterno5,091a TypeScript CLI and runtime for calling MCP servers, with generation of typed clients

README in short

The front page shows the idea in a single command and gives installation through `go install` or building from source. Next come a section for AI with a ready AGENTS.md snippet, quick examples for HTTP, OAuth and stdio, a description of the four steps, an authorization section with the resolution order and a list of flags. The end holds the project structure and contributor rules with pre-push hooks. The repository has a `docs` folder describing the project, architecture, authorization and releasing, along with tests for authorization and code generation.

README badge

Report a problem

Foxx AIclihub
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.