
Inquisitor
io.github.iamalisson由 GitHub 账号 iamalisson 发布v0.2.3更新于 Oct 24, 2026
Hypothesis-driven problem solving for AI agents: probe, falsify, escalate.
概览
本地 MCP 服务器,为编程智能体提供假设驱动的排查流程:网页搜索、项目分析、代码追踪、脚手架与可持久化的调查状态机。
- 可以做什么
- 通过 DuckDuckGo、Brave 或 SearXNG 后端进行网页搜索,并提取网页与 PDF 正文
- 分析项目的语言、框架、测试、依赖与 git 历史
- 追踪符号的定义、调用方与被调用方,并给出文件与行号
- 在基于 SQLite 的状态机中记录多阶段调查,跨轮次保留进度
- 校验深度调查的每个阶段是否都已记录并附有证据
- 在需求明确后生成最小化的新项目脚手架
- 适用场景
- 适合智能体面对陌生代码库或根因不明、跨多个文件的疑难缺陷时使用,让排查保留失败记录而不是盲目重试。也适合无需 API 密钥即可快速检索报错信息或库的最佳实践。
- 运行要求
- 以 stdio 在本地运行,需要 uv 与 Python 3.12 及以上,通过 uvx inquisitor-mcp 或本地检出启动。无需 API 密钥,DuckDuckGo 开箱可用。可选环境变量包括 BRAVE_API_KEY 或 SEARXNG_URL(其他搜索后端)、INQUISITOR_SESSION_DIR(状态存储),以及超时、排序与 PDF 提取相关变量。搜索与抓取网页需要网络访问。
安装
在 SourceWeft 中
- 打开 控制台中的 Inquisitor,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
inquisitor
Hypothesis-driven problem solving for AI agents Probe · Falsify · Escalate — never overcomplicate, never blind-retry
Overview
inquisitor makes AI agents solve problems the way a chess engine plays chess: it cannot explore every branch, so it estimates complexity first, prunes paths that add no information, and spends its search budget only where the problem actually is.
It ships as two coordinated layers:
- MCP server (
inquisitor-mcp) — the engine. Web search, project analysis, code tracing, project scaffolding, and a persistent investigation state machine. Works with any MCP-compatible agent: OpenCode, Claude Code, Claude Desktop, Cursor. - Agent skill (
skills/inquisitor/SKILL.md) — the behavioral layer. Injects the probe-and-gate loop, the pruning rules, and the full methodology into the agent's reasoning.
The method is not invented here — it is assembled from primary sources: Newton's Analysis→Synthesis skeleton, hardened with the scientific method's own defenses against wrong assumptions (falsification, strong inference, competing-hypotheses analysis, anti-fixation reframes, pre-mortems) and constrained by engineering discipline (NASA/JPL's Power of Ten, surgical-change guidelines, the minimalism ladder). Every source is cited in Foundations.
Web search, codebase scans, and code tracing are tools invoked when local evidence is insufficient — never mandatory rituals.
How it decides
Depth is an output, not a label. An LLM's up-front difficulty guess is its least reliable signal — poorly calibrated, and biased to under-rate exactly the hard problems that matter. So inquisitor never classifies a problem before understanding it: it runs a cheap probe (the single cheapest action that could confirm or kill the best current hypothesis), and the probe's result — never the prediction — sets the depth:
Escalation is enforced, not just allowed. The probe is only a starting point: objective gate triggers (touching infra/deploy/routing/config, auth/security, data migrations, multi-file fixes, prod-only symptoms) force a minimum depth regardless of how "clear" the problem feels, and a 3-question confidence check (read the runtime path? can name the runtime signal? verified the platform assumption?) bumps the depth up per unanswered question. Downgrades need cited evidence, never a feeling. Inflated ceremony is not allowed either — a 7-phase investigation of a typo is as wrong as a blind guess at a race condition.
Retry is never blind. "Loop until it passes" agents (the Ralph-loop pattern) have persistence but no memory: on failure they revert, flush, and re-roll — the same wrong idea, retried with fresh confidence. Inquisitor keeps a failure ledger instead: every dead hypothesis is recorded with the evidence that killed it, every retry must name what is different and why that changes the outcome, and two dead hypotheses from the same family force a reframe — re-audit an assumption, invert the question, widen the system boundary — never a third attempt at the same idea. Persistence with memory, creativity on evidence.
Foundations
Each rule in the method traces to a primary source. The left column is the citation; the right column is the exact mechanism inquisitor takes from it.
The scientific method
Engineering discipline
Installation
Requires uv and Python 3.12+.
Claude Code — plugin install (recommended)
inquisitor ships as a Claude Code plugin that installs both the skill and the MCP server — no cloning, no editing absolute paths, no manual symlink.
From within Claude Code, first add the marketplace:
Then install the plugin:
That's it. The plugin bundles the inquisitor-mcp server (registered automatically via ${CLAUDE_PLUGIN_ROOT}) and the inquisitor skill. uv syncs the server's dependencies on first launch. Update later with /plugin marketplace update inquisitor.
Prefer to point at a local checkout instead of GitHub?
/plugin marketplace add /path/to/inquisitorworks too.
For OpenCode and Claude Desktop (which don't use Claude Code plugins), or for a manual Claude Code setup, use the steps below.
Step 1 — Get the server
Option A — no clone (recommended). Once published to PyPI, uvx fetches and runs it on demand — no clone, no absolute paths:
You'll reference uvx inquisitor-mcp directly in the config below.
Option B — from a checkout (for local development, or before the PyPI release):
The clone path is up to you — just use the same absolute path in the config below.
~does not expand inside JSON config files, so write the full path (e.g./home/you/tools/inquisitor).
You do not run the server manually. It's a stdio MCP server: your agent spawns and manages it automatically. (If you run it by hand it prints a ready message on stderr and waits silently — that's normal.)
Step 2 — Register the MCP server with your agent
OpenCode — add to ~/.config/opencode/opencode.json (global) or ./opencode.json (per-project):
Claude Code — add to .mcp.json in your project, or ~/.claude.json for all projects:
Claude Desktop — same mcpServers block in claude_desktop_config.json (Settings → Developer → Edit Config).
Using a checkout instead of
uvx? Swap the command foruvwith args["run", "--directory", "/home/you/tools/inquisitor", "inquisitor-mcp"].
Step 3 — Install the skill (the behavioral layer)
Symlink it so it stays up to date with the repo:
(Copying the folder works too — you'll just need to re-copy after updates.)
Or, no clone — install just the skill across agents with the skills CLI:
(This installs the skill only. For the inquisitor_* tools you still need the MCP server from Steps 1-2 — or use the Claude Code plugin above, which bundles both.)
Step 4 — Restart your agent
Config is loaded at startup. Quit and reopen OpenCode / Claude Code, then verify:
the inquisitor_* tools appear in the tool list, and the inquisitor skill is available.
Tools
Example: inquisitor_search
Example: phase tracking (Deep path)
Project Structure
The backend/ package is importable standalone — no MCP required:
Environment Variables
No API key is required — DuckDuckGo works out of the box.
PDF extraction
Search results and fetched URLs that are PDFs (RFCs, specs, papers, datasheets) are extracted, not skipped. The default policy is auto, which uses pypdf (pure-Python, fast, no models, handles text PDFs) unless docling is installed and a GPU is present.
For complex tables or scanned/OCR PDFs, install the optional docling backend:
docling is heavy (pulls in torch + ML models) and slow on CPU, so auto only uses it when it's installed and a GPU is present; otherwise it falls back to pypdf. Force it with INQUISITOR_PDF_BACKEND=docling (works on CPU, just slower), or pin pypdf with INQUISITOR_PDF_BACKEND=pypdf. Any docling failure falls back to pypdf, so a PDF read never hard-fails.
Security
- SSRF guard: content fetching refuses non-http(s) schemes and loopback / private / link-local / metadata targets (
localhost,127.0.0.1,10.x,192.168.x,169.254.169.254, …). - Path traversal guard: session names are sanitized before touching the filesystem.
- No shell execution: subprocess calls use argument lists, never
shell=True. - Parameterized SQL throughout the session store.
- The server runs locally over stdio with your user's privileges — it does not listen on the network.
Companion skills
inquisitor is a router as much as an investigator — it delegates to purpose-built skills (/tdd, /code-review, …) when one fits, but it never installs them for you. See docs/companion-skills.md for the curated set worth installing alongside it (mattpocock/skills, spec-kit, last30days, ponytail, gstack) and design references.
Development
Tech
- uv — package manager
- FastMCP — MCP server framework
- ddgs / httpx — search + HTTP
- trafilatura + readability-lxml — content extraction (two-tier fallback)
- SQLite — investigation state
- pytest / ruff — tests and lint
Acknowledgments
Research sources are cited in Foundations. The implementation additionally builds on:
- andrej-karpathy-skills (forrestchang) — behavioral guidelines derived from Andrej Karpathy's observations on LLM coding pitfalls.
- ponytail (Dietrich Gebert) — the decision ladder and the lazy-senior-dev discipline.
- last30days-skill (mvanhorn) — inspiration for multi-source research design and the SKILL.md-as-contract pattern.
Licensed under MIT.
来源:README.md,提交 38bd43b
工具
0版本历史
1- v0.2.3最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分