
Qodercli Mcp
io.github.cantbeblank96由 GitHub 账号 cantbeblank96 发布v0.4.3更新于 Oct 28, 2026
MCP server mode for Qoder CLI — delegate coding tasks to local Qoder agents from any MCP client.
概览
封装本地 Qoder CLI,让任意 MCP 客户端把编码任务交给 Qoder 代理,并可列出会话与可用模型。
- 可以做什么
- 把提示词交给本地 qodercli 代理执行,可指定工作目录、模型、推理强度、系统提示、超时与输出格式
- 通过会话 ID 继续之前的委派任务,或列出本地会话以找到可续接的会话
- 在运行时列出 qodercli 当前支持的模型
- 通过沙箱级别、权限模式或审批策略控制代理可执行的操作范围
- 返回结构化结果,如会话 ID、耗时、额度消耗与轮次数
- 适用场景
- 适合已在使用 Qoder CLI、并希望让其他 MCP 客户端(如 IDE 或桌面助手)把编码、代码审查或代码库分析任务作为子代理交给 Qoder 的用户,也支持多轮追问。
- 运行要求
- 以 stdio 在本地运行,可通过 npx 或源码启动。需要 Node.js 18 及以上,以及已安装并已登录的 qodercli。可选环境变量:QODERCLI_PATH、QODERCLI_DEFAULT_PERMISSION_MODE、HTTP_PROXY、HTTPS_PROXY。仅支持桌面客户端。
安装
在 SourceWeft 中
- 打开 控制台中的 Qodercli Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
qodercli-mcp
English | 简体中文
[npm version] [npm weekly downloads] [npm total downloads] [License: MIT] [GitHub stars]
The missing MCP server mode for Qoder CLI — delegate coding tasks to local Qoder agents from any MCP client (Qoder IDE, Claude Code, Cursor…).
A minimal MCP server that wraps the local qodercli (Qoder CLI) as MCP tools, letting any MCP client (Qoder IDE, Claude Code, Cursor, …) call Qoder like a sub-agent.
30s demo: MCP client ⇄ qodercli-mcp ⇄ qodercli — initialize → tools/list → list-models (real output, not sped up)
Quick start
Zero-config via npx — add this to your MCP client config (~/.qoder/mcp.json, claude_desktop_config.json, …):
Three tools are exposed:
Highlights: verified permission semantics (see below — e.g. dont_ask is read-only),
codex-style sandbox/approval_policy, structured output (session_id/duration_ms/total_credits).
Full configuration options are in Install.
Why
Some CLI agents ship an official MCP server mode (e.g. codex mcp-server), but qodercli currently only acts as an MCP client. This project fills that gap with a thin wrapper: it spawns qodercli -p <prompt> under the hood and streams the result back over MCP stdio.
Features
ask-qodertool — delegate a prompt to qodercli- Structured output (
session_id,is_error,duration_ms,total_credits,num_turns) via-o jsonparsing list-sessionstool to discover resumable sessionslist-modelstool for runtime model discovery (no stale model lists)reasoning_effortparameter (--reasoning-effort)- Server
instructionsin the MCP initialize result guide clients on usage - Codex-style
sandboxlevels (read-only/workspace-write/danger-full-access) - System prompt injection (
system_prompt/append_system_prompt) - Working directory, model, permission mode, output format control
- Session resume (
resume_session_id) for multi-turn delegation - Timeout protection with SIGKILL fallback
- Proxy quota support (
HTTP_PROXY/HTTPS_PROXYinjection) - Zero build step — plain ESM JavaScript, Node.js >= 18
Prerequisites
- Node.js >= 18
qodercliinstalled and signed in (qodercli login)
Install
Option A — npx (recommended): no clone needed, the MCP client downloads the package on first use.
Option B — from source (for development):
MCP client configuration
Qoder IDE
Add to ~/.qoder/mcp.json. Prefer the absolute path of node and set QODERCLI_PATH explicitly (nvm-managed binaries are often missing from the PATH seen by MCP child processes):
Proxy Support: To use your Qoder CLI proxy quota, add
HTTP_PROXYand/orHTTPS_PROXYto the server's environment. When these are set at the MCP server level, they will be passed to all qodercli subprocesses.
Developers running a local checkout instead of the published package (Option B) should replace command/args with the absolute node path and /path/to/qodercli-mcp/src/index.js (nvm-managed node is often missing from the PATH seen by MCP child processes).
Claude Code / Claude Desktop
Tool: ask-qoder
Structured output
ask-qoder declares an MCP outputSchema and returns, in addition to the
human-readable text, a structuredContent object:
Sandbox mapping
Explicit permission_mode or approval_policy always wins over sandbox.
Permission modes (verified semantics)
Tool: list-sessions
Lists local qodercli sessions (index, summary, session id) so a client can
pick a resume_session_id. Takes no arguments.
Tool: list-models
Lists models currently supported by qodercli (via --list-models), so a
client can pick a valid model value at runtime instead of relying on
stale knowledge. Returns both a text list and a structured models array.
Takes no arguments.
Usage Examples
Example 1: Simple code explanation
Example 2: Ask a second opinion
Example 3: Multi-turn conversation via resume
Example 4: Code review with specific focus
Example 5: Read-only analysis
read-only disables write/shell tools — good for audits and reviews.
Example 6: Project-wide analysis
Best Practices
- Specify working directory — Always pass
cwdwhen operating on a specific project - Use timeout protection — For complex prompts, set explicit
timeout_msshorter than 60min - Resume for multi-turn — Chain follow-ups via
resume_session_idinstead of repeating context - Model selection — Call
list-modelsfirst to discover currently supported models; larger models are better for deep analysis - Permission mode — The server default is read-only (
dont_ask); setQODERCLI_DEFAULT_PERMISSION_MODE=bypass_permissionsto make full (YOLO) access the default for personal deployments. Per-call: tasks that must create/modify files needsandbox: "workspace-write"; shell access needsdanger-full-access. Do not combinesandboxwith an explicitpermission_mode(the latter wins)
Environment variables
Development
Disclaimer
This is an unofficial, third-party tool. It is not affiliated with, endorsed, or sponsored by Qoder. Use permission_mode: bypass_permissions with care — delegated prompts may modify files in the target working directory.
Product Hunt Gallery
Main gallery image (1270×760, dark tech theme): ph-gallery.png. Optional demo video can be converted from the GIF (docs/demo.gif).
License
MIT
来源:README.md,提交 c38fccf
工具
0版本历史
1- v0.4.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分