Skip to main content
Glama
workspaceAlberta

workspaceAlberta

README.md
# workspaceAlberta

[![workspaceAlberta MCP connector](https://glama.ai/mcp/connectors/com.warreandvavasour/workspacealberta/badges/score.svg)](https://glama.ai/mcp/connectors/com.warreandvavasour/workspacealberta)

workspaceAlberta lets your AI assistant search every open CanadaBuys and Alberta Purchasing Connection tender, rank them against your business, and tell you what closes next.

**Add to Claude:** [workspaceAlberta in Claude's connector directory](https://claude.ai/directory/connectors/workspacealberta)

**Claude Code:**

```bash
claude mcp add --transport http workspaceAlberta https://elbowsupknivesout.warreandvavasour.com/mcp
```

**Cursor** (`~/.cursor/mcp.json`) **/ VS Code** (`.vscode/mcp.json`, use `"servers"` in place of `"mcpServers"`):

```json
{
  "mcpServers": {
    "workspacealberta": {
      "type": "http",
      "url": "https://elbowsupknivesout.warreandvavasour.com/mcp"
    }
  }
}
```

**Try it:**

```text
I run a small general contractor in Red Deer, Alberta.
What construction tenders close in the next 7 days?
Give me the reference, buyer, closing time and official link for each.
```

You get open notices from both sources, soonest first: reference (for example `AB-2026-06788`), buyer, closing time in Alberta time, the official posting link and any Buy Canadian or other domestic-preference flag. It finds and ranks work. It does not submit bids or contact buyers.

- **Free, no account:** search, details, deadlines, matching, industrial support catalog, and the daily bid brief across both sources.
- **Free sign-in (C$0):** saved business profile, 5-tender watchlist, bid/no-bid scorecards, and **2 free tender document reviews** (`classify_tender` Requirements Board / Bid Room).
- **Bid Packs (C$19 / C$49) or Pro (C$85/mo):** pay per tender with non-expiring credits, or go unlimited with Pro (unlimited watchlist, Requirements Boards, E2B bid rooms, and Cohere Command A+ reviews). Sign in when a protected tool asks; [plans and pricing](https://elbowsupknivesout.warreandvavasour.com/pricing).

Keywords: Canadian procurement, CanadaBuys, Alberta Purchasing Connection, government tenders, bids, trades, construction, MCP server.

<p align="center">
  <img src="docs/assets/women-workers-collage.png" alt="Eight photographs of Canadian women building war industries: welding, machining, drafting, and finishing munitions, 1940-1945." width="100%">
</p>

<p align="center"><em>Canadian industrial war production, via Library and Archives Canada.</em></p>

## AI Ethics

Warre & Vavasour is a startup AI lab that does not replace human workers. We build a bigger pie.

Every capability we ship exists to amplify the people already doing the work, the same promise the photographs above made to the generation that industrialized this country.

If your idea starts with headcount cuts, it is not a WorkspaceAlberta plan.

Warre & Vavasour does not make apps or chatbots. Don't ask. If this is in your business plan, you are thinking about New Business wrong. We build terminals that deliver real work and pay real taxes.

Warre & Vavasour acknowledges the astonishing resources this technology is consuming. Training and inference carry real energy, water, and mineral costs. Nobody asked for this. No one really asked for GRPO to be released on January 20, 2025. But it was released, and that is how all models got to reasoning; and from reasoning, we have harnesses now.

So this is just the way the world is and it is far too cheap not to deploy post-human-scale reasoning tools on a desktop device that genuinely accelerates Canadian manufacturing, development, and industrialization.

So yes: we acknowledge the cost. But Canadian infrastructure, right-sized models on hardware you can touch, and Canadian data retention means your enterprise AI stack is entirely Canadian and NATO supplier friendly.

There is no longer an American dependency on enterprise, on device, Canadian AI at scale.

It is 1834 all over again.

The railroad has been built.

The steam engine has been designed.

The world as we know it has changed.

WorkspaceAlberta is the way to stay ahead of these changes.

## More Ways to Connect

The hosted MCP server is live and free for browsing — no install, no account, no API key. Point any MCP-capable assistant at it:

```
https://elbowsupknivesout.warreandvavasour.com/mcp
```

**Cursor, Claude Code, and other HTTP-native clients** — add to your MCP config:

```json
{
  "mcpServers": {
    "workspacealberta": {
      "url": "https://elbowsupknivesout.warreandvavasour.com/mcp"
    }
  }
}
```

**Claude Desktop** — add the URL under Settings > Connectors, or bridge with `mcp-remote`:

```json
{
  "mcpServers": {
    "workspacealberta": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://elbowsupknivesout.warreandvavasour.com/mcp"]
    }
  }
}
```

Then ask it something a real owner would ask:

- *"I run a CWB welding shop in Red Deer — what government work fits my shop right now?"*
- *"What closes this week? I don't want to miss anything."*
- *"Give me my morning brief — what fits us, and what's closing soon?"*

### Adding your Pro key

Search, details, deadlines, and the daily brief are open to everyone. Seven tools —
bid rooms, tender requirement lists, Cohere tender review, the three watchlist tools,
and bid/no-bid scorecards — need an active subscription. Clients that support OAuth
ask you to sign in the first time you use one. Subscribers can also use a key: it
arrives by email after checkout and starts with `wa_live_`.

Send it as an `Authorization` header. For HTTP-native clients:

```json
{
  "mcpServers": {
    "workspacealberta": {
      "url": "https://elbowsupknivesout.warreandvavasour.com/mcp",
      "headers": {
        "Authorization": "Bearer wa_live_YOUR_KEY"
      }
    }
  }
}
```

For the `mcp-remote` bridge, pass it as a header (no spaces around the colon in `args`):

```json
{
  "mcpServers": {
    "workspacealberta": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://elbowsupknivesout.warreandvavasour.com/mcp",
               "--header", "Authorization:${WA_AUTH}"],
      "env": { "WA_AUTH": "Bearer wa_live_YOUR_KEY" }
    }
  }
}
```

On a Linux workstation or a leased terminal, let the installer do it — it verifies the
key against the server, writes `~/.config/workspacealberta/credentials` at mode 600, and
registers the authenticated endpoint with whichever CLIs are present:

```bash
./installer/configure-subscriber-key.sh
```

Check a key at any time:

```bash
curl -H "Authorization: Bearer wa_live_YOUR_KEY" \
  https://elbowsupknivesout.warreandvavasour.com/me
```

**Run it locally instead** (the whole server is pure Python):

```bash
python -m pip install -r requirements.txt
python mcp-servers/canadabuys/server.py
```

Smoke test: `python -m unittest tests.test_canadabuys_mcp_smoke`. Client config variants live in [`mcp.json.example`](mcp.json.example); full tool and REST reference in [`docs/mcp-tool-reference.md`](docs/mcp-tool-reference.md).

---

## Canadian AI Security Is Canadian National Security

WorkspaceAlberta is a Canadian procurement intelligence workspace. It connects public tender data to the people who can actually do the work: fabricators, mills, contractors, shops, manufacturers, and the small teams that keep the real economy moving.

The direction is explicit:

- **Canadian demand signals:** CanadaBuys and Alberta Purchasing Connection in one search surface.
- **Canadian AI company:** Cohere as the first sovereign-model route.
- **Canadian open source model:** Command A+ `command-a-plus-05-2026`, with the W4A4 Hugging Face route available through `CohereLabs/command-a-plus-05-2026-w4a4`.
- **Canadian tools:** practical MCP wiring for the procurement sources Canadian firms already need to watch.
- **Canadian compute path:** designed so sensitive public-sector and industrial workflows can move toward Canadian infrastructure, including Canadian chips and data-centre capacity where those options are available.

The point is not nationalism as decoration. The point is operational independence.

If Canadian companies are going to bid Canadian work, understand Canadian supply chains, and protect Canadian industrial capacity, then the AI layer underneath that work matters.

---

## The Last Mile of Work

AI promised 5X productivity. Most small businesses got a chatbot that writes mediocre marketing copy.

The model is not the whole bottleneck. The connection is.

Wiring up the places where the work lives usually costs money, time, and technical patience a small business does not have. Government tender databases are a perfect example: the work is public, the demand is real, but the discovery process is still awkward enough that good companies miss good opportunities.

**WorkspaceAlberta solves the last mile** by giving an AI assistant the wiring it needs to search, compare, summarize, and brief public procurement opportunities from inside the workspace where the owner is already working.

<p align="center">
  <img src="docs/assets/helene-lalonde-textile.jpg" alt="Hélène Lalonde drawing in ends at a loom, Montreal Cottons, Valleyfield." width="100%">
</p>

<p align="center"><em>Hélène Lalonde drawing in ends at Montreal Cottons, Valleyfield — Nicholas Morant / National Film Board of Canada. Photothèque / Library and Archives Canada, PA-160566 (copyright expired).</em></p>

---

## What This Actually Does

WorkspaceAlberta is an MCP-first workspace for Canadian procurement.

It now brings together:

- **CanadaBuys** for federal tender notices
- **Alberta Purchasing Connection** for Alberta public-sector opportunities
- **Cohere Command A+** for optional tender analysis and fit review
- **A daily bid brief** that summarizes the market, best-fit matches, and deadlines from both sources

<p align="center">
  <img src="docs/assets/welder-robin-nodwell-calgary-1963.jpg" alt="A welder at Robin Nodwell Ltd., Calgary, 1963." width="55%">
</p>

<p align="center"><em>Welder at Robin Nodwell Ltd., Calgary, 1963 — from the Provincial Archives of Alberta series "What Alberta Makes Makes Alberta" (PA3324, no known copyright restrictions).</em></p>

The assistant can:

- search national and Alberta opportunities together
- inspect a posting by reference number
- list what is closing soon
- match opportunities against a saved business profile
- generate a free daily brief for the owner or estimator
- use Cohere Command A+ to review tender fit, risks, requirements, and next actions

This is meant to answer practical questions:

- What work is open right now?
- Which opportunities fit what we actually do?
- What closes soon?
- What should we read first?
- What should we ignore?

---

## The Custom Procurement MCP Server

The custom MCP server is the product.

It is a deployed working endpoint that knows the live public procurement pipeline exposed by **CanadaBuys** and **Alberta Purchasing Connection**. It can serve that pipeline back to users through an AI assistant based on what they do, where they work, what they can supply, and what deadlines matter.

The core tools are:

- `search_opportunities` for unified federal and Alberta search
- `get_opportunity_details` for a single posting by reference number
- `list_deadlines` for what is closing soon
- `find_matching_opportunities` for profile-based ranking
- `find_business_fit` for a free-text business description, classified with TypeSafe Jev after a commodity-code prefilter
- `daily_bid_brief` for the daily owner/operator summary
- `analyze_contract_with_cohere` for optional Cohere Command A+ tender review
- `process_bid_room` for live E2B attachment processing: Cohere Parse turns tender PDFs and images into markdown, then Command A+ reviews the evidence
- `classify_tender` for a bidder-requirement checklist: tender PDFs are split into clauses, each clause and page is classified with TypeSafe Jev, and the results merge into one requirement per tag with connector, lead time, pages and evidence (see [`pipelines/requirement_classifier/`](pipelines/requirement_classifier/README.md))
- `watch_opportunity` / `list_watchlist` for a persistent tracking list with closing-date countdowns
- `bid_no_bid_scorecard` for a fast deterministic go/caution/no-go read on any reference (including a historical-awards teaser)
- `get_buyer_award_history` for historical contract awards across CanadaBuys open data and Alberta APC: past winners, disclosed award values (min/median/max CAD), incumbent repeat-winner detection, and APC interested-supplier competition counts
- `submit_feedback` when an agent hits a bug, a missing capability, or a confusing tool. A person reviews it. It does not open a pull request.
- `match_industrial_support_programs` for a read-only industrial and tariff support catalog, with Ontario-only streams labeled for Alberta firms

The full tool and REST reference lives in [`docs/mcp-tool-reference.md`](docs/mcp-tool-reference.md); the architecture walkthrough is [`docs/architecture.md`](docs/architecture.md).

MCP is the first-class interface because this is meant to be used by agents. The same procurement core also exposes REST/OpenAPI so other AI tools can hook into the same contract intelligence without needing native MCP support.

Underneath the endpoint is pure Python procurement logic. The data processing, filtering, matching, deadline ranking, and brief generation do not require an LLM. The model layer is added only where judgment helps: risk review, requirements explanation, and bid/no-bid reasoning.

E2B sandboxes are the isolated compute layer for heavier bid-room work: opening tender packages, turning attachments into evidence, and returning structured bid artifacts without putting unknown user files inside the always-on MCP service. `classify_tender` reads tender PDF text without E2B: each PDF is parsed in a separate OS process inside the Cloud Run container, with no secrets in its environment and CPU, memory and time limits. That is process isolation, not a sandbox VM. Cohere Parse is the document layer — it converts PDF pages and images into structured markdown (tables, forms, drawings) before review. Command A+ is the review layer: it runs inside the short-lived sandbox with read-only evidence tools over that markdown. If Parse is unset, times out, or rejects a file, the existing pdfminer/python-docx/openpyxl extractors stay as fallback. The build plan lives in [`docs/e2b-bid-room-plan.md`](docs/e2b-bid-room-plan.md), and the business-owner operating diagram lives in [`docs/bid-room-operating-diagram.md`](docs/bid-room-operating-diagram.md).

### Tool calling: how the MCP tools map to Cohere

Every procurement tool is exposed to the model through one uniform
function-calling path. There is no per-tool glue: whatever the MCP server
declares, the model sees.

**The tool families.** Federal (CanadaBuys): `search_contracts`,
`get_contract_details`, `list_upcoming_deadlines`, `summarize_contracts`,
`refresh_data`. Unified search across both sources: `search_opportunities`,
`get_opportunity_details`, `list_deadlines`. Profile and matching:
`set_business_profile`, `get_my_profile`, `find_opportunities`,
`find_matching_opportunities`, `daily_bid_brief`, `find_business_fit`,
`match_industrial_support_programs`. Alberta Purchasing
Connection: `search_alberta_opportunities`, `get_alberta_opportunity_details`,
`list_alberta_deadlines`, `summarize_alberta_opportunities`,
`find_alberta_opportunities`. Model review and bid-room:
`check_cohere_status`, `analyze_contract_with_cohere`, `process_bid_room`,
`classify_tender`.
Persistence and decisions: `watch_opportunity`, `list_watchlist`,
`unwatch_opportunity`, `bid_no_bid_scorecard`. Search, details, deadlines,
summaries, refresh, and profiles are free; the heavier judgment surfaces
(bid rooms, requirement classification, Cohere tender review, the watchlist,
bid/no-bid scorecards)
require the Pro key on the `Authorization` header.

**The wire path, desk to model and back.** The MCP server is mounted in the
desk harness as the `workspace_alberta` server (Streamable HTTP). Each tool's
MCP declaration — name, description, JSON-schema parameters — becomes a
harness tool, and the Cohere adapter (`cohere-v2-chat` in the harness's
`llm-pi-ai` package) serializes the whole set into the Chat API v2 request as
`tools: [{type: "function", function: {name, description, parameters}}]` —
OpenAI-style wrapping, JSON Schema parameters, no per-tool special-casing.

Command A+ (`command-a-plus-05-2026`, 436k context, reasoning + vision +
tools) then decides what to call. The answer streams as SSE: chain-of-thought
arrives as `thinking` content blocks (with `tool-plan-delta` events during
tool-turn planning), and each call arrives as `tool-call-start/-delta/-end`
events with the arguments as JSON-string fragments; `finish_reason` comes
back as `TOOL_CALL`. The harness executes the call against the MCP server
and replays the result as a `role: "tool"` message carrying the output as a
JSON-object string (a v2 requirement — free text is wrapped as
`{"output": ...}` so the endpoint can parse it and attach citations), with
the assistant's own turn replayed as `thinking` content blocks plus
`tool_calls`. The loop repeats — the model chains as many tools as the task
needs — until `finish_reason: COMPLETE`. A real morning check on the desk ran
13 tool calls across 14 model steps in one turn (data refresh, summaries,
deadline scans, watchlist, and per-opportunity detail lookups) with zero
failures.

**Two wire rules learned the hard way** (both verified against the live
endpoint, 2026-09-18):

- `strict_tools` is **opt-in, never forced**. Strict mode makes the endpoint
  enforce parameter schemas on generated calls, but it also rejects the
  JSON-schema composition keywords (`oneOf`, `anyOf`, `allOf`) that harness
  and MCP tool schemas legitimately use — a forced `true` failed every
  tool-bearing turn with `composition constraints not supported: oneOf`. The
  adapter therefore sends `strict_tools` only when the model's
  `supportsStrictMode` compat flag opts in; tool-call reliability has been
  fine without it.
- Assistant **plans replay as `thinking` content blocks, never as
  `tool_plan`**. The endpoint rejects `tool_plan` on replayed messages for
  Command A-class models (`tool plan cannot be used with this model`), even
  though it emits plan-style events itself while streaming.

The adapter lives in the harness repo
(`packages/llm/llm-pi-ai/src/cohere-v2-chat*.ts`); the desk mounts the server
through `workspace-alberta.patch.yml` (`mcp-workspace-alberta`). Adding a new
MCP tool requires no adapter change: declare it on the server and the next
turn sees it as a callable function.

<p align="center">
  <img src="docs/assets/machinist-canada-oil-tool-calgary-1963.jpg" alt="A machinist at Canada Oil Tool Manufacturing, Calgary, 1963." width="55%">
</p>

<p align="center"><em>Machinist at Canada Oil Tool Manufacturing, Calgary, 1963 — precision work for the energy sector. Provincial Archives of Alberta, PA3318/2 (no known copyright restrictions).</em></p>

---

## Why This Matters

Get 50% of the population 10% better. Every year. That is generational growth.

Not 10 developers 500% better. That is happening. But it does not scale to the economy.

*"How do I save 5 hours a week?" "How do I save $700 a month?"*

Those are the real questions. This is how you answer them.

Alberta's **steel, lumber, and metals** industries represent over **2,500 companies** with a combined economic impact exceeding **$37 billion annually**.

| Sector | Companies | Economic Impact | Jobs Supported |
|--------|-----------|-----------------|----------------|
| Forestry & Wood Products | 676+ businesses, 40 major mills | $14 billion | 41,400 |
| Fabricated Metal Products | 1,871 establishments | $23.4B manufacturing sector | 16,600 |
| Primary & Machinery Manufacturing | 200+ facilities | Included above | 12,000+ |

<p align="center">
  <img src="docs/assets/collage-what-alberta-makes.jpg" alt="Three photographs of workers pouring steel at the Foothills Steel Foundry, Calgary, 1963." width="100%">
</p>

<p align="center"><em>What Alberta makes makes Alberta — the pour at Foothills Steel Foundry, Calgary, 1963. Provincial Archives of Alberta, PA3315.1–.3 (no known copyright restrictions).</em></p>

Behind every one of these companies are dozens of systems that need to talk to each other just to get anything done: quoting software, inventory spreadsheets, accounting packages, project trackers, supplier portals, and government tender databases.

Any tool that helps a fabricator **create demand**, a mill **manufacture more efficiently**, or a contractor **cut costs** has multiplier effects across the entire province:

- **$4 billion** in forest product exports alone
- **$1.6 billion** in annual wages paid to forestry workers
- **70 communities** across Alberta that depend directly on these industries
- **$988 million** in tax revenue flowing back to the province

<p align="center">
  <img src="docs/assets/clothing-salvage-geco.jpg" alt="Clothing salvage centre at the General Engineering Company munitions factory, Scarborough, circa 1943." width="49%">
  <img src="docs/assets/victory-gardens-toronto-1943.jpg" alt="A.J. Denne tending a V-shaped victory garden at 15 Pine Crescent, Toronto, 5 June 1943." width="49%">
</p>

<p align="center"><em>Home-front salvage and food: a clothing depot at the GECO munitions works, Scarborough, c. 1943 (Archives of Ontario, I0004928, public domain); A.J. Denne's victory garden, Toronto, 5 June 1943 (City of Toronto Archives, fonds 1266, CC BY 2.0).</em></p>

More contracts won. More jobs kept. More skill developed. More value staying here at home.

---

## Technical Notes

MCP server:

- [`mcp-servers/canadabuys/server.py`](mcp-servers/canadabuys/server.py)
- [`mcp-servers/canadabuys/server_http.py`](mcp-servers/canadabuys/server_http.py) for hosted StreamableHTTP MCP plus REST/OpenAPI
- [`procurement_core/service.py`](procurement_core/service.py) for the shared Python procurement core
- [`procurement_core/e2b_bid_room.py`](procurement_core/e2b_bid_room.py) for live E2B bid-room sandbox processing

Smoke test:

- [`tests/test_canadabuys_mcp_smoke.py`](tests/test_canadabuys_mcp_smoke.py)
- [`tests/test_procurement_http_app.py`](tests/test_procurement_http_app.py)
- `python scripts/e2b_bid_room_smoke.py` for a live E2B sandbox test

Configuration:

- [`AGENTS.md`](AGENTS.md) for Codex/OpenClaw guidance
- [`mcp-servers/canadabuys/README.md`](mcp-servers/canadabuys/README.md) for server tools and environment variables
- [`docs/setup-productization-track.md`](docs/setup-productization-track.md) for the combined WorkspaceAlberta + private `wvsetup` setup track
- [`docs/codex-setup.md`](docs/codex-setup.md) for local setup notes
- [`docs/workspace-alberta-hermes-install.md`](docs/workspace-alberta-hermes-install.md) for the branded Hermes / Raspberry Pi setup draft

Raspberry Pi terminal setup:

- [`docs/deployment-ops/pi-out-of-box-setup.md`](docs/deployment-ops/pi-out-of-box-setup.md) — **start here** for new Pi setups, from sealed box to working CEO stack
- [`docs/deployment-ops/ceo-pi-setup.md`](docs/deployment-ops/ceo-pi-setup.md) — software installer reference (assumes OS already installed)
- [`docs/deployment-ops/tailscale-pi-remote-support.md`](docs/deployment-ops/tailscale-pi-remote-support.md) — remote support via Tailscale

Data and model sources:

- CanadaBuys open tender notices
- Alberta Purchasing Connection public opportunity API
- Cohere Command A+ via Cohere API
- CohereLabs Command A+ W4A4 on Hugging Face: <https://huggingface.co/CohereLabs/command-a-plus-05-2026-w4a4>

Image source notes live in [`docs/imagery-sources.md`](docs/imagery-sources.md).

<p align="center">
  <img src="docs/assets/collage-museum-wall.jpg" alt="A museum wall of Canadian industrial and home-front photography: munitions, victory gardens, synthetic rubber, and shops." width="100%">
</p>

<p align="center"><em>The museum wall. Top row: inspecting ammunition at GECO, Scarborough, c. 1943 (Archives of Ontario, I0058215, public domain); the Perry sisters in the plant vegetable garden, Dominion Arsenals, 24 August 1942 (Harry Rowed / NFB Photothèque / LAC, CC BY 2.0); cutting cloth for military uniforms at Tip Top Tailors, Toronto, 1939–45 (Gordon W. Powley / Archives of Ontario, C 109-2-0-18, copyright expired); assembling a coal-pulverizing mill at Polymer Rubber, Sarnia, October 1943 (Harry Rowed / NFB Photothèque / LAC, e000761792, copyright expired). Bottom row: a machinist laughing at Small Arms Limited, 26 May 1942 (Nicholas Morant / LAC, e000760725, CC BY 2.0); welding Bren-gun magazine clips at John Inglis, April 1944 (Ronny Jaques / LAC, e000762114, CC BY 2.0); packing crates at GECO, c. 1943 (Archives of Ontario, I0004900, public domain); assembling a Bren-gun blank at John Inglis, 10 May 1941 (NFB Photothèque / LAC, e000760439, copyright expired).</em></p>

---

*Data sources: [Statistics Canada](https://www150.statcan.gc.ca), [Innovation Canada](https://ised-isde.canada.ca), [Alberta Forest Products Association](https://albertaforestproducts.ca), [Job Bank Canada](https://www.jobbank.gc.ca)*