
honesty-mcp
io.github.lkopietz3-byte由 GitHub 帳號 lkopietz3-byte 發布v0.3.0更新於 Oct 24, 2026
MCP server exposing 11 honesty-SDK kits (grounding, trust, audit, corroboration) as agent tools.
概覽
一個本機 MCP 伺服器,把十一個 honesty-SDK TypeScript 套件暴露為工具,用來檢查引用、證據、信任、來源聲明、稽核鏈與決策紀錄。
- 可以做什麼
- 逐句檢查 AI 生成文字及其引用來源的接地情況與佐證情況,依獨立來源計數,只給出結構性判定。對排序或決策函式以及原始碼文字執行不變性檢查,包括付款識別碼偵測,並對具名或匿名證據做信任與真實性評分。驗證來源聲明用語,把對外聲明歸類為現行、過期或未驗證。將條目附加到雜湊鏈稽核日誌,並從創世條目重新驗證整條鏈。對建議與決策配對評分,並衡量引擎與人工判斷的分歧。以安裝步驟和起始程式碼片段說明 agent-receipt 與 cost-governor 模式。
- 適用情境
- 適合在建置或稽核會對自身輸出作出聲明的 AI 產品時使用:檢查回答是否有引用、證據是否獲得佐證、排序是否不依賴付款或受保護屬性,以及對外聲明和稽核日誌是否站得住腳。最適合由可信任的本機編碼代理在此類專案中使用。
- 執行需求
- 透過 stdio 在本機執行,通常用 npx 或把 npm 套件 honesty-mcp 安裝到專案中;需要 Node.js 以及連線 npm 儲存庫的網路。不需驗證或 API 金鑰。三條程式碼執行路徑預設關閉,除非把環境變數 HONESTY_MCP_ENABLE_CODE_EXEC 設為恰好 1;HONESTY_MCP_WORKER_TIMEOUT_MS 可選地以毫秒設定工作執行緒逾時。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 honesty-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
honesty-mcp
Try the kits in your browser → · Part of honesty kits, a family of small checks for the claims an AI product makes.
An MCP (Model Context Protocol) server that exposes eleven already-built, zero-runtime-dependency "honesty SDK" TypeScript libraries as tools any MCP-compatible coding agent (Claude Code, Claude Desktop, or any other MCP client) can call while building or auditing a product — grounded-citation checking, evidence corroboration grading, payout/mutation-invariance checks (scenario-tested, not a formal proof for every possible input), trust/ authenticity scoring, provenance-claim validation, a claims registry, a tamper-evident audit chain, and recommendation/decision grading plus engine-vs-human divergence, plus scaffolding for two runtime-library kits that don't fit the "check this content" shape.
This server is thin by design: every tool is a Zod input schema plus a handler that imports and calls the real, unmodified export from the wrapped kit. It does not reimplement any of the underlying logic.
Quickstart
Then ask your coding agent to run check_grounding on a draft answer and its
sources. Each sentence comes back as grounded, placeholder, ungrounded or
invalid (a citation whose source is missing from the evidence). It checks
structure only: it does not decide whether a source is true.
Thirteen tools are listed by default. The three paths that run JavaScript the
agent sends are off unless you set HONESTY_MCP_ENABLE_CODE_EXEC=1; read
A note on the code-execution tools first.
Install
honesty-mcp is published on npm and wraps its eleven sibling "honesty SDK"
kits as ordinary registry dependencies (semver ranges, not local file:
paths) — npm install (or a plain npx) resolves everything from the
public registry, with nothing else to check out first.
The fastest way to run it, with no install step at all:
Or add it to a project:
Adding it to an MCP client
Claude Code:
Any other MCP client that reads an mcpServers config (Claude Desktop's
claude_desktop_config.json uses the same shape):
Three of the tools run JavaScript that the calling agent sends, so they are
off by default. To use them, add the environment variable
HONESTY_MCP_ENABLE_CODE_EXEC=1 to the server's environment (see
A note on the code-execution tools
first):
The server runs on the stdio transport — it reads JSON-RPC requests from stdin and writes responses to stdout, logging only a one-line startup banner to stderr so stdout stays a clean JSON-RPC channel. This is the transport Claude Code, Claude Desktop, and most local/CLI MCP client integrations expect for a locally-run server; it is not an HTTP server and has no port to browse to.
Listing in the MCP registry
honesty-mcp also ships a server.json (validated against the official
schema) so it can be listed on the
official MCP registry,
under the name io.github.lkopietz3-byte/honesty-mcp. Listing is a manual,
one-time step the maintainer runs after this package is on npm — it is
not run as part of this repo's CI or npm publish. Exact commands,
from the registry's own docs
(publishing guide,
CLI reference):
package.json's mcpName field (io.github.lkopietz3-byte/honesty-mcp)
must match server.json's name field exactly — that's how the registry
verifies the npm package and the registry listing belong to the same
publisher (see
package-types.mdx, "Ownership Verification").
Tools
9 content-checking kits, 12 tools (kits 1–9: hand one of these real content or data, get back a structured verdict):
2 scaffolding tools (agent-receipt-kit, cost-governor-kit — these are
runtime libraries a project installs and imports into its own running
code, not something checked on-demand the same way; see the code comments
in src/tools/agentReceiptScaffold.ts / costGovernorScaffold.ts for why a
"check this content" shape would misrepresent them):
That's 9 kits, 12 content-checking tool slots (payout-invariance-kit, audit-chain-kit, and advice-ledger-kit each got 2 tools instead of 1, since each bundles two genuinely distinct operations — runtime check vs. static grep; append vs. verify; grading one decision vs. measuring divergence across a whole population — that read better as separate, single-purpose MCP tools than as one tool with a mode switch) plus 2 scaffolding tools = 14 tools total.
That is 14 tools when code execution is enabled. With it off (the default),
check_mutation_invariance is not listed, so a client sees 13.
A note on the code-execution tools
These tools are off by default. check_payout_invariance (runtime mode)
and check_mutation_invariance wrap kit functions whose real signature takes
an actual JavaScript function (a ranking function, a mutation closure);
there is no way to represent a function as MCP JSON arguments. Both tools
accept that function as a source-code string and build the real function
via the Function constructor, inside the worker that src/lib/runFunctionJob.ts
starts after the code-execution switch check, before calling the unmodified kit
export with it. (src/lib/buildFunction.ts is the same builder kept as an
independently tested reference copy; nothing calls it at runtime.) compute_divergence's optional
config.groupBySource uses the same mechanism for advice-ledger-kit's
groupBy config function, but only when a caller actually supplies it, and
omitting it (the common case) needs no code execution at all, since the
library's own default groups by each pair's group field. This is equivalent
to eval for that one string.
Because an agent that has been fed hostile text could be talked into sending
code, the server only offers these paths when the operator turns them on by
setting HONESTY_MCP_ENABLE_CODE_EXEC=1 in the server's environment. Exactly
1 enables them; any other value (true, yes, 0, empty) leaves them off.
While they are off:
check_mutation_invarianceis not registered, so it does not appear in the tool list.check_payout_invarianceis listed withstatic-importsmode only.compute_divergenceis listed without thegroupBySourceinput, and sending it is rejected.- The server's initialize result carries a short note naming the variable.
runFunctionJob(src/lib/runFunctionJob.ts), the one place caller JavaScript is ever run, refuses to start a worker. Its error namesHONESTY_MCP_ENABLE_CODE_EXEC.
Every other tool is unchanged. The default is one named constant,
CODE_EXEC_ENABLED_BY_DEFAULT in src/lib/codeExec.ts.
Turning it on does not isolate anything. The code still runs with this
process's full filesystem, network and environment access. It is the same trust
model as the agent running node -e or vitest run itself, and it is not
designed to be exposed to untrusted, remote, or adversarial input. Only enable
it for a server driven by a trusted local agent, and only pass code you wrote
or trust.
Static-imports mode never reads files from disk
check_payout_invariance's static-imports mode takes files as a map of
path to file content that the caller sends. A list of paths is rejected with an
error. The wrapped kit would read any readable path it was given and return the
matching lines, which would let an agent read arbitrary files from the machine
one line at a time, so this server does not pass paths through. To scan files,
have the agent read them and send the text.
All three of these run inside a worker_threads Worker with a bounded
timeout (src/lib/runFunctionJob.ts), not on the server's own main
thread. Earlier versions called the built function synchronously in-process,
so a while (true) {} source string would block the entire stdio server
forever — every other in-flight or future tool call along with it. Now, if
the worker doesn't finish within the timeout (default 10 seconds,
override with the HONESTY_MCP_WORKER_TIMEOUT_MS environment variable, in
milliseconds, from 1 to 2147483647), it is forcibly terminate()d and the
tool call returns a clear timeout error instead of hanging. Console output
from the supplied code (console.log, console.error) is captured and
written to the server's stderr with a [honesty-mcp worker] prefix, capped
at 16 KiB per call, so it doesn't reach stdout, which carries the MCP
protocol. Code that writes to file descriptor 1 directly (for example with
fs.writeSync(1, ...)) is not intercepted and can corrupt the protocol
stream; that is part of why this is not a sandbox. This is not a sandbox — the
worker has this process's full OS-level privileges (filesystem, network,
environment variables) — it only bounds time. It does not stop caller
code from reading your filesystem, making network requests, or doing
anything else this Node process itself can do. The trust model above still
applies in full: only pass code you wrote or trust, and don't expose this
server to untrusted, remote, or adversarial input.
Kit versions
This server depends on the newer release line of each wrapped kit (the ranges
in package.json). The table lists what that line changes compared with the
0.2 line that honesty-mcp 0.2.x used. At start-up each tool reads the installed
kit's version, words its description for that version, and refuses an input
that the installed kit would silently ignore (for example matchIdentifierParts
with payout-invariance-kit 0.2, if an override installs it) instead of
pretending it worked.
test/kitCompat.test.ts runs the matching branch for whichever line is
installed. With the current ranges that is always the newer line, so the
older-line checks can be removed in a later release.
Honest limits
- This server adds no guarantee beyond what the kit it wraps already documents. Every tool description was checked against its kit's own README "Honest limits"/"Limits" section as of the sibling-kit commits this branch was built against — read that kit's README for the full detail behind any one-line tool description or table row here. If a kit's own limits change later, this server's wording can drift out of sync again; nothing here re-checks that automatically.
check_payout_invariance,check_mutation_invariance, andcompute_divergence's worker-thread timeout bounds time only, not behavior — see "A note on the code-execution tools" above. It is not a sandbox, and these paths are off unlessHONESTY_MCP_ENABLE_CODE_EXEC=1.SERVER_VERSION(src/server.ts) andpackage.json'sversionare still bumped by hand.test/drift.test.tsnow fails if they, or the two versions inserver.json, disagree, but nothing bumps them for you.
Development
To work on this server itself (rather than just use it), clone the repo and build from source:
Project layout
來源:README.md,提交 0165b69
工具
0版本歷史
4- v0.3.0最新Oct 12, 2026
- v0.2.0Sep 30, 2026
- v0.1.1Sep 29, 2026
- v0.1.0Sep 29, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分