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 分