Notanda (Beta)

io.github.RudiRegenwurm由 GitHub 帳號 RudiRegenwurm 發布v0.1.0-beta.3更新於 Oct 24, 2026

Every OpenAlex search stores its request, response and checksums so sources can be checked later.

概覽

AI 產生的概覽

本機 stdio MCP 伺服器,可在 OpenAlex 檢索開放取用文獻,並把每次檢索連同雜湊一併留存,方便日後核驗來源。

可以做什麼
  • 檢索 OpenAlex 中具 DOI 的開放取用文獻,並把請求、供應方回應與雜湊存放在同一個證據 ID 下
  • 依證據 ID 取回已存結果並重新核對雜湊,不必再次向供應方發出請求
  • 可選擇比對呼叫端自行保存的 receipt,以偵測載荷與清單被一併替換的情況
  • 回傳設定錯誤、供應方錯誤、完整性失敗、receipt 不符等結構化錯誤狀態
適用情境
適合需要事後稽核文獻來源的情境,例如研究或可重現性工作,希望每次 OpenAlex 查詢都留下可雜湊核驗的紀錄,而不只是得到一次性答案。
執行需求
需要 Python 3.11 或 3.12,或使用 uvx 搭配 Python 3.12;需安裝 notanda-mcp 套件(固定相依 notanda 1.3.2),並以參數指定可寫入的絕對證據目錄。必須在本機環境設定 OpenAlex API 金鑰 HARVESTER_OPENALEX_API_KEY。需要連線至 OpenAlex works 端點的網路。僅限桌面端,使用 stdio 傳輸。
安裝前請注意
需要 OpenAlex API 金鑰(HARVESTER_OPENALEX_API_KEY),應透過環境變數設定,不要寫入命令參數或證據目錄。檢索會把證據檔案寫入所設定的目錄。清單並非數位簽章:若未保存呼叫端持有的 receipt,載荷與清單被協同替換將無法偵測。標題與中介資料是未經核驗的第三方內容。此伺服器仍在 Beta 階段,外部驗收測試尚未完成。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Notanda (Beta),將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Notanda local MCP server — Beta

Every OpenAlex search stores its request, response and checksums so sources can be checked later.

Beta: an external developer's unassisted acceptance test is still pending. Technical tests do not replace that external usability and installation check.

This directory exposes Notanda's provenance-aware OpenAlex retrieval to local MCP clients. It is a separate notanda-mcp package, not a hosted service and not part of the notanda 1.3.2 package. It depends on that released core.

The component provides exactly two tools:

  • search_literature: search OpenAlex for OA works with a DOI and persist the request, provider observation, returned result and hashes under one evidence ID; the returned receipt is the SHA-256 of manifest.json.
  • get_evidence: verify those hashes and return the original result by evidence ID without repeating the provider request. An optional caller-held receipt also detects replacement of the payloads together with their manifest.

Both tool descriptions and every successful response warn that titles and metadata are unverified third-party content, not instructions.

It does not download full text, write to the Notanda corpus or Evidence Ledger, modify the web UI, expose a network server, or provide general agent reasoning.

Provenance and status

The implementation is adapted from the isolated branch experiment/local-mcp, commit 366bc2d4827aa915e2e58a82cd567163ed63d4be. The sealed handoff package bound that source to 20 passing MCP tests and a successful live OpenAlex run. For the public repository integration, the duplicated Notanda runtime was replaced by the released notanda==1.3.1 PyPI dependency. Beta 3 updates that pin to notanda==1.3.2; MCP remains pinned to the tested SDK version 1.30.0. SOURCE_PROVENANCE.json records the source hashes and the deliberate integration changes in machine-readable form.

Five of the six original acceptance criteria are technically satisfied. The sixth — an external developer with no Notanda knowledge completing installation, search, restart and independent verification without assistance — remains externally to be verified until that result is returned.

Install the Beta package

Use Python 3.11 or 3.12. A dedicated virtual environment is recommended:

bash
python -m venv .venv-mcp# Linux/macOS:. .venv-mcp/bin/activate# Windows PowerShell instead:# .venv-mcp\Scripts\Activate.ps1python -m pip install "notanda-mcp==0.1.0b3"

Beta 3 requires exactly notanda==1.3.2. Installing it into an environment already containing that version preserves the core version. Beta 2 requires notanda==1.3.1 and pip may downgrade an existing 1.3.2 installation to satisfy that pin. Use a separate environment if you need Beta 2 or a different Notanda core version; do not bypass dependency checks. The exact pin keeps the tested core/server combination reproducible; it does not promise compatibility with future core releases.

