ojob.io/ai/mcps/mcp-wiki-safe

Usage

ojob ojob.io/ai/mcps/mcp-wiki-safe onport=8888 wikibackend=fs wikiroot=./wiki wikibucket=my-wiki-bucket wikiprefix=wiki/ wikiurl=https://s3.amazonaws.com wikiaccesskey= wikisecret= wikiregion= wikiuseversion1=false wikiignorecertcheck=false wikis3artifactprefix=wiki-artifacts/ s3artifactbundle= wikihttpindexurl= wikihttptimeout= wikiartifactrefreshsecs=300 usewikigraph=true wikiindexdir=/var/cache/mini-a/wiki wikilexical="{ language: 'english', synonymsFile: 'synonyms.txt' }" toolPrefix=wiki- label="Team wiki" wikimounts="[{name: 'team', backend: 'fs', root: './team-wiki'}]" wikirestrictprofile=moderate wikirestrictsearchlimit= wikirestrictminquerychars= wikirestrictmetachars= wikirestrictreadlines= wikirestrictreadchars= wikirestrictrefttl= wikirestrictmaxsearches= wikirestrictmaxreads= wikirestrictmaxchars= wikirestrictwindow= wikirestrictpagecooldown= wikirestrictstate= wikirestrictrefch="(type: 'redis', options: (host: 'redis.svc', port: 6379))" audit=false 

Description

A standalone STDIO/HTTP MCP wiki server with restricted retrieval only (opaque references, bounded excerpts, budgeted; safe for untrusted clients)

Expects

Name Description
onport If defined starts an HTTP MCP server on this port; otherwise uses STDIO
wikibackend Wiki backend type (fs, s3, s3fs, es or http; https is an alias)
wikiroot Base directory or local .zip/.okt archive for fs backend (archives are always read-only)
wikibucket S3 bucket for s3 backend
wikiprefix S3 key prefix for s3/s3fs backend, or Elasticsearch index for es backend
wikiurl S3 endpoint for s3/s3fs, Elasticsearch/OpenSearch base URL for es, or static wiki base URL for http
wikiaccesskey S3 access key, or Elasticsearch username for es backend
wikisecret S3 secret key, or Elasticsearch password for es backend
wikiregion S3 region
wikiuseversion1 Force S3 signature version 1
wikiignorecertcheck Ignore TLS cert validation on S3 endpoint
wikis3artifactprefix Optional S3 prefix containing a published local Lucene cache. It is downloaded to wikiindexdir at startup. Graph hints remain disabled by default in restricted retrieval.
s3artifactbundle Use <prefix>/mini-a-wiki-index.zip instead of individual S3 artifact objects
wikihttpindexurl Optional HTTP artifact bundle URL (defaults to <wikiurl>/mini-a-wiki-index.zip)
wikihttptimeout HTTP wiki request timeout in milliseconds (default 30000)
wikiartifactrefreshsecs Recheck an HTTP or bundled-S3 artifact cache after this many seconds between wiki requests (0 disables; default 0)
usewikigraph Opt in to graph-backed related-page hints in restricted search. Hints remain opaque read references and do not expose graph paths or relationship metadata.
wikiindexdir Local cache directory used for downloaded S3 Lucene artifacts
wikilexical SLON/JSON Lucene lexical configuration. Defaults to {language: 'english'}; supports inline synonyms and an optional synonymsFile.
toolPrefix Optional prefix prepended to all tool names (e.g. "docs-" -> docs-search, docs-read)
label Human-readable wiki label injected into templated tool descriptions
wikimounts SLON/JSON array of read-only wiki mounts: [{name, backend, root
wikirestrictprofile Restricted retrieval default profile: tight, moderate, relaxed or off. Defaults to tight. Explicit individual restriction settings override profile values. 'off' disables restricted retrieval entirely (raw search/read, no opaque references, no budgets) -- equivalent to running the unrestricted mcp-wiki.yaml server; only use it for trusted clients.
wikirestrictsearchlimit Maximum search results (default: 3; ceiling: 10)
wikirestrictminquerychars Minimum useful query length (default: 4)
wikirestrictmetachars Metadata character cap per result (default: 300)
wikirestrictreadlines Maximum excerpt lines (default: 40; ceiling: 100)
wikirestrictreadchars Maximum excerpt characters (default: 6000; ceiling: 16000)
wikirestrictrefttl Opaque reference lifetime in seconds (default: 120)
wikirestrictmaxsearches Searches per budget window (default: 30)
wikirestrictmaxreads Reads per budget window (default: 15)
wikirestrictmaxchars Total disclosed characters per budget window (default: 60000)
wikirestrictwindow Budget window in seconds (default: 3600)
wikirestrictpagecooldown Delay before a page may receive another reference (default: 3600)
wikirestrictstate Optional persistent restricted-retrieval ledger path outside wikiroot
wikirestrictrefch SLON/JSON OpenAF channel definition to store search-issued references and page cooldowns (default: this process's own memory only). Set this to share references across multiple mcp-wiki-safe replicas behind the same load balancer (e.g. Kubernetes), so a read call can consume a reference issued by a search call on a different replica. Use a channel with real per-key ops across writers, such as redis (`simple`/`file` are single-writer only, fine standalone but unsafe shared by concurrent replicas). Entries are discarded once their TTL/cooldown elapses.
audit If true (or env OJOB_MCP_AUDIT), logs every MCP tool call (tool name and arguments, handled generically by oJobMCP.yaml) plus every page actually fetched from a remote wikibackend (s3, http, es) -- backend, resolved location (s3://bucket/key, URL, or es:index/path), and byte count -- via OpenAF's log() function. Only the resolved location is logged, never the opaque reference exposed to restricted-mode callers.