Web Over Ollama (and Llamas) โ an MCP + OpenAI router for AI desktops.
Project description
woollama
Web Over Ollama (and Llamas). An MCP + OpenAI router for AI desktops.
๐ Documentation: woollama.readthedocs.io
woollama sits between AI clients (Cursor, the OpenAI SDK, Claude Desktop, cosmic-fabric, anything that speaks OpenAI or MCP) and AI backends (Ollama, Anthropic, fabric, lackpy, filesystem MCPs, anything that speaks OpenAI or MCP). It composes them into orchestrated calls without inventing a new protocol.
โโโโโโโโโโโโโโโโโโโโโโโ
โ AI clients โ
โ (any OpenAI or โ
โ MCP client) โ
โโโโโโโโโโโโฌโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
โ woollama โ
โ OpenAI server + MCP server โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ routes models, tools, executors โ
โ composes patterns + tools + models โ
โ into named recipes โ
โโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโ
โ โ
โโโโโดโโโโโ โโโโโโดโโโโโ
โ MCP โ tools, prompts, resources โ OpenAI โ inference
โ tool โ โ compat โ
โ serversโ โ backendsโ
โโโโโโโโโโ โโโโโโโโโโโ
fabric-mcp, lackpy, Ollama, Anthropic,
filesystem, git, โฆ vLLM, llama.cpp, โฆ
Status
Python prototype โ multi-backend router, both surfaces live. woollama works end-to-end as:
- an OpenAI-compatible server:
/v1/chat/completions(pass-through and hidden chat-loop orchestration of recipes, both withstream:trueโ OpenAI SSE),/v1/models,/v1/tools, and a stateful surface โ/v1/responses+/v1/conversations(OpenAI Responses/Conversations shape; see below); - an MCP server to its own clients โ over stdio (
woollama mcp) and over Streamable HTTP at/mcp, mounted on the same port as/v1/*. It re-exports every discovered downstream tool (namespaced, withoutput_schema) plus achatverb that emits live tool-progress notifications โ i.e. it's an MCP aggregator.
It routes inference across multiple backends by <provider>/<model> โ
ollama (local), anthropic, openai, groq, together, openrouter, and
any OpenAI-compatible endpoint you add in inferencers.toml (e.g.
self-hosted vLLM) โ plus claude-code/<model>, a keyless path to Claude via the
local CLI (tool-less, or as an executor that runs a recipe's allow-listed
MCP tools itself โ tool delegation). Config is file-driven (mcp.json,
recipes.toml, inferencers.toml).
Stateful conversations route handles; backends own the state โ woollama
never stores transcripts in its own system. Two state-owning backends:
claude-resume (claude --resume, for claude-code models; keyless, the Claude
session owns the bytes) and managed-agents (Anthropic's Managed Agents, for
claude-agent models; ANTHROPIC_API_KEY, Anthropic hosts the session โ and
exposes the transcript, so /v1/conversations/{id}/items works). Models with no
state-owning backend (ollama/cloud/recipe) are stateless โ the caller owns
history (store:false). Long-lived MCP
connections. Served on both a Unix socket ($XDG_RUNTIME_DIR/woollama.sock,
mode 0600 โ the default for local MCP clients) and an ephemeral loopback TCP
port; never 0.0.0.0 without explicit opt-in.
Not production-ready. Current status and what's next live in
docs/roadmap.md.
Implementation note: woollama will be a Rust program at v1.0. The Python in
src/woollama/is a prototype used to iterate the architecture quickly. The Rust port lands when the design surface is stable. Seedocs/rust-transition.mdfor the explicit transition criteria.
See docs/architecture.md for the full target design and
docs/build-log.md for the slice-by-slice history.
Quick taste
The router is OpenAI-compatible, so any OpenAI client can drive it:
import openai
c = openai.OpenAI(base_url="http://127.0.0.1:<port>/v1", api_key="x")
# Pass-through to Ollama
r = c.chat.completions.create(
model="ollama/qwen3:14b-iq4xs",
messages=[{"role": "user", "content": "Hi"}],
)
# Orchestrated: a recipe (system prompt + tools + model), transparent to the
# client. The chat-loop happens inside woollama; client sees only the final answer.
r = c.chat.completions.create(
model="woollama/streamer",
messages=[{"role": "user", "content": "Please count to 4."}],
)
woollama serves on two transports at once: a Unix socket at
$XDG_RUNTIME_DIR/woollama.sock (mode 0600 โ the default for local MCP clients,
since a connectable socket can spend the router's API keys) and an ephemeral
loopback TCP port written to $XDG_RUNTIME_DIR/woollama.addr for clients to
discover. The <port> above is that ephemeral port. Same pattern as a local
fabric --serve instance.
Install
The router is woollamad โ a small Rust daemon. The Python implementation is
kept as a reference server and the differential-test oracle (see below), but
woollamad is the canonical router.
From crates.io (once published โ cargo install ships only the binary, so
bring your own mcp.json):
cargo install woollama-server # installs the `woollamad` binary
woollamad # starts the router; prints its address
From this checkout (works today; includes the bundled example MCP servers):
git clone https://github.com/teaguesterling/woollama
cd woollama
cargo build --release # builds target/release/woollamad
./target/release/woollamad # starts the router; prints its address
On startup woollamad prints its OpenAI base_url (e.g.
http://127.0.0.1:<port>/v1) โ copy that into your OpenAI client. (It's also
written to $XDG_RUNTIME_DIR/woollama.addr for programmatic discovery, and it
serves the same surface over the woollama.sock unix socket.)
The Python reference server
The original Python implementation still runs and is used as the live oracle that
keeps woollamad honest:
uv sync # creates .venv and installs deps
uv run woollama # the Python reference server
Prerequisite for the examples below: they use
ollama/qwen3:14b-iq4xs, so install Ollama,ollama serve, andollama pull qwen3:14b-iq4xs. No Ollama? Use the keyless Claude path instead โmodel="claude-code/haiku"(needs theclaudeCLI logged in) โ or any cloud model with its key set (see Configuration).
Tests & lint
# Rust (woollamad): the daemon's own suites
cargo test --tests --features test-fixtures
cargo build --release # so the live oracle can spawn the binary
# Python: hermetic suite + lint
uv run --extra dev pytest # hermetic suite (live tests are opt-in: -m integration)
uv run ruff check . # lint โ the CI gate
# The live differential oracle โ same tests, against woollamad by default:
uv run --extra dev pytest -m integration # targets target/release/woollamad
WOOLLAMA_TEST_CMD="python -m woollama" \
uv run --extra dev pytest -m integration # opt in to the Python reference
CI (.github/workflows/ci.yml) runs the Rust + Python gates on every push to main and PR.
For the same lint gate locally on commit, opt into the pre-commit hook:
uv tool install pre-commit && pre-commit install
Lint only โ the project does not use ruff format (lines are hand-wrapped,
E501 is ignored), so there is no formatter step in either gate.
Design principles
- Two standards, neither extended. MCP for tool/prompt/resource discovery and execution; OpenAI chat-completions for the inference primitive. woollama is a router between them.
- Local-only, ephemeral by default. Random loopback port, persisted
address file for discovery, never
0.0.0.0without explicit opt-in. The router holds API keys and routes to local resources โ it should not be LAN-reachable. - The model namespace is the universal addressing scheme. Raw inferencers
(
<provider>/<model>, e.g.ollama/X,anthropic/X,claude-code/X) and full recipes (woollama/<recipe>) are all addressable through OpenAI's standardmodelfield. No new wire format. - woollama owns routing, not inference or tools. It uses other people's inference engines (Ollama, Anthropic, โฆ) and other people's tool servers (any MCP server โ filesystem, git, lackpy, โฆ). It composes them.
- she talks to llamas.
What works today
- OpenAI surface:
/v1/models,/v1/chat/completions(pass-through + recipe orchestration, both withstream:trueโ OpenAI SSE),/v1/toolsintrospection - Stateful surface:
/v1/responses(stateless subset, incl.stream:trueโ OpenAI Responses SSE, + stateful) and/v1/conversations(create/list/get/ delete, plusitemswhere the backend exposes its transcript). woollama routes conversation handles; backends own state (woollama never stores transcripts itself) โclaude-resumeforclaude-codemodels,managed-agents(Anthropic Managed Agents) forclaude-agentmodels, with an interactiverequires_actionpause/answer path; models with no state-owning backend are stateless (store:false) - Multi-backend routing by
<provider>/<model>: ollama (incl.num_ctxhonored via ollama's native/api/chat), anthropic, openai, groq, together, openrouter,claude-code, + any OpenAI-compatible endpoint viainferencers.toml - Tool delegation: a
claude-coderecipe with tools runs as an executor โ Claude owns the agentic loop and calls the recipe's allow-listed MCP tools itself (per-recipe--mcp-config+--allowedToolscontainment) - MCP server side: stdio (
woollama mcp) and Streamable HTTP at/mcpon the same port โ recipes as prompts, achatverb (with live tool-progress notifications), and every downstream tool re-exported with itsoutput_schema(aggregator) - File-driven config (
mcp.json,recipes.toml,inferencers.toml), multi- MCP-server discovery + unified tool registry, long-lived MCP connections - Recipe allow-list enforced as a security boundary (in-loop AND in delegation); served on a Unix socket + loopback TCP, address discovery file; CI (ruff + hermetic suite, 3.11/3.12)
Not yet (next on the roadmap)
- The live, interactive Claude-in-tmux session backend (a separate Rust session
driver) โ gated on spikes that need a real terminal. (The interactive
requires_actionpath itself already works via the managed-agents backend.) - A
store-backedconversations provider for non-claude models โ the woollama side is built behind an un-wired seam; it's pending the fabric session read/append contract (cross-repo) - cosmic-fabric actually consuming the conversations surface (the last v1.0 gate)
- The Rust v1.0 port
Full scorecard, ordering, and pending verifications:
docs/roadmap.md.
Origin
woollama is the production-grade rewrite of an architecture co-designed in cosmic-fabric, which remains a frontend (and will use woollama as its router engine). The design docs that brought woollama here:
docs/architecture.mdโ the model/tool/executor router designdocs/naming.mdโ how we landed on this name
License
MIT โ see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file woollama-0.5.2.tar.gz.
File metadata
- Download URL: woollama-0.5.2.tar.gz
- Upload date:
- Size: 250.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ac5fbf4ecd08e5658d516e0fcf86bc99d312c523232288583ade6b0c4cb9f1
|
|
| MD5 |
06a4f2f41cd5c6bce07bf7891c9dd6d3
|
|
| BLAKE2b-256 |
207741731c79ca4f2bbfa35762321808d72d2da73ffa320f757126bc857d2aec
|
Provenance
The following attestation bundles were made for woollama-0.5.2.tar.gz:
Publisher:
ci.yml on teaguesterling/woollama
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
woollama-0.5.2.tar.gz -
Subject digest:
14ac5fbf4ecd08e5658d516e0fcf86bc99d312c523232288583ade6b0c4cb9f1 - Sigstore transparency entry: 1809577179
- Sigstore integration time:
-
Permalink:
teaguesterling/woollama@c5903819273ff42ad34202d8470f413368f94f33 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/teaguesterling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c5903819273ff42ad34202d8470f413368f94f33 -
Trigger Event:
push
-
Statement type:
File details
Details for the file woollama-0.5.2-py3-none-any.whl.
File metadata
- Download URL: woollama-0.5.2-py3-none-any.whl
- Upload date:
- Size: 69.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83eec1c301d4cfcd7e3c13da1080de8fa02b9336bf52ebc38d2af64ea70d55c3
|
|
| MD5 |
05ff16a75aae17114bf5eb7b0a9623b9
|
|
| BLAKE2b-256 |
069781ac288b42e0ee451cfbb944ad60632cc0c5dfc769e73422ba0bbea4b6bb
|
Provenance
The following attestation bundles were made for woollama-0.5.2-py3-none-any.whl:
Publisher:
ci.yml on teaguesterling/woollama
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
woollama-0.5.2-py3-none-any.whl -
Subject digest:
83eec1c301d4cfcd7e3c13da1080de8fa02b9336bf52ebc38d2af64ea70d55c3 - Sigstore transparency entry: 1809577210
- Sigstore integration time:
-
Permalink:
teaguesterling/woollama@c5903819273ff42ad34202d8470f413368f94f33 -
Branch / Tag:
refs/tags/v0.5.2 - Owner: https://github.com/teaguesterling
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@c5903819273ff42ad34202d8470f413368f94f33 -
Trigger Event:
push
-
Statement type: