primarysource
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
primarysource
A primary source is the text itself: answer from it, and say exactly where it is.
One package, many collections. The core is a sectioned-document model, a ref grammar, token-budgeted paging, a fixed result shape, readers, a full-text index, a CLI and an MCP server. Each collection is a subpackage behind an extra: rfc (the RFC series, moved in from rfclib), nist, usb, itu, zim, cve, and more. PLAN.md has the design and ROADMAP.md the open work.
pip install "primarysource[rfc,mcp]"
primarysource collections
primarysource mcp --collection rfcPre-alpha. It ships no document text: you fetch the sources yourself.
What works today
from primarysource.budget import page
from primarysource.model import Document, Section, Unit, span_hash
from primarysource.refs import RefGrammar
from primarysource.render import render
grammar = RefGrammar(r"(?:RFC|BCP|STD)\d+")
ref = grammar.parse("RFC9000§9.6¶2") # Ref(doc='RFC9000', section='9.6', para=2)
document = Document("demo", "Demo", Unit.SENTENCE, (Section("1", "Scope", ("First.", "Second.")),))
section = document.section("1")
result = page(section.units, start=1, max_tokens=2000)
print(render(" ".join(result.units), {"cite": "Demo §1", "unit": document.unit, "span": span_hash("First.")}))Module | What it does |
|
|
|
|
|
|
| body plus |
|
|
|
|
Related MCP server: KSoR
What it does not do yet
It reads no file format, builds no index, has no command and serves nothing. No library depends on it.
Tests
python -m pytest -q from this directory. All tests use invented text.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only hosted MCP over CanonicAI's cited Answers corpus on canonicai.com.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Agentic search over your Dewey document collections from any MCP-compatible client.
Related MCP Servers
- FlicenseNot gradedqualityFmaintenanceEnables searching and researching document collections through hybrid semantic search and agentic research queries with grounded, cited answers. It allows users to list collections, scan document sections, and retrieve full Markdown content via MCP-compatible agents.46 npm-
- FlicenseNot gradedqualityCmaintenanceServes a governed knowledge system of record over MCP, letting agents answer questions with citations drawn only from approved documents and explicitly decline when the record does not cover the question.-
- AlicenseNot gradedqualityBmaintenanceProvides MCP tools to search local document corpora with conservative semantic deduplication, source retention, and version/scope filtering, returning compact evidence packets with original passages and source IDs for agents.MIT
- AlicenseNot gradedqualityCmaintenanceExposes a markdown knowledge base to MCP clients so they can search pages, fetch individual documents, and ask grounded questions that come back with numbered citations or a refusal. Retrieval is graded before answering, with a single query rewrite before giving up when nothing relevant is found.1MIT