inquisitor

inquisitor

Enables AI agents to efficiently solve problems by estimating complexity, pruning unnecessary paths, and focusing search through web search, code analysis, and persistent investigation tracking.

Category
访问服务器

README

<div align="center">

inquisitor

Optimal-path problem solving for AI agents Triage · Prune · Investigate — never overcomplicate

Python MCP uv Tests License

</div>


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 triage heuristic, the pruning rules, and the full methodology into the agent's reasoning.

The methodology synthesizes four sources:

Source Contribution
Newton's Opticks (1704) Analysis→Synthesis method: define, decompose, experiment, reconstruct, and end with open Queries — hypotheses non fingo
NASA/JPL Power of Ten 10 hard rules, few enough to remember, strict enough to check mechanically
Karpathy's LLM coding guidelines Think before coding · simplicity first · surgical changes · goal-driven execution
Ponytail decision ladder YAGNI → reuse → stdlib → native → installed dep → one line → minimum code

Web search, codebase scans, and code tracing are tools invoked when local evidence is insufficient — never mandatory rituals.


How it decides

Every problem goes through 10-second triage before anything else:

                        ┌─────────────┐
                        │   TRIAGE    │  heuristic complexity estimate
                        └──────┬──────┘
          ┌────────────────────┼────────────────────┐
          ▼                    ▼                    ▼
     ┌─────────┐          ┌─────────┐          ┌─────────┐
     │ TRIVIAL │          │ SIMPLE  │          │ COMPLEX │
     └────┬────┘          └────┬────┘          └────┬────┘
          │                    │                    │
     fix → verify      criteria → minimal      full Newton 7-phase
     (no ceremony)     evidence → fix →        DEFINE → AXIOMS →
                       verify                  ANALYSIS → EXPERIMENT →
                                               SYNTHESIS → VALIDATE →
                                               QUERY (with session
                                               tracking as memory)

Escalation is allowed — two failed fix attempts or contradicting evidence bumps the class up. Inflated ceremony is not — a 7-phase investigation of a typo is as wrong as a blind guess at a race condition.


Installation

Requires uv and Python 3.12+.

Step 1 — Clone and install

git clone https://github.com/0x2fycy3/inquisitor.git ~/tools/inquisitor
cd ~/tools/inquisitor
uv sync

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 do run uv run inquisitor-mcp by hand, it prints a ready message on stderr and waits silently — that's normal. Ctrl+C to exit.)

Step 2 — Register the MCP server with your agent

OpenCode — add to ~/.config/opencode/opencode.json (global) or ./opencode.json (per-project):

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "inquisitor": {
      "type": "local",
      "command": [
        "uv", "run",
        "--directory", "/home/you/tools/inquisitor",
        "inquisitor-mcp"
      ],
      "enabled": true
    }
  }
}

Claude Code — add to .mcp.json in your project, or ~/.claude.json for all projects:

{
  "mcpServers": {
    "inquisitor": {
      "command": "uv",
      "args": ["run", "--directory", "/home/you/tools/inquisitor", "inquisitor-mcp"]
    }
  }
}

Claude Desktop — same mcpServers block in claude_desktop_config.json (Settings → Developer → Edit Config).

Step 3 — Install the skill (the behavioral layer)

Symlink it so it stays up to date with the repo:

# OpenCode
mkdir -p ~/.config/opencode/skills
ln -s /home/you/tools/inquisitor/skills/inquisitor ~/.config/opencode/skills/inquisitor

# Claude Code
mkdir -p ~/.claude/skills
ln -s /home/you/tools/inquisitor/skills/inquisitor ~/.claude/skills/inquisitor

(Copying the folder works too — you'll just need to re-copy after updates.)

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

Tool Purpose When
inquisitor_search Multi-backend web search (DuckDuckGo free/keyless, Brave, SearXNG) with content extraction Local evidence insufficient: unknown errors, unfamiliar libraries, current best practices
inquisitor_analyze Project overview: languages, frameworks, tests, deps, git history Entering an unfamiliar codebase
inquisitor_trace Symbol tracing: definition, callers, callees with file:line refs Bug spans multiple functions/files
inquisitor_phase_get / _set Newton 7-phase state machine, SQLite-backed per project COMPLEX investigations — persistent memory across turns
inquisitor_verify Validates findings: evidence cited? phases complete? contradictions? Before declaring a COMPLEX investigation done
inquisitor_scaffold Minimal project scaffolding with researched best practices New project setup, after requirements are clarified

Example: inquisitor_search

inquisitor_search(
    query="httpx ConnectTimeout retry pattern",
    max_results=8,
    time_range="year",              # day | week | month | year
    include_domains=["github.com"], # optional site: filter
    fetch_content=True,             # full page text, not just snippets
)

Example: phase tracking (COMPLEX path)

inquisitor_phase_set(
    target_phase="experiment",
    findings="500 only occurs when session token > 4KB",
    evidence="repro script output; nginx.conf:34 large_client_header_buffers",
    open_questions="why did token size grow after v2.3 deploy?",
)

Project Structure

inquisitor/
├── src/inquisitor/
│   ├── server.py                # MCP entry point (FastMCP, 6 tools)
│   ├── config.py                # env configuration
│   ├── tools/                   # thin MCP adapters
│   │   └── search / analyze / trace / scaffold / phase / verify
│   └── backend/                 # pure Python, zero MCP dependency
│       ├── search.py            # DDG / Brave / SearXNG + re-ranking
│       ├── extract.py           # trafilatura → readability fallback, SSRF guard
│       ├── analyzer.py          # project structure scan
│       ├── tracer.py            # callers / callees mapping
│       └── phase_tracker.py     # Newton state machine (SQLite)
├── skills/inquisitor/SKILL.md   # behavioral layer for the agent
├── tests/                       # 36 tests
└── docs/superpowers/specs/      # design spec

The backend/ package is importable standalone — no MCP required:

from inquisitor.backend.search import search
results = search("python asyncio best practices", max_results=5)

Environment Variables

Variable Required Default Description
INQUISITOR_SESSION_DIR no ~/.inquisitor/sessions/ Investigation state storage
BRAVE_API_KEY no Brave Search backend (2k free/month)
SEARXNG_URL no Self-hosted SearXNG instance
INQUISITOR_DEFAULT_ENGINE no ddg ddg | brave | searxng
INQUISITOR_SEARCH_TIMEOUT no 15 HTTP timeout (seconds)
INQUISITOR_MAX_CONTENT_LENGTH no 40000 Max chars per fetched page
INQUISITOR_PREFERRED_DOMAINS no Comma-separated domains to boost in ranking

No API key is required — DuckDuckGo works out of the box.


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.

Development

uv sync                  # install deps
uv run pytest tests/ -v  # run tests
uv run ruff check .      # lint

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

The methodology and architecture stand on these shoulders:

Licensed under MIT.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选