Quickstart
A valid package in five minutes. You need Node.js 22 or later; npx fetches
each tool.
1. Write a package
Section titled “1. Write a package”mkdir -p my-kb/contentmy-kb/moca.json:
{ "id": "https://example.com/moca/my-kb", "version": "1.0.0", "title": "My knowledge base", "language": "en"}my-kb/content/opening-hours.md:
---type: Facttitle: Opening hoursverified: - by: human:you at: 2026-09-27T00:00:00Zstale_after: 2027-03-27T00:00:00Z---
# Opening hours
The office is open 09:00-17:00, Monday to Friday.type is the one field OKF requires. The rest is optional.
2. Check it
Section titled “2. Check it”npx @openmoca/moca-lint lint my-kbNo findings.
sha256:…capabilities: coreThe sha256: line is the package’s digest: change any byte and it changes.
3. Or convert existing Markdown
Section titled “3. Or convert existing Markdown”npx @openmoca/moca-convert ./docs -o my-docs \ --id https://example.com/moca/my-docs --title "My docs"moca-convert adds type and title to files that lack them and leaves
everything else untouched. It also reads Obsidian vaults and OpenAPI documents.
4. Ask it questions
Section titled “4. Ask it questions”Add the MCP server to any MCP client. It is one download with nothing to install. For example, in a client’s JSON configuration:
{ "mcpServers": { "my-kb": { "command": "/path/to/moca-mcp", "args": ["/path/to/my-kb"] } }}The client gets moca_search, moca_get_node, moca_structure and moca_list_packages, and
every result carries its citation.
- Walkthrough: sign, review, index and serve.
- Consuming packages: read, verify, search and cite from your own code, in TypeScript or .NET.
- Authoring: evidence, validity windows, versions, members and relations.