
Self Inspect Mcp
io.github.ejentum由 GitHub 帳號 ejentum 發布v0.1.1更新於 Oct 24, 2026
Send a thought, get one metathought that makes your agent inspect its own assumptions. Keyless.
概覽
一個免金鑰的遠端或本機 MCP 伺服器,接收一段想法或任務描述,回傳一個簡短的後設思考問題,促使代理重新檢視自己的假設。
- 可以做什麼
- 送出一個想法或任務描述,取得一個針對代理假設的後設思考問題,例如什麼是固定的、缺少什麼、何時結論不成立。結果具確定性:相同輸入總是回傳相同問題,並附上標示認知視角的標籤。當輸入未對應任何視角時,回傳一個通用的自我檢視問題。可透過本機 stdio 套件離線執行同一套選擇邏輯,而不使用託管端點。
- 適用情境
- 適合作為有節制的檢查點:代理即將確定某個假設、計畫或最終答案時,在長步驟鏈中出現偏離時,或察覺自己在附和、過度自信時。README 指出每步都呼叫會產生負面效果,因此它適合偶爾的刻意反思,而不是包住全部推理流程。
- 執行需求
- 可使用託管的 Streamable HTTP 端點,無需金鑰或帳號;或使用 npm 套件 self-inspect-mcp 透過 stdio 在本機執行,需要 Node.js。本機套件預設呼叫託管端點,設定 SELF_INSPECT_LOCAL=1 可離線執行選擇邏輯。託管方式需要網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Self Inspect Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/io.github.ejentum%2Fself-inspect-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。
{
"mcpServers": {
"self-inspect": {
"type": "http",
"url": "https://api.ejentum.com/self-inspect-mcp"
}
}
}README
Self-Inspect
A question your agent would not think to ask itself.
An agent sends a thought, or a description of the task it is working on. It gets back one metathought: a short, abstract question that turns the agent's attention back onto its own task and assumptions before it continues. Not advice, not an answer. A question.
Keyless, free, deterministic. No LLM, no embeddings, no semantic similarity. Selection is a small heuristic over an open CSV you can read in five minutes, and the code that answers api.ejentum.com/self-inspect is the code in this repo. A test proves the two cannot drift.
Why an agent needs this
Agents move forward. That is the whole problem. Left to itself, an agent:
- commits to its first interpretation and never reopens it,
- piles up assumptions it never names,
- drifts from the original goal over a long chain of steps,
- stops at the first answer that looks plausible,
- grows more confident without growing more evidence,
- agrees with the user because agreeing is the easy path.
None of these are knowledge failures. The model already knows better. They are attention failures: the agent never stops to ask the one question that would have caught it.
And it cannot reliably ask that question itself. Whatever picks what to reflect on is the same process that is already committed, so an agent that "double-checks" tends to re-run its own bias and call it confidence. Acknowledging a trap is not escaping it.
Self-Inspect is the external question. It returns a metathought the agent would not have produced on its own: What is assumed? What is fixed? What does not follow? What is missing? When would this not hold? What confidence is warranted? The agent still does the thinking. The tool just makes it look.
When to call it
Put it in the loop at the moments an agent would otherwise barrel through:
- after forming a hypothesis, before acting on it,
- before committing to a plan or a final answer,
- at each step of a long chain, to catch drift,
- when the agent notices it is agreeing, or feeling certain.
Send a thought, get a metathought, answer it to yourself, continue with more awareness. It always returns a question (there is no "no result" case), one call, no model in the loop, no key.
How to use the metathought (the recipe)
Self-inspect hands back the one question that names the assumption your claim is quietly resting on. Answer it with a concrete counterexample and rebuild the claim around what breaks; do not just acknowledge the question and move on. Call it only at a genuine wall you cannot get past on your own, never on a schedule: forcing it every step manufactures fake corrections that read worse than using nothing. (This recipe is what separated the strongest runs from the weakest in our own evaluation.)
What the evaluation found
From a multi-run benchmark (a small model and a frontier model, 40-turn open-ended reasoning, blind order-swapped judging):
- Reliable and auditable. The metathought is returned deterministically; every call re-runs byte-identical, so what the agent checked is a verifiable, model-independent record. Its strongest, most defensible property.
- It was the only thing that made an agent question its own assumptions. A no-tool control built confident theory and never once asked whether it was confabulating; with self-inspect, the agent surfaced and named load-bearing assumptions it could not see on its own, and at a genuine wall the question redirected the investigation into new ground instead of confirming where it was already heading.
- The uplift is conditional, not automatic. It appears only when the question is answered with a real counterexample and the claim is rebuilt, and only when the call lands at a genuine wall on a model capable of judging it is stuck. Fired every step it is net-negative: it manufactures staged corrections (overclaim, then a scheduled walk-back) that judge worse than using no tool.
- Use it as a gated checkpoint, not a wrapper. It makes reasoning legible and checkable at the moments that matter; it does not make a weak reasoner strong.
Quickstart
Send a thought, get a metathought. No key.
REST (any language):
MCP, Claude Code:
MCP, Claude Desktop / Cursor / any HTTP-MCP client:
The MCP server exposes one tool, self_inspect, that takes a thought and returns the metathought. No install, no key.
Python (single file, zero dependencies):
For Python environments, dist/self_inspect.py is the whole engine in one file — the CSV is inlined, stdlib only, nothing to install. It runs the exact published selector locally (~2 ms per call, no network):
A cross-language parity test (test/parity.python.test.mjs) holds it byte-identical to the JS engine — same thought, same metathought, in Python, JS, or against the hosted endpoint.
Endpoints
Both hosted endpoints are keyless and protected by per-IP rate limiting plus standard security headers (HSTS, nosniff, frame-deny).
How selection works
select(thought, rows) (src/selector.js) routes in two levels, deterministically, over the data in selfinspect.csv:
- Normalize the thought: lowercase, Unicode NFKC, non-alphanumerics to spaces, collapse whitespace, tokenize (
src/normalize.js). - Score each lens (
input_type):3 x (type-name tokens present in the thought) + 1 x (distinct content tokens from that lens's questions present). Content tokens are themeta_thoughtwords minus a small visible stopword list. Evidence aggregates across all of a lens's questions, so a lens can win on signal spread across several of its rows. - Pick the highest-scoring lens; ties prefer
strictoverbooster, then lexicographic lens name. - Within the chosen lens, return the question with the most local content matches; tiebreak by lowest
operator_rank(the canonical question).matched: true. - If no lens has any signal, return a universal self-inspection question (about task and assumptions) chosen deterministically from a small default set by a stable hash of the input, so different inputs get different nudges.
matched: false.
Self-Inspect always returns a metathought. There is always a worthwhile question an agent can ask about its own task and assumptions, so the tool never returns null. The matched flag distinguishes a routed lens (true) from a universal default (false); the metathought is never empty. Deterministic: the same input always returns the same metathought. (To make more inputs route to a specific lens, add wording to the CSV, or a future triggers column, never a model.)
The CSV is the source of truth
selfinspect.csv (~50 lenses, 137 questions):
The returned id is input_type-operator_rank (e.g. confidence-4). To add or change a metathought, edit the CSV. Do not edit dist/backend.cjs or the deployed copy by hand.
Published == deployed (enforced, not promised)
npm run build regenerates dist/backend.cjs (the engine behind the hosted endpoint) and dist/self_inspect.py (the single-file Python port) from selfinspect.csv + src/normalize.js + src/selector.js (build/generate.mjs).
test/drift.test.mjs fails if either committed artifact is not byte-identical to the generator output, and test/parity.python.test.mjs fails if the Python port's results diverge from the JS selector on the full corpus. So an engine that drifts from the CSV/selector, in either language, cannot pass CI: the full suite runs on every push and pull request (.github/workflows/ci.yml), on a runner with Python installed so the parity test actually executes. Anyone can clone this repo, run the fixtures locally and against the live endpoint, and confirm identical selection.
Verify
Evaluation
What does the metathought actually change? In a 30-turn software-design conversation, agents that called Self-Inspect once per turn surfaced ~3.5x more decision-forks (assumptions, edge cases, preconditions) than the identical agent with no tool: same model (Claude Sonnet 4.6), same conversation, same prompt.
And the question is aimed, not generic: the routing tracked the moment. When would this not hold? arrived as the agent was making a boundary call; What is assumed? arrived as it was about to persist state, and it answered "I've been assuming persistence lives outside the module" — surfacing an assumption it had never stated.
The full data, the verbatim metathoughts, and a one-command reproduction (node evals/tools/analyze.mjs) are in evals/.
Response contract
REST returns an array of one object with exactly two fields: label (the lens, from input_type) and metathought (the question). Unroutable input still returns a universal default (a different lens, same shape):
The MCP surfaces (self_inspect) return the metathought text only.
Deploying the engine (operator)
The hosted side runs dist/backend.cjs (the CommonJS build of the same CSV + selector) inside an Express route, mounted keyless and isolated from any auth/tier. dist/backend.cjs is regenerated by npm run build and is drift-tested against the source. To update: edit selfinspect.csv, run npm run build, redeploy the build. Never edit the deployed copy by hand.
MCP
mcp/ is a standalone MCP server (self-inspect-mcp) exposing one tool, self_inspect. By default it calls the hosted endpoint; set SELF_INSPECT_LOCAL=1 to run this exact selector offline against a vendored copy of the CSV. See mcp/README.md.
Troubleshooting
CRYPT_E_NO_REVOCATION_CHECK or a TLS revocation error on connect. The certificate is valid (Let's Encrypt, full chain, verify ok). TLS uses Let's Encrypt, which is CRL-based now: OCSP was retired by the CA in 2026, so there is no OCSP responder to query. Strict clients that hard-fail revocation when OCSP is unavailable (some Windows/schannel setups) can report this even though the cert is fine. Most clients (Node, Python TLS) soft-fail and connect normally. If yours hard-fails, set revocation checking to soft-fail; the certificate is valid.
License
MIT.
來源:README.md,提交 75558ec
工具
0版本歷史
1- v0.1.1最新Sep 16, 2026
評分
已滿足適用檢查項的 85%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具必需15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分