Knolo MCP in Microsoft Agent Framework: A Pinned Python Example
Call the open-source Knolo MCP server (@knolo/mcp 0.2.4) from Microsoft Agent Framework in Python: pinned deps, query receipts, and a smoke test that never calls a model.
Knolo is the open-source, local-first Knowledge Image runtime and format: you pack knowledge into a portable image, pin it by digest, mount it locally and verify what was used. It is Apache-2.0 and ships as @knolo/core on npm. This week the Knolo GitHub repo gained a Python example that calls the published Knolo MCP server from Microsoft Agent Framework (PR #203, merged 18 November 2026). No package version changed: the example uses @knolo/mcp@0.2.4, the release already on npm.
What the Knolo example does
The example lives in examples/microsoft_agent_framework_python, with a guide at docs/integrations/microsoft-agent-framework.md. It starts the Knolo MCP server over stdio, lists its four tools, runs one knolo_search and one knolo_verify, and checks that a query receipt landed in the audit directory.
The command the host runs is the same one any MCP client uses:
npx -y @knolo/mcp@0.2.4 --config /absolute/knolo-mcp.json
A mount exposes knolo_search, knolo_get, knolo_verify and knolo_status. Pins, policy and the audit directory stay in the config file, and tool arguments cannot set the caller. See the Knolo MCP server docs for the config format.
Wiring Knolo into an Agent Framework agent
Agent Framework 1.26.0 exposes MCPStdioTool and Agent from agent-framework-core. That release does not export ChatAgent, so the example uses Agent:
from agent_framework import Agent, MCPStdioTool
tool = MCPStdioTool(
name="knolo",
command="npx",
args=["-y", "@knolo/mcp@0.2.4", "--config", "/absolute/knolo-mcp.json"],
load_prompts=False,
)
async with tool:
agent = Agent(
client=client,
name="knolo_reader",
instructions=(
"Answer from knolo_search only. Include each receipt id and "
"object id. A receipt checks integrity. It does not mean a "
"claim is proven."
),
tools=tool,
)
client is your own chat client. Knolo does not choose a model and does not call one.
The requirements pin agent-framework-core==1.26.0, mcp==2.3.0 and tenacity==9.2.1. The example skips the umbrella agent-framework package because it installs every host extra, and it adds tenacity because MCPStdioTool raises ModuleNotFoundError without it when the stdio client connects. You need Python 3.11 or newer:
python -m pip install -r examples/microsoft_agent_framework_python/requirements.txt
What the Knolo smoke test checks
A CI job, agent-framework-smoke, installs those pins and runs the example against a shared fixture image. It does not construct a chat client and does not call a model. It checks four things:
- The server lists the four Knolo tools.
knolo_searchwrites anopenclaw-knolo-query-v1receipt before it returns hits, and the receipt file appears inauditDir.knolo_verifythen returnsvalid: true.- An unwritable audit directory makes
knolo_searchreturnAUDIT_UNAVAILABLEinstead of hits. - A pin mismatch makes the server exit with
IMAGE_INVALIDbefore it printsserving stdio, so an agent never sees tools for an image it did not pin.
What a Knolo receipt means
Verification checks the image bytes, the state root and the policy root. A valid receipt means that check ran for the query. It does not mean a passage is true, safe or complete, which is why the agent instructions tell the model to report receipt and object ids rather than treat them as proof. The Knolo query receipts docs and Knolo verification docs cover the details.
Next steps with Knolo
- Read the Knolo interoperability guide and the Knolo docs on knolo.dev.
- Clone the Knolo core repo on GitHub and run the example against your own pinned image.
- Follow the open specifications and KIPs behind the format on Knolo's open technology site, knolo.org.
Microsoft Agent Framework is a Microsoft project. This post describes an example in the Knolo repo that works with it; it does not imply any endorsement.
knolo · mcp · microsoft-agent-framework · python · knowledge-image