qwispr
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., "@qwisprAnalyze the call graph of src/cli.ts and suggest refactorings"
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.
qwispr — Hybrid Quantum/Classical Code Intelligence
Routes software engineering problems to quantum algorithms (QAOA, VQE, Grover, QWalk, QSVM) on PennyLane simulators with deterministic classical fallback.
qwispr is a CLI + MCP server that treats SE problems as optimization/quantum problems: dependency conflicts → QAOA, test generation → VQE, code search → Grover amplification, call-graph analysis → QWalk, refactoring → QWalk+QSVM. Runs locally on default.qubit/lightning.qubit — no cloud credentials required.
Table of Contents
Related MCP server: code-graph-mcp
Quickstart
# Install
npm i -g qwispr
# 1. Analyze a file (call-graph + QWalk metrics)
qwispr analyze --file src/cli.ts --entry main
# 2. Search with Grover amplification
qwispr search --pattern "eval|dangerous" --files "src/**/*.ts" --top 10
# 3. Resolve dependency conflict (QUBO → QAOA)
echo '{"Q":[[1,-2],[-2,1]]}' > qubo.json
qwispr run --task resolve --qubo qubo.json --vars 2
# 4. Generate test inputs that hit branches (VQE)
qwispr testgen --file src/utils.ts --function parseJson --layers 2
# 5. Get refactoring suggestions (QWalk+QSVM)
qwispr refactor --file src/cli.ts --top 5
# 6. Run MCP server (for VS Code / Claude / etc.)
qwispr mcp --stdioInstallation
Method | Command |
npm (global) |
|
npx (no install) |
|
Docker |
|
From source |
|
Requirements:
Node.js ≥ 20
Python ≥ 3.11 + PennyLane (auto-installed via pip on first quantum run)
Fallback:
QWISPR_DEVICE=default.qubitruns pure Python (no C++ deps)
Commands
Command | Alias | Description |
|
| Call-graph + QWalk metrics (reachability, centrality, diameter, hotSpots; diameter |
|
| Grover-ranked regex search over glob |
| — | VQE ground-state for QUBO |
| — | VQE boundary test inputs for a function |
| — | QWalk+QML refactoring candidates |
|
| Hybrid router (classical vs quantum) |
|
| List backends + current device |
| — | stdio JSON-RPC server (5 tools) |
Global options:
--backend simulator|lightning (also QWISPR_BACKEND env)
--help, -h show helpProblem → Algorithm Map
SE Problem | Quantum Algorithm | Skill | How it Works |
Dependency resolution (lockfile conflicts) | QAOA |
| QUBO → Ising Hamiltonian → |
Code search (AST/regex patterns) | Grover |
| Analytic Grover iteration ( |
Test generation (branch coverage) | VQE |
| Branch-distance QUBO → hardware-efficient ansatz |
Call-graph analysis (reachability, centrality) | QWalk |
| BFS + BTree + Floyd (classical fallback; quantum coin+shift for n≤8) |
Refactoring suggestions (god functions) | QWalk + QSVM |
| Centrality × (1 − cohesion) via simulated RBF kernel |
Fragment classification (buggy/clean) | QSVM |
| Token/AST/n-gram → RY angles → RBF ` |
MCP Server
qwispr exposes 5 tools via stdio JSON-RPC (MCP protocol):
# Start server
qwispr mcp --stdio
# List tools
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | qwispr mcp --stdio
# Call analyze
echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"analyze","arguments":{"file":"src/cli.ts"}}}' | qwispr mcp --stdioTool | Description |
| Call-graph + QWalk metrics |
| Grover-ranked regex search |
| VQE boundary test generation |
| QWalk+QML refactoring candidates |
| List backends + current device |
Register with OpenAxe:
openaxe mcp add qwispr --cwd . -- node dist/cli.js mcp --stdio
openaxe mcp list # shows qwispr ✓ connectedVS Code Extension
cd extensions/vscode
npm ci && npm run build # produces dist/extension.js
vsce package # creates qwispr-vscode-0.1.0.vsix
code --install-extension qwispr-vscode-0.1.0.vsixCommands:
qwispr.analyze— call-graph + QWalk webview (hotSpots table)qwispr.search— quickpick Grover-ranked resultsqwispr.testgen— JSON input → boundary test cases
Benchmarks
# Synthetic QUBOs (n=3..8, LCG-generated)
BENCH_N=5 npm run benchmark
# Real lockfile conflicts (react/webpack/eslint/typescript)
BENCH_N=5 npm run benchmark:real
# Generate comparison report
npm run benchmark:report # → report/index.md + report/data.jsonResults (BENCH_N=2, deterministic seed):
Suite | Cases | Success Rate | Avg Time | p95 |
synthetic | 2 | 100% | ~4s | ~4.5s |
real | 2 | 100% | ~4s | ~4.5s |
Speedup: lightning.qubit ~2-3× faster than default.qubit (benchmarks/BENCH_DEVICE_LIGHTNING.md).
QWISPR_BACKEND=lightning BENCH_N=5 npm run benchmarkEnvironment Variables
Variable | Default | Description |
|
|
|
| — | Direct PennyLane device string (e.g., |
|
| Shots for QPU (clamp 1..10000) |
|
| VQE/QAOA ansatz layers (honored by python workers/benchmark only; CLI |
|
| Optimizer iterations (honored by python workers/benchmark only; CLI |
|
| Set |
|
| Custom telemetry path |
|
| Reserved/unused (no runtime effect; no reader in code) |
|
| Set |
|
| Bypass workspace-root jail (search globs + analyze/refactor/testgen |
| — | IBM Quantum token, reported in |
Architecture
┌─────────────────────────────────────────────────────────────┐
│ SOURCE / LOCKFILE / QUBO │
└─────────────────────────────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ code-graph │ │problem-encoder│ │ (direct QUBO)│
│ (regex AST) │ │(branch-dist) │ │ │
└───────┬───────┘ └───────┬───────┘ └───────┬───────┘
│ │ │
└───────────────────┼───────────────────┘
▼
┌───────────────────────────┐
│ ORCHESTRATOR │
│ nVars ≤ threshold? │
│ classical : quantum │
└───────────┬───────────────┘
│
┌───────────────┴───────────────┐
▼ ▼
┌─────────────┐ ┌─────────────┐
│ CLASSICAL │ │ QUANTUM │
│ (brute n≤4)│ │ PennyLane │
└──────┬──────┘ │ • QAOA │
│ │ • VQE │
│ │ • Grover │
│ │ • QWalk │
│ │ • QSVM │
└───────────────┬────────┘
▼
┌───────────────────────────┐
│ BITSTRING + ENERGY │
└───────────┬───────────────┘
▼
┌───────────────────────────┐
│ DECODER │
│ patch / inputs / hits │
└───────────────────────────┘Hybrid routing threshold adapts via telemetry (QWISPR_TELEMETRY=1):
Quantum 2× slower with no gain → threshold++
Quantum success rate > classical + 0.1 → threshold--
Clamped to [2, 8]
Ponytail Minimalism
This project follows ponytail full — minimal, stdlib-first, no unnecessary abstractions.
Shortcut | Ceiling | Upgrade Path |
Manual JSON-RPC | no SDK |
|
Regex call-graph | no tree-sitter | native parser when lands |
BFS ≈ QWalk | classical fallback | true quantum walk n≤8 |
Heuristic ReDoS guard | nested quantifier only |
|
Adaptive threshold | heuristic 2×/rate | ML when >10k events/day |
Every // ponytail: comment marks a deliberate ceiling with upgrade path.
Stats:
0 runtime dependencies (
dependencies: {})~250 lines removed via audit
7 dev deps removed (
chalk,ora,fast-json-patch,tree-sitter*,semver,yaml)16/16 tests pass, 0 vulnerabilities
Contributing
# 1. Fork & clone
git clone https://github.com/yourfork/qwispr
cd qwispr
# 2. Install deps
npm ci
# 3. Run checks
npm run lint # eslint
npm run typecheck # tsc --noEmit
npm test # vitest 16/16
# 4. Benchmarks (optional)
npm run benchmark
npm run benchmark:real
# 5. Commit (conventional commits)
git commit -m "feat: add new quantum algorithm"
# 6. PR → CI runs lint + typecheck + test + benchmark:smokeCode style: Strict TypeScript, no any, no ts-ignore, minimal deps, ponytail ceiling comments.
License
MIT — see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
Lean 4 MCP server: compile, prove theorems, and formalize math with Mathlib.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceExposes Language Server Protocol (LSP) tools such as diagnostics, goto definition, find references, symbols, and rename as a stdio MCP server.7MIT
- AlicenseAqualityDmaintenanceMCP server for comprehensive code analysis, navigation, and quality assessment across 25+ programming languages.988MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to perform local code search, indexing, and analysis across Java, JavaScript/TypeScript, .NET/C#, and Python projects through the MCP protocol.1Apache 2.0
- FlicenseAqualityDmaintenanceBridges MCP and LSP to enable semantic code analysis, including go-to-definition, find references, hover info, and function call relationship checks.4-