Proposal: Native Ollama integration via a Knolo tool/MCP server (knolo_search, knolo_share)
This issue is for human review. A human maintainer will review and implement it manually; no automated PRs or code changes should be made from this issue. No version bump or npm publish is requested.
Summary
This is an open protocol proposal, not a product pitch. The idea is that Knolo should ship as a tool server that Ollama users can attach to a local model, so the model can ground answers in user-owned knowledge and, with explicit consent, contribute knowledge back.
Concretely: expose two tools, knolo_search and knolo_share, in a form any Ollama tool-calling client can use, and also as an MCP server that MCP-capable Ollama clients and hosts can load. The tool schemas should be an open, model-agnostic contract. A Knolo implementation would be one compatible server; other projects should be able to implement the same tools against their own stores.
Problem
Ollama makes it easy to run open-weight models locally, but it has no built-in way to ground those models in user-owned knowledge. A local model answers from its weights. Anything the user wrote, collected, or verified lives outside the model, and each person or client ends up inventing their own retrieval glue: ad-hoc RAG pipelines, one-off embeddings, unofficial MCP bridges, or pasted context.
That has a few costs for the wider Ollama ecosystem, not just for Knolo:
- Grounded answers are hard to reproduce. Two users asking the same question against similar notes get different, uncited results, with no shared way to verify a snippet.
- There is no common, opt-in path to search or publish community knowledge that a local model can cite.
- Tool-capable Ollama models already know how to call functions, but there is no widely agreed knowledge-search / knowledge-share tool contract for them to call.
Proposed solution
Ship Knolo as an Ollama-compatible tool server and as an MCP server that exposes two tools.
How this would attach to Ollama (accurate to current APIs)
As of late 2026, Ollama's supported hook is tool calling on the chat API: a client POSTs to /api/chat with a tools array of JSON Schema function definitions, and a tool-capable model may return tool_calls. The client executes those calls and sends the results back. Ollama itself does not currently act as a native MCP client. MCP support in the Ollama world is provided by MCP-capable clients and hosts (for example ollmcp, Open WebUI, Continue, and similar bridges) that discover MCP tools, translate them into Ollama's tools format, and execute the model's tool_calls.
This proposal should therefore work in both of those layers, without assuming a built-in Ollama MCP runtime:
- Ollama tool calling. Publish the two tools in Ollama's function-definition format so any
/api/chatclient can pass them in thetoolsarray and dispatchknolo_search/knolo_share. - MCP server. Expose the same tools over MCP (stdio first; other transports later if useful) so MCP-capable Ollama clients and hosts can load them without a custom adapter.
The existing read-only @knolo/mcp server (#79) already exposes knolo_search (plus get, verify, and status) to MCP clients. This issue is about making that contract usable from Ollama, and about adding a carefully scoped knolo_share path. It should not silently change the read-only default of @knolo/mcp; see open questions below.
Local-first defaults
- Default operation is local and offline:
knolo_searchagainst a local knowledge base should work with no network. - Privacy default: nothing leaves the machine unless the user explicitly invokes
knolo_share(and, if Hub publishing is requested, gives explicit consent for that step). - Results from
knolo_searchshould be cited and verifiable (source identifier, excerpt, and a pin or receipt the caller can keep and replay), not an ungrounded model paraphrase.
Tool sketches (protocol-level, not an implementation)
knolo_search — query a local knowledge base, and optionally a Hub catalog the user has chosen to search.
Suggested inputs:
query(string, required): the natural-language or keyword questioncollection(string, optional): which local knowledge base or image to search; default is the locally configured defaultlimit(integer, optional): max hitsscope(string, optional):local(default) orhub/local_and_hub. Searching the Hub should be an explicit choice, not a default.
Suggested outputs:
hits[]: for each hit, a cited snippet (excerpt), source id or title, locator (object or chunk id), and verification metadata (stateRootor equivalent pin,receiptIdif one was written)partial/ match quality, if the server distinguished exact vs partial hits- no requirement that the server itself generate a final natural-language answer; the model remains responsible for writing the reply from the cited evidence
knolo_share — feed knowledge into a local Knolo knowledge base, and optionally publish it to the Knolo Hub at hub.knolo.dev.
Suggested inputs:
contentor a local pack/source reference (one of these required): the knowledge to addtitle/description(optional)destination(string):local(default) orhubconsent(boolean, required to be true whendestinationishub): an explicit, user-visible confirmation that publishing off-machine is intended. A missing or false consent must be refused; the tool must not treat a model-invented flag as sufficient if the host can require a human confirmation step
Suggested outputs:
- a local pin (hash / state root) for what was written
- if and only if Hub publish was requested and consented, a public pack or publication identifier from hub.knolo.dev
- a receipt or audit id for the write/publish action
- a clear error if consent is missing, if the destination is unavailable, or if verification/pinning fails
Hosts should treat knolo_share as a side-effecting tool (not read-only) and should prefer an explicit user confirmation before a Hub publish.
Why this benefits the Ollama ecosystem
- Open, model-agnostic contract. Any tool-capable Ollama model and any
/api/chator MCP-capable client can call the same two functions. The protocol is the tools and their schemas, not a Knolo-specific client. - Shared, optional community knowledge. Combined with the Hub (#143, #119), users who opt in can search and publish knowledge packs that other local models can cite, instead of each maintaining a private, incompatible store.
- Reproducible grounded answers. Cited snippets plus pins/receipts give a way to check why a local model said something, and to replay the evidence later.
- No vendor lock-in. Other projects can implement compatible
knolo_search/knolo_shareservers. Clients should be able to point at any compatible server. - Fits how Ollama actually works today. It uses the existing tool-calling API and the existing MCP-client ecosystem, rather than inventing a new runtime inside Ollama or waiting on native MCP support in Ollama itself.
Suggested deliverables (for human design, not for automatic implementation)
- A short protocol write-up: tool names, input/output schemas, privacy defaults, and consent rules for Hub publish
- An Ollama tool-definition document (the
toolsarray entries) and an MCP tool listing that match that protocol - A decision on packaging: reuse
@knolo/mcpwith an opt-in write profile, or a separate Ollama-facing entry point that keeps the current read-only MCP contract unchanged - Docs for an Ollama user: attach the tools to a tool-capable local model, search a local knowledge base offline, and (optionally) publish to hub.knolo.dev with consent
- Notes so a third party could implement a compatible server without depending on a single vendor's runtime
Open questions
- Should
knolo_sharelive behind a separate write-capable server or profile so@knolo/mcpcan stay read-only by default (#79, and the out-of-scope note on #143)? - For Hub publish, is a tool argument such as
consent: trueenough, or should the host always require an out-of-band human confirmation? - Should the first version of
knolo_searchbe local-only, with Hub search as a later, explicit scope? - Is a thin Ollama-oriented wrapper enough (MCP server + example
/api/chattool definitions), or is a first-class install path for common Ollama clients in scope here versus under #143's one-install plan? - Should verify/status/get remain Ollama-facing tools as well, matching
@knolo/mcp, or are search and share the only tools this proposal should add to the Ollama surface?
Out of scope
- Implementing this automatically, opening PRs, or publishing packages from this issue
- Changing Ollama itself, or claiming that Ollama has native MCP support
- Replacing or silently widening the read-only contract of
@knolo/mcpwithout an explicit design decision - Hub-service internals (hub.knolo.dev is the public catalog address; Hub-side work is tracked separately, see #143)
- Host-specific private paths, rosters, or one person's computer layout
- Training or fine-tuning an Ollama model on Knolo data
Related
- #79 (closed):
@knolo/mcp, the existing read-only MCP server (knolo_search,knolo_get,knolo_verify,knolo_status). This proposal should reuse that search contract where possible. - #143 (open): Knolo Hub community sharing at hub.knolo.dev, and a one-install path for agent hosts.
knolo_shareand optional Hub search should align with that plan rather than invent a second catalog. - #119 (closed): skill packs that users create and share on a hub (starting point for publish/install).
A human maintainer will review and implement this manually.