Developer API, MCP & Agent Integration
Plug timestamped spoken-source search (287,066 claims), certified application/UI/flight blueprints, and truth.lock reference checks (84,752 records) into Claude, ChatGPT, Cursor, or any OpenAI SDK.
Grounded Answers via /v1
Point any existing Python or TypeScript OpenAI client, LangChain, LlamaIndex, or LiteLLM app at /v1 to retrieve timestamped spoken quotes and citation checks.
export OPENAI_BASE_URL="https://scholar.askdavidc.ai/v1" export OPENAI_API_KEY="scholar-public" # Models: scholar-grounded | scholar-l0-router | scholar-auditor
Add Spoken Search & Prior Art in 1 Command
Connect the focused 8-tool /mcp/core router (io.github.openIE-dev/commons-scholar on the Official MCP Registry), full 67-tool /mcp, POST /a2a, or /SKILL.md.
claude mcp add --transport http scholar \ https://scholar.askdavidc.ai/mcp/core curl -fsSL https://scholar.askdavidc.ai/SKILL.md -O
Embed Spoken Quotes & Run truth.lock in CI
Screen .bib, .ris, .tex, .qmd, and .typ references in GitHub Actions, pre-commit, or POSIX shell, or embed timestamped evidence cards.
# GitHub Action: uses: openIE-dev/commons-scholar@v0.57.0 curl -fsSL https://scholar.askdavidc.ai/truth-lock.sh | sh -s -- references.bib <script type="module" src="https://scholar.askdavidc.ai/v83/embed/scholar-evidence.js"></script>
Live Zero-Rewrite Protocol Tester
Click "Send Live Request" to inspect the live wire response…
13 Native Zero-Dependency SDKs (/sdk/<lang> & /api/sdk)Select Language ▾
Select your language to inspect or vendor the compiler-verified SDK directly over HTTPS:
commons_scholar.py
⬇ Download commons_scholar.py
pip install --extra-index-url https://scholar.askdavidc.ai/pypi/simple commons-scholar==0.57.0
"""Zero-dependency Python client for Commons Scholar (`https://scholar.askdavidc.ai`).
Covers Adaptive-RAG `ask`, spoken `prior_art` & `opportunities`, `truth.lock` retraction audits,
8-ecosystem `channels` & `watch`, Scholar x JouleDB `jouledb_distinction` & `distinction_receipt`,
Zero-Password Ed25519 `identity`, `capsules`, & `publish_*`, OpenAI-compatible `/v1`,
Google/LF `A2A 1.0`, `ACP`, toolpacks, and Reference / Forge / Ontology / Video Moat APIs.
"""
from __future__ import annotations
import json
import urllib.error
import urllib.parse
import urllib.request
from dataclasses import dataclass
from typing import Any
class CommonsScholarError(RuntimeError):
"""Raised on non-2xx HTTP responses from Commons Scholar."""
def __init__(self, status: int, body: str) -> None:
super().__init__(f"Commons Scholar HTTP {status}: {body[:240]}")
self.status = status
self.body = body
@dataclass
class CommonsScholarClient:
base_url: str = "https://scholar.askdavidc.ai"
bearer_token: str | None = None
timeout_s: float = 30.0
def _headers(self, extra: dict[str, str] | None = None) -> dict[str, str]:
hdrs = {
"Accept": "application/json",
Hosted Package Registries — Unified commons-scholar (v0.57.0)/api/registries →
Install directly with standard package managers (SHA-256 / SHA-512 SRI verified, zero external login required):
# Python (uv / pip — PEP 503 & PEP 691 Simple Index)
uv pip install --index-url https://scholar.askdavidc.ai/pypi/simple commons-scholar
# TypeScript / Node (npm / pnpm / bun — Packument + SHA-512 SRI)
npm install --registry https://scholar.askdavidc.ai/npm commons-scholar
# Rust (crates.io + Cargo RFC 2789 Sparse Registry)
cargo add commons-scholar
CARGO_REGISTRIES_SCHOLAR_INDEX="sparse+https://scholar.askdavidc.ai/cargo/index/" \
cargo add --registry scholar commons-scholar
# Go 1.22+ (Go Module Proxy + ?go-get=1)
GOPROXY=https://scholar.askdavidc.ai/goproxy,direct GONOSUMDB="scholar.askdavidc.ai/*" \
go get scholar.askdavidc.ai/sdk/go@v0.57.0
# Zig, .NET NuGet v3, Maven v2, Browser/Deno ESM & POSIX CLI
zig fetch --save https://scholar.askdavidc.ai/sdk-releases/v0.57.0/commons-scholar-zig-0.57.0.tar.gz
dotnet add package CommonsScholar --version 0.57.0 \
--source https://scholar.askdavidc.ai/nuget/v3/index.json
# Maven repository URL: https://scholar.askdavidc.ai/maven (ai.openie.scholar:commons-scholar:0.57.0)
import { CommonsClient } from "https://scholar.askdavidc.ai/esm/commons-scholar@0.57.0/index.js";
curl -fsSL https://scholar.askdavidc.ai/install.sh | sh
Channels, Podcasting 2.0, Publish CLI & JouleDB EndpointsExpand Reference ▾
Stream, subscribe, share, or meter distinctions across science, patents, math, biology, chemistry, stem, art, and radio-tv:
# 8-Ecosystem Channels, Watch/Danmaku Theater & Podcasting 2.0 / PWA GET https://scholar.askdavidc.ai/api/channels GET https://scholar.askdavidc.ai/api/channels/biology GET https://scholar.askdavidc.ai/api/watch?v=openie-radio:ep19-ltcb-cm7-standards-sel4-h56 GET https://scholar.askdavidc.ai/podcasts.xml?channel=math # RSS 2.0 + iTunes + Podcasting 2.0 GET https://scholar.askdavidc.ai/podcasts.opml # OPML 2.0 8-channel bundle GET https://scholar.askdavidc.ai/manifest.webmanifest # Google Play TWA / PWA + Share Target # Zero-Bloat Ed25519 Identity & Two-Sided Publish Studio (/publish · /play · /u/<handle>) commons login --handle @optics-lab # POST /api/identity/claim (no email/password) commons publish capsule ./sim.html --title "Wave Optics" # POST /api/publish/capsule -> /play/<slug> commons publish disclosure ./invention.md --title "…" # POST /api/publish/disclosure -> /disclosure/<cid> commons publish feed https://example.edu/rss.xml --title "…" # POST /api/publish/feed -> /u/<handle> # Scholar × JouleDB Morphic Seams (Bilibili + Podcasting 2.0) & scholar-jouledb-ppd/1 COSE_Sign1 Receipts GET https://scholar.askdavidc.ai/api/distinction-receipt?q=Landauer+limit&top=8 # MCP: scholar_price_per_distinction GET https://scholar.askdavidc.ai/api/jouledb/distinction?q=Landauer+limit&top=8 GET https://scholar.askdavidc.ai/api/jouledb/seams?seam=all # Bilibili PBP/danmaku + Podcasting 2.0 GET https://scholar.askdavidc.ai/api/jouledb/ledger