For a client that uses uvx, configure this command and arguments (replace the evidence directory with a writable absolute path on your computer):

text
uvx --python 3.12 [email protected] --evidence-dir ABSOLUTE_LOCAL_EVIDENCE_PATH

Set HARVESTER_OPENALEX_API_KEY in the MCP client's local environment. The key is required for searches and must not be placed in the command arguments. The registry manifest declares this variable as secret and the evidence path as a required input.

Install from this repository

Use Python 3.11 or 3.12. From the repository root:

bash
python -m venv .venv-mcp# Linux/macOS:. .venv-mcp/bin/activate# Windows PowerShell:# .venv-mcp\Scripts\Activate.ps1python -m pip install -e ./mcp

This installs the MCP component from the checkout and resolves the reviewed Notanda core as notanda==1.3.2 from PyPI.

Configure an OpenAlex API key locally. For example, in PowerShell without placing the key in terminal history:

powershell
$mcpSecureKey = Read-Host 'OpenAlex API key' -AsSecureString$env:HARVESTER_OPENALEX_API_KEY = [System.Net.NetworkCredential]::new('', $mcpSecureKey).Password

The existing Notanda configuration mechanisms also work: HARVESTER_CONFIG or HARVESTER_OPENALEX_API_KEY. Never add credentials to evidence directories, Git, screenshots or returned test reports.

Run and verify

The supplied real stdio client starts the server, initializes MCP, verifies the two tool names and executes a search:

bash
python mcp/tools/mcp_client.py \  --evidence-dir ./tmp/mcp-evidence \  --query "scientific reproducibility" \  --limit 2

The response contains an evidence_id and a receipt. Keep both outside the evidence directory. A second process can verify that receipt and retrieve the stored response without another provider request:

bash
python mcp/tools/mcp_client.py \  --evidence-dir ./tmp/mcp-evidence \  --id EVIDENCE_ID \  --receipt RECEIPT

For compatibility, get_evidence also works without receipt and performs the previous payload hash and identity checks. Those checks detect corruption, but a coordinated replacement of payloads and manifest is detectable only when the original receipt is supplied.

The independent verifier uses only the Python standard library:

bash
python -S mcp/tools/verify_mcp_evidence.py \  ./tmp/mcp-evidence/EVIDENCE_ID

For another local MCP client, configure the virtual environment's notanda-mcp executable with these arguments:

text
--evidence-dir ABSOLUTE_LOCAL_EVIDENCE_PATH

Transport is stdio. The server has no user interface and opens no listening port.

Evidence contract

Each search creates one directory named by its 32-character evidence ID:

FileContents
request.jsonsupplied and effective query, limit, MCP client name/version, source experiment commit, installed Notanda version and server hash
provider.jsonattempted OpenAlex URL after secret redaction, timestamps, HTTP status and captured parsed JSON
response.jsonthe persisted result, including structured failures and the untrusted-content notice; the detached receipt is added to the MCP response after sealing
manifest.jsonbyte length and SHA-256 for the three payload files

The manifest alone detects corruption or one-file modification. It is not a digital signature and, without a caller-held receipt, does not detect coordinated replacement of payloads and manifest. Comparing the optional receipt anchors the exact manifest observed during the original search.

Limits and failure behavior

  • Query length: 1–1000 characters. Result limit: integer 1–10.
  • One OpenAlex request, no pagination, no automatic retry.
  • 20-second operation timeout, 10-second connection timeout, 4 MiB response ceiling.
  • Only https://api.openalex.org/works is accepted as the provider endpoint.
  • Missing key: configuration_error; invalid input: invalid_arguments.
  • Provider/transport failure: provider_error; no provider exception text is stored.
  • Interrupted write: incomplete; hash or identity mismatch: integrity_failure; supplied receipt mismatch: receipt_mismatch.
  • Provider text is persisted as untrusted data, never interpreted as instructions.

Tests

Install the development extra and run the 23 deterministic checks:

bash
python -m pip install -e "./mcp[dev]"python -m pytest mcp/tests

The tests cover successful retrieval, restart, independent verification, corruption, invalid input, HTTP 401/429/500, timeouts, malformed and oversized responses, storage failure, process death, secret redaction and real two-process stdio MCP operation.

來源:mcp/README.md,提交 7eab3b0

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

3
  1. v0.1.0-beta.3最新Oct 14, 2026
  2. v0.1.0-beta.2Oct 2, 2026
  3. v0.1.0-beta.1Sep 25, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分