mcp-cli
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cli list the available CLI commands"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@qodalis/mcp-cli
A Model Context Protocol server that helps Claude Code build Qodalis CLI plugins (docs search, exact API declarations, scaffolding) and gives it the commands, files, data explorer, jobs and plugin tools of a running Qodalis CLI server through a resilient proxy.
mcp-cli runs on your machine as a stdio MCP server in one of two modes:
Developer mode (no
QCLI_URL): the plugin-development tools only. No server needed.Server mode (
QCLI_URLset): the same tools plus a proxy to the server's MCP endpoint (<server>/api/qcli/mcp): Claude Code sees exactly the server's tools, with the permissions of the account you configure. It handles sign-in, reconnects after network drops and lets you narrow what the assistant may use.
Where it fits
Repository | Role |
The browser terminal (Angular, React, Vue) and its plugins, including | |
The servers that host the MCP endpoint | |
Admin dashboard served by the servers | |
The CLI as a PWA and Android app | |
mcp-cli | This repository: the bridge from Claude Code to a server |
Related MCP server: Claude Code Bridge
Highlights
Plugin development built in. Search the plugin guide, read the exact TypeScript declarations of
@qodalis/cli-coreand scaffold a plugin, with prompts that walk the assistant through a web plugin or a server command.No tool-specific code. Tools come from the server's
tools/listand are passed through unchanged (names, schemas, annotations); calls are forwarded. New commands on the server show up without updating the proxy.Token or password. Use an API token (
QCLI_TOKEN), or sign in withQCLI_USER/QCLI_PASSWORD; an expired session is renewed automatically on the next call.Read-only mode (
QCLI_READ_ONLY=true) exposes only the tools the server marks read-only, and refuses calls to anything else.Client-side allow and deny lists (
QCLI_TOOLS,QCLI_EXCLUDE, trailing*allowed) on top of the server's own permissions.Self-healing connection. It connects on first use, never caches a failed connect, retries once when the connection drops, and fails fast (8 s) when the server is unreachable, with a message that says what to check.
Clear errors: a rejected token, MCP not enabled on the server, a missing permission or an unreachable host each come back as one actionable sentence.
Quick start
For plugin development, nothing else is needed:
claude mcp add qcli -- npx -y @qodalis/mcp-cliThen ask, for example, "Create a Qodalis CLI plugin that converts temperatures" or run the
/mcp__qcli__create-web-plugin prompt. See Plugin development.
To also reach a running server, add QCLI_URL and credentials as described below.
npx -y @qodalis/mcp-cli --helpThe server must have MCP enabled (default ports: .NET 8046, Node 8047, Python 8048):
Server | Enable MCP |
Node |
|
Python |
|
.NET |
|
Each also takes options (tool allow/deny lists, a static token, instructions); see MCP endpoint.
Claude Code
claude mcp add qcli -- npx -y @qodalis/mcp-clithen set the environment in ~/.claude.json:
{
"mcpServers": {
"qcli": {
"command": "npx",
"args": ["-y", "@qodalis/mcp-cli"],
"env": {
"QCLI_URL": "http://localhost:8047",
"QCLI_TOKEN": "qcli_pat_..."
}
}
}
}or sign in with a user name and password instead of a token:
"env": {
"QCLI_URL": "http://localhost:8047",
"QCLI_USER": "ops",
"QCLI_PASSWORD": "********"
}The same in one command, with -e flags:
claude mcp add qcli -e QCLI_URL=http://localhost:8047 -e QCLI_TOKEN=qcli_pat_... -- npx -y @qodalis/mcp-cliAdd --scope user to make it available in every project. With
--scope project the entry goes into the project's .mcp.json, which is
usually committed: keep the secret out of it with
"QCLI_TOKEN": "${QCLI_TOKEN}" and set the variable in your shell. A .env
file works too:
{ "command": "npx", "args": ["-y", "@qodalis/mcp-cli", "--env-file", "/path/to/.env"] }Pin a version in shared configs (@qodalis/mcp-cli@0.2.0) so an upgrade is a
deliberate change.
Getting a token
In the web CLI connected to the server (users plugin), signed in as the account the assistant should act as:
token create claude --expires=90
# token create claude --permissions=commands:execute,files:read (narrower scope)The token (qcli_pat_…) is shown once. Without the web CLI, sign in and create
one with curl:
SESSION=$(curl -s http://localhost:8047/api/v1/qcli/sessions \
-H 'Content-Type: application/json' -d '{"username":"ops","password":"..."}' | jq -r .token)
curl -s http://localhost:8047/api/v1/qcli/tokens -H "Authorization: Bearer $SESSION" \
-H 'Content-Type: application/json' -d '{"name":"claude","expiresInDays":90}' | jq -r .token
curl -s -X DELETE http://localhost:8047/api/v1/qcli/sessions/current -H "Authorization: Bearer $SESSION"A server without the users plugin protects its endpoint with a static token
(its mcp.token option): put that value in QCLI_TOKEN. If it sets none, the
endpoint is open and no auth variable is needed.
Plugin development
These tools are served locally and work without a server (developer mode) or next to
a server's tools. Turn them off with QCLI_DEV_TOOLS=false.
claude mcp add qcli -- npx -y @qodalis/mcp-cli # developer mode
claude mcp add qcli --scope user -- npx -y @qodalis/mcp-cli # in every projectTools
Tool | Arguments | What it does |
|
| Ranked topics of the plugin guide as |
|
| A topic in full (heading match, case-insensitive; |
|
| The TypeScript declaration of an interface, type, class, function, enum or constant, with its JSDoc and the related declarations to look up next. |
|
| Runs |
Where the data comes from:
Docs:
https://cli.qodalis.com/llms-full.txt(QCLI_DOCS_URL), cached for an hour. When it cannot be fetched, the last download is reused, else the snapshot bundled in the package (docs/llms-full.txt), so the tools work offline.API declarations: the project's
node_modules(the MCP server's working directory and its parents) when the package is installed there, so the answer matches the version you build against. Otherwise thelatestversion on npm, downloaded from jsDelivr (unpkg as fallback) and cached in memory and in<tmp>/qodalis-mcp-cli; offline, the newest cached version is used.Scaffolding: validates the name (lowercase letters, digits and hyphens, no
cli-prefix), refuses an existing target directory, runs without a TTY and stops after 5 minutes. The standalone project installs its dependencies.
Prompts
Prompt | Arguments | Walks the assistant through |
|
| Reading the guide, looking up the contracts with |
|
| Adding a command processor to a Node, .NET or Python server, registering it and testing it. |
In Claude Code they appear as /mcp__qcli__create-web-plugin and
/mcp__qcli__create-server-command. The docs topics are also MCP resources
(qcli-docs://<section>/<topic>), which Claude Code can attach with @.
Example requests
"Search the Qodalis plugin docs for reading user input." →
qcli_docs_search"Show me ICliExecutionContext." →
qcli_api { "symbol": "ICliExecutionContext" }"Which options does CliEngine take?" →
qcli_api { "symbol": "CliEngine", "package": "cli" }"Scaffold a plugin called json-tools." →
qcli_scaffold_plugin { "name": "json-tools" }
Filters and read-only mode
The dev tools are tools like any other: QCLI_TOOLS and QCLI_EXCLUDE apply to
them (QCLI_EXCLUDE=qcli_scaffold_plugin, or QCLI_TOOLS=qcli_* for the dev
tools alone), and QCLI_READ_ONLY=true hides and refuses qcli_scaffold_plugin
(the docs and API tools are read-only). A server tool with the same name as a dev
tool is hidden. When the server is unreachable, tools/list still returns the
dev tools.
Configuration
Every setting is an environment variable. QODALIS_CLI_* names are accepted as
aliases for every key.
Variable | Default | Description |
| none | Server base URL, e.g. |
| none | API token ( |
| none | Sign in with this user name instead of a token (needs |
| none | Password for |
|
| Expose and allow only tools annotated |
| all | Comma-separated allow-list of tool names; a trailing |
| none | Comma-separated deny-list, same syntax, applied after |
|
| Milliseconds to wait for the TCP/TLS connection before reporting the server unreachable. |
|
| Milliseconds a single request ( |
|
| Accept a self-signed TLS certificate. |
| none | Path to a |
|
| The |
|
| Where the plugin guide is fetched from (falls back to the bundled snapshot). |
Set either QCLI_TOKEN or QCLI_USER + QCLI_PASSWORD, not both.
Tools
The tools are whatever the server exposes to your account. A typical server offers:
Tools | Available when |
| always: version, enabled features |
one tool per CLI command ( | always |
| the server's filesystem API is enabled |
| the data explorer is enabled |
| the jobs plugin is installed |
plugin tools | a server plugin contributes them |
Each one is limited by the account's permissions on the server (for example
commands:execute, files:read / files:write, data:query, jobs:manage),
and by the token's scope when it was created with --permissions.
Read-only mode
With QCLI_READ_ONLY=true the proxy lists only the tools the server annotates
readOnlyHint: true (such as server_info, fs_list, fs_read,
data_schema, jobs_list) and refuses calls to any other tool before they
reach the server. Command tools carry no read-only annotation, so they are
hidden in this mode; add the ones you want with a separate, non-read-only entry
and QCLI_TOOLS.
The filter is defence in depth. The real boundary is the account: give the assistant a user (or a token scope) with only the permissions it should have.
Several servers
Add one entry per server (and per access level) with a distinct name:
{
"mcpServers": {
"qcli-dev": {
"command": "npx",
"args": ["-y", "@qodalis/mcp-cli"],
"env": { "QCLI_URL": "http://localhost:8047", "QCLI_TOKEN": "qcli_pat_dev..." }
},
"qcli-prod": {
"command": "npx",
"args": ["-y", "@qodalis/mcp-cli"],
"env": {
"QCLI_URL": "https://cli.example.com",
"QCLI_TOKEN": "qcli_pat_prod...",
"QCLI_READ_ONLY": "true"
}
},
"qcli-prod-jobs": {
"command": "npx",
"args": ["-y", "@qodalis/mcp-cli"],
"env": {
"QCLI_URL": "https://cli.example.com",
"QCLI_TOKEN": "qcli_pat_prod...",
"QCLI_TOOLS": "jobs_*,server_info",
"QCLI_EXCLUDE": "jobs_cancel"
}
}
}
}Troubleshooting
claude mcp list shows whether each server connects; inside a session /mcp
shows its status and tools and lets you reconnect. The proxy logs to stderr
(claude --debug shows it).
Message | What to do |
| Create a new token ( |
| Check the credentials; the account may be disabled or locked out after failed sign-ins. |
| The account lacks |
| Turn on the server's |
| The server is down, the URL or port is wrong, or the VPN is disconnected. Retry the call once it is back: the proxy reconnects by itself. |
| A slow command; raise |
A tool is missing | The account (or token scope) lacks its permission, the feature is not enabled on the server, or |
|
|
Only the | No |
How reconnection works
The proxy connects to the endpoint on the first
tools/listortools/call, not at startup, so Claude Code starts even when the server is down.A failed connect is not cached: the next call tries again.
A connection-level error (refused, reset, socket closed, DNS failure) drops the connection and retries the request once on a fresh one. A connect timeout is not retried, so an unreachable host fails within
QCLI_CONNECTION_TIMEOUT.With
QCLI_USER/QCLI_PASSWORD, a 401 signs in again and retries once.The tool list is cached for 60 s; a call to a tool the proxy does not know yet refreshes it first, so new server commands work without a restart.
Security notes
Tokens and passwords are read from the environment, sent only to
QCLI_URL, and never written to logs or tool results.Prefer an API token with a narrow
--permissionsscope and an expiry over a password; revoke it withtoken revoke <id>when it is no longer needed.Use
https://for anything butlocalhost.QCLI_TRUST_CERT=truedisables certificate verification for this process; use it only for self-signed certificates you control.Nothing is written to stdout except the MCP protocol stream.
See SECURITY.md for reporting vulnerabilities.
Library use
The pieces are exported for embedding:
import { createProxyServer, loadConfig, RemoteServer } from '@qodalis/mcp-cli';
const config = loadConfig(process.env);
const remote = new RemoteServer(config, { clientInfo: { name: 'my-app', version: '1.0.0' } });
const server = createProxyServer(remote, config); // a low-level MCP Server: connect any transportWith the plugin-development tools (remote may be undefined for developer mode):
import { createProxyServer, DevTools, loadConfig } from '@qodalis/mcp-cli';
const config = loadConfig(process.env);
const server = createProxyServer(undefined, config, { dev: new DevTools(config) });Development
npm install
npm run build
npm test # unit tests and stdio end-to-end tests against a fake server (build first)
npm run typecheck
npm run check-format
npm run dev -- --env-file .env # run from source
npm run sync-docs # refresh docs/llms-full.txt: a path/URL argument, else generated by ../web-cli/tools/build-llms.js, else the siteSee CONTRIBUTING.md.
License
MIT © Qodalis Solutions SRL
Available Tools
4 toolsqcli_apiARead-only
TypeScript declaration (with JSDoc) of an interface, type, class, function, enum or constant from the published @qodalis packages: the project's node_modules when installed, else the latest version on npm. Use it for exact member names and signatures, e.g. ICliCommandProcessor, ICliExecutionContext, ICliModule, ICliInputReader, CliProcessCommand.
Inputs: symbol (required), package.
qcli_docs_readARead-only
Read a topic of the Qodalis CLI plugin-development guide in full (markdown with code samples). Pass a topic heading (case-insensitive), "Section › Topic" when a heading exists in several sections, or a section name ("Web plugins") for the whole section. Lists the topics when nothing matches.
Inputs: topic (required).
qcli_docs_searchARead-only
Search the Qodalis CLI plugin-development guide (web plugins, server plugins, recipes). Returns the best matching topics as "Section › Topic" with their summary and an excerpt; read one in full with qcli_docs_read.
Inputs: query (required), limit.
qcli_scaffold_pluginA
Create a new web CLI plugin with @qodalis/create-cli-plugin (npx): processor, module, build config and tests. Inside a web-cli checkout it goes to packages/plugins/; elsewhere to a standalone qodalis-cli- project with its dependencies installed. Returns the created files and next steps.
Inputs: name (required), directory, description, processorName.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct need: docs discovery (search), docs consumption (read), type/signature lookup (api), and project creation (scaffold). The search/read pair is explicitly linked in the descriptions ('read one in full with qcli_docs_read', 'Lists the topics when nothing matches'), so the boundary is unambiguous.
All tools share a consistent qcli_ prefix and lowercase snake_case, which makes the family instantly recognizable. The component ordering varies (qcli_docs_search is noun_verb, qcli_scaffold_plugin is verb_noun) and qcli_api is a bare noun, a minor inconsistency but still readable.
Four tools is a lean but justified surface for a docs-plus-scaffolding helper: one search, one read, one API reference, one generator, with no redundancy. It is on the thin side since there is no tool for exercising or validating what you build, but every tool earns its place.
Documentation retrieval (search + read) and API introspection are fully covered, but the lifecycle stops at creation: there is no tool to build, run, test, or inspect an existing plugin/project, and no way to list available recipes or installed plugins except indirectly through search. Agents will hit a dead end after scaffolding, having to fall back on shell commands.
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to interact programmatically with Claude Code CLI, managing sessions, streaming outputs, and handling permission requests.712 npm1MIT
- AlicenseNot gradedqualityCmaintenanceLets Codex delegate coding and repository work to an installed Claude Code CLI with permission-aware inspect/write access, model and effort selection, resumable and cloud-attached sessions, and durable synchronous or asynchronous jobs.MIT
- AlicenseAqualityBmaintenanceLets AI agents create and drive Claude Code cloud sessions natively over stdio, exposing typed tools to start a session from a task description, queue follow-up messages into an existing session, and check the CLI's sign-in state. Each tool maps to a fixed Claude Code CLI invocation with strict schemas and structured JSON results, so agents never write shell commands or run local sessions.770 npmMIT
- AlicenseNot gradedqualityBmaintenanceLets an AI agent work inside Claude Code Projects by remote-controlling the real Claude desktop app on a headless Linux display: listing projects, reading threads and their status, sending or forwarding messages and attachments, and approving permission cards. Read and write tools each expose a dry run, with a plain-text policy file governing what the agent may do autonomously.MIT