qodercli-mcp
qodercli-mcp
A minimal MCP server that wraps qodercli (Qoder CLI), letting any MCP client delegate coding tasks to a local Qoder agent.
シンプルな MCP server で、ローカルの qodercli(Qoder CLI)を MCP ツールとしてラップし、任意の MCP クライアント(Qoder IDE、Claude Code、Cursor など)がサブエージェントのように Qoder を呼び出せるようにします。
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.
一部の CLI Agent は公式の MCP server モードを提供しています(例:codex mcp-server)が、qodercli は現在 MCP クライアントとしてのみ機能します。このプロジェクトは薄いラッパーでそのギャップを埋めます:内部で qodercli -p <prompt> を起動し、結果を MCP stdio を介してストリーム返します。
Features / 機能
ask-qodertool — delegate a prompt to qodercliask-qoderツール —— タスクを qodercli に委任するStructured output (
session_id,is_error,duration_ms,total_credits,num_turns) via-o jsonparsing構造化出力(
session_id、is_error、duration_ms、total_credits、num_turns)、-o jsonを自動解析list-sessionstool to discover resumable sessionslist-sessionsツール、再開可能なセッションを発見するlist-modelstool for runtime model discovery (no stale model lists)list-modelsツール、実行時に利用可能なモデルを発見(古いリストに依存しない)reasoning_effortparameter (--reasoning-effort)reasoning_effortパラメータ(--reasoning-effortを透過)Server
instructionsin the MCP initialize result guide clients on usageMCP initialize 結果にサーバー使用説明が含まれ、クライアントの正しい呼び出しを導く
Codex-style
sandboxlevels (read-only/workspace-write/danger-full-access)codex スタイルの
sandboxレベル(read-only/workspace-write/danger-full-access)System prompt injection (
system_prompt/append_system_prompt)システムプロンプト注入(
system_prompt/append_system_prompt)Working directory, model, permission mode, output format control
作業ディレクトリ、モデル、権限モード、出力フォーマットの指定をサポート
Session resume (
resume_session_id) for multi-turn delegationセッション再開(
resume_session_id)をサポートし、マルチターン委任が可能Timeout protection with SIGKILL fallback
タイムアウト保護(タイムアウト時に自動 SIGKILL)
Proxy quota support (
HTTP_PROXY/HTTPS_PROXYinjection)プロキシクォータサポート(
HTTP_PROXY/HTTPS_PROXYの注入)Zero build step — plain ESM JavaScript, Node.js >= 18
ビルド不要 —— プレーンな 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. クローン不要、MCP クライアントが初回使用時に自動ダウンロード:
"command": "npx", "args": ["-y", "qodercli-mcp"]Option B — from source (for development / 開発用):
git clone https://github.com/cantbeblank96/qodercli-mcp.git
cd qodercli-mcp
npm installMCP client configuration / MCP クライアント設定
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.
~/.qoder/mcp.json に追加します。node の絶対パスを使用し、QODERCLI_PATH を明示的に設定することを推奨します(MCP 子プロセスの PATH には nvm 管理のバイナリがしばしば含まれていません):
プロキシサポート:Qoder CLI プロキシクォータを使用するには、サーバーの環境変数に
HTTP_PROXYおよび/またはHTTPS_PROXYを追加します。これらの変数が MCP サーバーレベルで設定されると、すべての qodercli 子プロセスに渡されます。
{
"mcpServers": {
"qodercli-mcp": {
"command": "npx",
"args": ["-y", "qodercli-mcp"],
"env": {
"QODERCLI_PATH": "/absolute/path/to/qodercli",
"PATH": "/usr/local/bin:/usr/bin:/bin"
}
},
"qodercli-mcp-with-proxy": {
"command": "npx",
"args": ["-y", "qodercli-mcp"],
"env": {
"QODERCLI_PATH": "/absolute/path/to/qodercli",
"HTTP_PROXY": "http://127.0.0.1:39900",
"HTTPS_PROXY": "http://127.0.0.1:39900",
"PATH": "/usr/local/bin:/usr/bin:/bin"
}
}
}
}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).
ローカルソース(方式 B)を使用する開発者は、command/args を node の絶対パスと /path/to/qodercli-mcp/src/index.js に置き換えてください(MCP 子プロセスの PATH には nvm 管理のバイナリがしばしば含まれていません)。
Claude Code / Claude Desktop
{
"mcpServers": {
"qodercli-mcp": {
"command": "node",
"args": ["/absolute/path/to/qodercli-mcp/src/index.js"],
"env": {
"QODERCLI_PATH": "/absolute/path/to/qodercli"
}
}
}
}Tool: ask-qoder
Parameter | Type | Description |
| string (required) | The task or question for qodercli / qodercli に渡すタスクまたは質問 |
| string | Working directory / 作業ディレクトリ |
| string | Model for this session; call |
| string | Reasoning effort level ( |
| enum |
|
| enum | codex-style: |
| enum |
|
| string | Replace the default system prompt / デフォルトのシステムプロンプトを置き換える |
| string | Append instructions to the default system prompt / システムプロンプトを追加 |
| string | Resume a previous session / 以前のセッションを再開 |
| string | Passed to |
| string[] | Raw CLI args appended before the prompt; reserved flags (permission mode, system prompt, model, |
| number | Timeout in ms, default 600000 / タイムアウト(ミリ秒)、デフォルト 600000 |
Structured output / 構造化出力
ask-qoder declares an MCP outputSchema and returns, in addition to the human-readable text, a structuredContent object:
ask-qoder は MCP outputSchema を宣言し、人間が読めるテキストに加えて structuredContent オブジェクトを返します:
{
"session_id": "77826b5c-...", // pass back as resume_session_id / 回传用于续接
"content": "OK",
"is_error": false,
"exit_code": 0,
"duration_ms": 1280,
"total_credits": 0.53,
"num_turns": 1,
"timed_out": false,
"truncated": false
}Sandbox mapping / サンドボックスマッピング
sandbox | Effective permission mode / 実際の権限モード | Effect on qodercli / qodercli への効果 |
(omitted / 省略) |
| Read-only: permission-requiring tools are silently denied / 読み取り専用:権限が必要なツール呼び出しは静かに拒否される |
|
| Plus |
|
| Agent can create/modify files in |
|
| Full access including shell / 完全なアクセス(シェル含む) |
Explicit permission_mode or approval_policy always wins over sandbox.
明示的に設定された permission_mode / approval_policy は sandbox より優先されます。
Permission modes (verified semantics) / 権限モード(実測セマンティクス)
Mode | Behavior / 動作 |
| Read-only: silently denies every tool call that requires permission. Headless-safe default / 読み取り専用:権限が必要なすべてのツール呼び出しを静かに拒否。ヘッドレスセーフなデフォルト |
| Auto-approves file edits; shell still governed by policy / ファイル編集を自動承認 |
| Auto-approves everything including shell / すべてを自動承認(シェル含む) |
| qodercli's own automatic policy / qodercli の自動ポリシー |
| Interactive confirmation — not headless-friendly, avoid in MCP calls / 対話的な確認 — ヘッドレスに不向き、MCP 呼び出しでは避ける |
Tool: list-sessions
Lists local qodercli sessions (index, summary, session id) so a client can pick a resume_session_id. Takes no arguments.
ローカルの qodercli セッション(インデックス、サマリー、セッション ID)を一覧表示し、resume_session_id を選択しやすくします。引数なし。
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.
qodercli が現在サポートしているモデルを一覧表示し、実行時に有効な model 値を選択できるようにします(古い知識に依存しない)。テキストリストと構造化された models 配列を返します。引数なし。
Usage Examples / 使用例
Example 1: Simple code explanation / シンプルなコード説明
{ "name": "ask-qoder", "arguments": {
"prompt": "Explain what main.py does",
"cwd": "/path/to/project",
"timeout_ms": 180000
}}結果は自然言語の説明を返し、ファイルの機能を理解するのに役立ちます。
Example 2: Ask a second opinion / セカンドオピニオンを得る
{ "name": "ask-qoder", "arguments": {
"prompt": "@src/service.py Review this file for security issues and suggest improvements",
"model": "qwen-plus",
"permission_mode": "dont_ask",
"timeout_ms": 300000
}}Qoder はセキュリティアドバイスと改善案を提供します。
Example 3: Multi-turn conversation via resume / 再開によるマルチターン会話
// First call — session_id comes back in structuredContent
// 首次调用 —— session_id 会在 structuredContent 中返回
{ "name": "ask-qoder", "arguments": {
"prompt": "Help me refactor this module to improve readability",
"cwd": "/projects/backend",
"timeout_ms": 300000
}}
// Then reuse structuredContent.session_id:
// 然后把 structuredContent.session_id 回传:
{ "name": "ask-qoder", "arguments": {
"prompt": "Now add error handling for database timeouts",
"resume_session_id": "77826b5c-cd6b-4213-b423-d95b4e1deab0"
}}
// Or discover ids with list-sessions / 或用 list-sessions 查找历史会话 ID
{ "name": "list-sessions", "arguments": {} }resume_session_id を使用することで、マルチターンの対話型反復最適化が可能です。
Example 4: Code review with specific focus / 特定の焦点を当てたコードレビュー
{ "name": "ask-qoder", "arguments": {
"prompt": "Analyze performance bottlenecks in utils.py",
"model": "qwen-max",
"permission_mode": "default",
"output_format": "text",
"timeout_ms": 240000
}}パフォーマンス分析や最適化提案のシナリオに適しています。
Example 5: Read-only analysis / 読み取り専用分析
{ "name": "ask-qoder", "arguments": {
"prompt": "Audit this codebase for security issues; do not modify anything",
"cwd": "/workspaces/repo",
"sandbox": "read-only",
"timeout_ms": 300000
}}read-only はファイル書き込みとシェルツールを無効にし、監査/レビューシナリオに適しています。
Example 6: Project-wide analysis / プロジェクト全体分析
{ "name": "ask-qoder", "arguments": {
"prompt": "Summarize the architecture of this project and identify key modules",
"cwd": "/workspaces/repo",
"timeout_ms": 420000,
"model": "qwen-plus"
}}大規模プロジェクトの迅速な整理とアーキテクチャ理解に適しています。
Best Practices / ベストプラクティス
Specify working directory — Always pass
cwdwhen operating on a specific project 操作特定项目时务必指定cwdUse timeout protection — For complex prompts, set explicit
timeout_msshorter than 60min 複雑なタスクにはtimeout_ms(5~10 分推奨)を設定し、ハングアップを防ぐResume for multi-turn — Chain follow-ups via
resume_session_idinstead of repeating context 後続の質問はresume_session_idでセッションを継続し、コンテキストの重複を避けるModel selection — Call
list-modelsfirst to discover currently supported models; larger models are better for deep analysis 先にlist-modelsを呼び出して現在利用可能なモデルを確認する。深い分析には大規模モデルを推奨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) サーバーのデフォルトは読み取り専用(dont_ask)。個人デプロイではQODERCLI_DEFAULT_PERMISSION_MODE=bypass_permissionsを設定してフルアクセス(YOLO)をデフォルトにできる。呼び出しごと:ファイル作成・変更が必要なタスクはsandbox: "workspace-write"、シェルアクセスが必要な場合はdanger-full-accessを設定。sandboxと明示的なpermission_modeは併用不可(後者が優先)
Environment variables / 環境変数
Variable | Default | Description |
|
| Path to the qodercli binary / qodercli バイナリのパス |
|
| Default timeout / デフォルトのタイムアウト |
|
| Per-call stdout/stderr cap in MB (OOM protection) / 呼び出しごとの出力上限(MB、OOM 対策) |
|
| Default permission mode when the caller omits permission_mode/approval_policy/sandbox; set |
| - | HTTP proxy URL for qodercli / qodercli の HTTP プロキシ URL |
| - | HTTPS proxy URL for qodercli / qodercli の HTTPS プロキシ URL |
Development / 開発
npm test # smoke test: protocol handshake + tool invocation
node src/index.js # run the server manually (stdio)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.
本ツールは非公式のサードパーティ製であり、Qoder とは提携・承認・支援関係にありません。bypass_permissions 権限モードは注意して使用してください。委任されたプロンプトは対象の作業ディレクトリ内のファイルを変更する可能性があります。
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server exposing the Backtest360 engine API as tools for AI agents.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cantbeblank96/qodercli-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server