This release is a pre-release and may not be stable for production use.
Notanda local MCP server — Beta
Beta: the external, unassisted acceptance test by Thomas 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.1 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.get_evidence: verify those hashes and return the original result by evidence ID without repeating the provider request.
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; 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 in a virtual environment:
python -m pip install "notanda-mcp==0.1.0b1"
For a client that uses uvx, configure this command and arguments (replace the evidence directory with a writable absolute path on your computer):
uvx --python 3.12 notanda-mcp@0.1.0b1 --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:
python -m venv .venv-mcp
# Linux/macOS:
. .venv-mcp/bin/activate
# Windows PowerShell:
# .venv-mcp\Scripts\Activate.ps1
python -m pip install -e ./mcp
This installs the MCP component from the checkout and resolves the reviewed Notanda
core as notanda==1.3.1 from PyPI.
Configure an OpenAlex API key locally. For example, in PowerShell without placing the key in terminal history:
$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:
python mcp/tools/mcp_client.py \
--evidence-dir ./tmp/mcp-evidence \
--query "scientific reproducibility" \
--limit 2
The response contains an evidence_id. A second process can retrieve exactly the
stored response without another provider request:
python mcp/tools/mcp_client.py \
--evidence-dir ./tmp/mcp-evidence \
--id EVIDENCE_ID
The independent verifier uses only the Python standard library:
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:
--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:
| File | Contents |
|---|---|
request.json |
supplied and effective query, limit, source experiment commit, installed Notanda version and server hash |
provider.json |
attempted OpenAlex URL after secret redaction, timestamps, HTTP status and captured parsed JSON |
response.json |
the exact MCP result, including structured failures |
manifest.json |
byte length and SHA-256 for the three payload files |
The manifest detects accidental or one-file modification. It is not a digital signature and does not protect against coordinated replacement of payloads and manifest.
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/worksis 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. - Provider text is persisted as untrusted data, never interpreted as instructions.
Tests
Install the development extra and run the original 20 deterministic checks:
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.
Release files for notanda-mcp 0.1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| notanda_mcp-0.1.0b1.tar.gz | 16.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| notanda_mcp-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.9 kB
Release files / notanda_mcp-0.1.0b1.tar.gz
| Download URL | notanda_mcp-0.1.0b1.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86dfa81e4649eacd18677c5ff4249561651c593e5441aae7339ccd15a10daa73
|
|
BLAKE2b-256 checksum How to use checksums |
9d322299a53ad798ff1458d4951e59f8aaebf4720293a8fca37a53d536096f11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency logRelease files / notanda_mcp-0.1.0b1-py3-none-any.whl
| Download URL | notanda_mcp-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a56c6b2f5f092f3a80ed030cb7eaa98a9a54bdb5ae700aa5df148fd5ec1cb753
|
|
BLAKE2b-256 checksum How to use checksums |
4afb18194e511838a1a61a0c130a814008adf437b11dc02700443bb6ef7aa8c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.
Transparency log