qwen-local-mcp
Delegates bounded coding tasks to a local Qwen model running through Ollama, allowing the model to inspect and edit files in a repository, run allowlisted test/lint/build commands, and return a structured report with tool calls and exit codes.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
qwen-local-mcp
An MCP server that lets Codex, Claude Code, or any MCP client delegate a bounded coding task to a local Qwen model running in Ollama.
The big model plans; the small local model does the grunt work (read, search, edit, run tests) inside one repository, with hard guardrails:
Edits are confined to a workspace under a configured repositories root.
No deletes, renames, commits, pushes, package installs, or network access.
Refuses to edit on
main/master; use a feature branch or worktree.Only allowlisted commands run (pytest, unittest, ruff, mypy, npm/pnpm/yarn test/lint/build/typecheck, dotnet test/build, cargo, go, cmake/ctest, and read-only
git status/git diff). No shell is ever spawned.Secret files (
.env, keys,credentials.json, ...) and dependency/build directories are invisible to the model.Tool results are clipped so a 32k context never silently loses the system prompt.
Stops early when the model repeats a rejected call, and keeps a wall-clock budget under Codex's tool timeout so you always get a report back.
Requirements
Windows, macOS, or Linux with Python 3.11+
Ollama running locally with the model pulled:
ollama pull qwen3.5:9bRelated MCP server: qodercli-mcp
Install
git clone https://github.com/d1dac0/qwen-local-mcp.git
cd qwen-local-mcp
python -m venv .venv
.venv/Scripts/pip install -r requirements.txt # Windows
# .venv/bin/pip install -r requirements.txt # macOS / LinuxClaude Code
claude mcp add --scope user --transport stdio qwen-local -- "<path>/.venv/Scripts/python.exe" "<path>/server.py"Codex
Add to ~/.codex/config.toml:
[mcp_servers.qwen_local]
command = "<path>/.venv/Scripts/python.exe"
args = ["<path>/server.py"]
cwd = "<path>"
enabled = true
enabled_tools = ["qwen_delegate"]
startup_timeout_sec = 120
tool_timeout_sec = 900Usage
The server exposes one tool, qwen_delegate(task, workspace):
workspace: absolute path of the repository (or a subfolder) to work in. Must be under the repositories root.task: a self-contained instruction naming the files and the acceptance check, e.g. "test_calc.py fails. Fix the bug in calc.py sopython -m pytest -qpasses, then run it and report the exit code."
The result is a report with the model's summary, every tool call, and the exact commands and exit codes it ran.
Configuration
All optional, via environment variables:
Variable | Default | Purpose |
|
| Every workspace must live under this root |
|
| Ollama model tag |
|
| Ollama |
|
| Max agent turns per task |
|
| Wall-clock budget per task |
|
| Ollama base URL |
Python tooling (python, pytest, ruff, mypy) is resolved from the
workspace's own .venv/venv when present, so tests see the project's dependencies.
Tools the model gets
Tool | Notes |
| Skips VCS, dependency, cache, and build-output dirs |
| Paged with |
| Case-insensitive literal search, |
| One exact, unique replacement; preserves CRLF/LF |
| Never overwrites |
| Allowlisted executables, argument paths checked, no shell |
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
A full backend your AI coding agent can set up over MCP
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that lets Claude Code delegate coding tasks such as code generation, review, refactoring, and test writing to a local Ollama instance running a Qwen3 model.9MIT
- AlicenseAqualityBmaintenanceWraps the local Qoder CLI into an MCP server, enabling any MCP client to delegate coding tasks to a local Qoder agent with session management, sandboxed permissions, and model selection.358 npmMIT
- AlicenseAqualityBmaintenanceThis server lets MCP clients delegate coding tasks to a locally installed Qwen Code CLI, enabling second opinions, parallel work, and clean separation from the main context.635 npmMIT
- FlicenseBqualityBmaintenanceEnables Codex to delegate coding tasks to a locally hosted Qwen model through an MCP tool, which can read, write, patch, test, and inspect git diffs inside an allowed workspace.11-