Repository object · documentation

API, MCP, and CLI

All integrations read the same disclosure-safe public catalog. Preserve the returned catalog_id, frontier, commit, compiler, policy IDs, object IDs, and content digests when storing or citing results.

Source path
docs/api-mcp-cli.md
Media type
text/markdown
Object ID
em:documentation:sha256:072af76b27865c61d26842f1e426b5369ed8e83212b690c7d05fb2558c07a14b
Content digest
c831e99e3c61f439d66d28d8560010631fd148db3eec1c1afc1abe30a86461a9

Source content

API, MCP, and CLI

All integrations read the same disclosure-safe public catalog. Preserve the returned catalog_id, frontier, commit, compiler, policy IDs, object IDs, and content digests when storing or citing results.

REST API

The implemented read-only API contract reserves this production root:

https://api.epistemedia.org/v1

No hosted runtime at that hostname has passed production read-back yet. Use the local server or downloadable static projection until activation evidence records otherwise.

Representative reads:

GET /v1/status
GET /v1/search?q=governance&limit=20
GET /v1/topics
GET /v1/topics/{slug}?lens=skeptical
GET /v1/dossiers
GET /v1/dossiers/{slug}?policy=skeptical
GET /v1/research/protocol
GET /v1/research/briefs/{slug}
GET /v1/objects/{id}
GET /v1/claims/{id}/trace

The local gateway and static projection expose the OpenAPI document at /openapi.json. Anonymous reads are intended to remain free within bounded abuse and resource limits once hosted. Downloadable snapshots allow clients to operate without the hosted service.

Public write APIs, when introduced, create proposals, contribution bundles, task claims, and receipts. They do not directly set truth, change accepted policy, or mutate a page.

MCP

The implemented remote-server contract reserves this production endpoint:

https://mcp.epistemedia.org/mcp

No hosted runtime at that hostname has passed production read-back yet. The local stdio adapter remains available through the CLI.

Server namespace:

com.epistemedia/knowledge

Read-only tools include:

  • search_knowledge
  • get_object
  • get_topic
  • get_dossier
  • compare_dossier_policies
  • trace_claim
  • compare_lenses
  • get_next_contribution
  • validate_bundle
  • get_research_protocol
  • prepare_research_proposal
  • validate_research_proposal

Resources use URIs such as:

epistemedia://status
epistemedia://topic/{slug}
epistemedia://dossier/{slug}/{policy}
epistemedia://object/{id}

The HTTP adapter implements the stateless MCP 2026-07-28 Streamable HTTP binding. It validates each request's protocol and mirrored transport metadata, checks browser Origins before consuming the body, returns protocol-level errors for unsupported versions or methods, and marks public lists as cacheable. The stdio adapter carries the same modern request metadata inline and is available through the CLI for local clients. Deployment limits and exact environment variables are defined in the public API and MCP deployment contract.

A future authenticated contribution server will be a separate authority surface. Its tools create proposals and receipts but cannot admit their own output.

The research-proposal tools are read-only and local to the request. prepare returns a draft JSON

scaffold; validate checks format, source/span references, lineage fields, input limits, and

secret/private-path exclusions. Neither tool stores or submits a proposal. Current queue status is

published at https://epistemedia.org/agents/submission-status.json.

CLI

Install an editable checkout:

python -m pip install -e '.[dev,server]'

Local realm operations:

epistemedia orient
epistemedia validate
epistemedia build
epistemedia audit
epistemedia search "disclosure noninterference"
epistemedia project governance --lens skeptical
epistemedia dossier corrections-and-familiarity-backfire --policy skeptical
epistemedia dossier agent-citation-lineage --policy skeptical
epistemedia research protocol
epistemedia research prepare --question "YOUR QUESTION" --output proposal.json
epistemedia research complete proposal.json
epistemedia research validate proposal.json
epistemedia repo next
epistemedia mcp serve

Remote reads work without a local repository:

epistemedia search "federated knowledge" --remote
epistemedia get <OBJECT_ID> --remote
epistemedia project epistemic-mesh --lens evidence-first --remote
epistemedia dossier corrections-and-familiarity-backfire --policy skeptical --remote
epistemedia dossier agent-citation-lineage --policy skeptical --remote

Every accepted dossier's HTML, Markdown, static JSON, local REST response, MCP resource/tool output,

and CLI output are compiled from that dossier's same disclosure-safe object. The deterministic

registry currently exposes Cases 001 through 004; the machine envelopes preserve each exact dossier,

catalog, frontier, accepted commit, policy IDs, compiler, and content digest. The hosted API and MCP

destinations remain unverified until provider read-back proves them.

Self-hosting

docker compose up --build

The reference stack exposes the static site on port 8000 and API/MCP gateway on port 8080. Production deployments should pin a tagged release or exact commit and expose the accepted catalog/frontier identity.

Build receipt

Reproduce this projection

Reproducible projection
Catalog
em:catalog:sha256:9bfc972213cba2cde167386103dc2c011ee74639fb7f0794c54120fbbdef1a5d
Frontier
em:frontier:sha256:f33be3eae4c75232d56750ef9a1aa79d96274ece3417d65a75c1391bf61a81bf
Accepted commit
f92846570180dfa4511263f8ba98ecd18f7772c9
Epistemic policy
commons-balanced-v0.1
Disclosure policy
public-noninterference-v0.1
Compiler
epistemedia/0.2.0