Skip to content

Add MCP proof lookup tool#40

Merged
ramimbo merged 1 commit into
ramimbo:mainfrom
newmattock:bounty-37-mcp-get-proof
May 23, 2026
Merged

Add MCP proof lookup tool#40
ramimbo merged 1 commit into
ramimbo:mainfrom
newmattock:bounty-37-mcp-get-proof

Conversation

@newmattock
Copy link
Copy Markdown
Contributor

Summary:
Adds a read-only get_proof MCP tool for looking up public proof records by hash.

Related bounty or issue:
Bounty #37

What changed:

  • Added get_proof to the MCP tools/list response.
  • Implemented tools/call handling for get_proof using existing Proof rows and stored public proof JSON.
  • Returned useful wrapper metadata (hash, kind, ledger/submission ids, creation time) without changing proof payloads, ledger hashes, or payout behavior.
  • Added a short get_proof MCP example to docs/agents.md.
  • Added tests for a found proof and an unknown proof hash.

Validation:

  • ../mergework-bounty-20/.venv/bin/python -m pytest tests/test_api_mcp.py::test_mcp_get_proof_returns_public_proof_details tests/test_api_mcp.py::test_mcp_get_proof_reports_unknown_hash -q -> 2 passed.
  • ../mergework-bounty-20/.venv/bin/python -m pytest tests/test_api_mcp.py -q -> 13 passed.
  • ../mergework-bounty-20/.venv/bin/python -m pytest -q -> 74 passed.
  • ../mergework-bounty-20/.venv/bin/python -m ruff format --check . -> 28 files already formatted.
  • ../mergework-bounty-20/.venv/bin/python -m ruff check . -> All checks passed.
  • ../mergework-bounty-20/.venv/bin/python -m mypy app -> Success.
  • ../mergework-bounty-20/.venv/bin/python scripts/check_agents.py -> AGENTS.md ok.
  • ../mergework-bounty-20/.venv/bin/python scripts/docs_smoke.py -> docs smoke ok.

Notes:
Documentation and MCP behavior only; no deployment, secrets, ledger mutation, proof payload mutation, or payout behavior changes.

@Zejia
Copy link
Copy Markdown
Contributor

Zejia commented May 23, 2026

No blockers from my pass.

Checked:

  • app/main.py adds get_proof to tools/list and returns wrapper metadata plus the stored public proof payload. It does not change proof generation, ledger hashes, or payout behavior.
  • tests/test_api_mcp.py covers both an existing proof hash and an unknown hash.
  • docs/agents.md adds a short MCP example and the tool list entry.

Validation on this PR branch:

  • python -m pytest tests/test_api_mcp.py::test_mcp_get_proof_returns_public_proof_details tests/test_api_mcp.py::test_mcp_get_proof_reports_unknown_hash -q -> 2 passed.
  • python -m pytest tests/test_api_mcp.py -q -> 13 passed.
  • python -m ruff format --check . -> 28 files already formatted.
  • python -m ruff check . -> All checks passed.
  • python -m mypy app -> Success.
  • python scripts/check_agents.py -> AGENTS.md ok.
  • python scripts/docs_smoke.py -> docs smoke ok.

@ramimbo ramimbo merged commit 597cc0e into ramimbo:main May 23, 2026
1 check passed
@ramimbo ramimbo added the mrwk:paid Ledger payment recorded label May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mrwk:paid Ledger payment recorded

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants