● meerkat · knows
meerkat — CLI & integrations
The full mk command surface, plus how to expose the knowledge base to agents over MCP and to web tools over HTTP.
The CLI
Every subcommand works under both meerkat and mk. Page IDs are slash-paths from the wiki root without the .md extension (e.g. concepts/Rate-Limiting).
| Command | Description | Example |
|---|---|---|
search | Full-text BM25 search over the embedded wiki. | mk search "rate limiting" --limit 20 |
show | Print a single wiki page (raw markdown). | mk show concepts/Rate-Limiting |
list | List pages, filtered by prefix/category/status/owner. | mk list --prefix systems/backend/ |
mcp serve | Run the MCP server over stdio. | mk mcp serve |
http serve | Run the HTTP/OpenAPI server with bearer auth. | mk http serve --port 4004 |
ingest | Plan (and with --execute, run) ingestion. | mk ingest --source policies --execute |
update | Check for / install meerkat updates. | mk update --check |
version | Print version info. | mk version --json |
Search flags
| Flag | Effect |
|---|---|
--limit int | Max hits (default 10). |
--body | Print the full body of each hit. |
--json | Machine-readable output. |
mk search "exact phrase" # phrase match
mk search +cache -queue # must / must-not
mk search title:eviction # field-targetedOpenCode (MCP over stdio)
Register meerkat as a local MCP server and your agent gains three tools on every prompt — mk_search, mk_show, and mk_list.
{
"mcp": {
"meerkat": {
"type": "local",
"command": ["mk", "mcp", "serve"],
"enabled": true
}
}
}Search, then show
The recommended agent pattern is mk_search first (the snippet triages which page), then mk_show on the winner — it keeps the context window lean.
OpenWebUI (HTTP / OpenAPI)
Serve the knowledge base over HTTP with a bearer token, then point OpenWebUI at the OpenAPI schema.
export MEERKAT_API_KEY=$(openssl rand -hex 32)
mk http serve --host 0.0.0.0 --port 4004
curl -sS http://127.0.0.1:4004/healthz| Method | Path | Auth |
|---|---|---|
| POST | /search | Bearer |
| POST | /show | Bearer |
| POST | /list | Bearer |
| GET | /openapi.json | none |
| GET | /healthz | none |
The server refuses to start without a key (no anonymous mode); the key is compared in constant time. /healthz and /openapi.json are exempt from auth so probes and tool registration work without the token.
Environment variables
| Variable | Effect |
|---|---|
MEERKAT_API_KEY | Bearer token for mk http serve (env wins over --api-key). |
MEERKAT_NO_UPDATE_CHECK=1 | Silence the post-run "newer release available" check. |
Authoritative reference, generated from the component repos. Spot something stale? Tell us.