Weft: A Workspace Where the AI Sees Only What You Can

Open SourceAI AssistantMCP
Claude Anthropic API Model Context Protocol PostgreSQL pgvector Row-Level Security React Docker Compose Playwright Claude Code

Project Overview

Who

Small teams that want chat, documents, and an AI assistant in one place, without the assistant seeing more than the person asking. Right now I'm its main user.

What

A self-hosted collaboration suite in one browser tab. Apps open as tabs from a home screen next to a chat rail: documents, a wiki, whiteboards, spreadsheets, tables, a calendar, task lists, polls, files, and more.

The assistant is a chat participant. It answers only from what the person asking is allowed to see, and it links to where each answer came from. An MCP connector with its own OAuth sign-in lets Claude and other AI apps work in Weft as the person who connected them.

When

November 2026. It went live at weftteam.com the same month.

Where

It runs with Docker Compose on a small server at home. The code is on GitHub at alez0101/weft under the MIT license. I built it with Claude Code as my coding agent.

Why

Most workspaces add AI on top and trust it to behave. I wanted the opposite: one permission rule, enforced by the database, that the assistant and outside agents can't get around. It's the same idea as my governed AI access at work, applied to a whole workspace.

Controls

  • One rule decides who sees what: you see something only if you're a member of its space. Postgres enforces it with row-level security on every path, including the API, live updates, co-editing, search, and the assistant.
  • The assistant retrieves with the asker's own access. Search by meaning uses pgvector, and an embedding is only visible if its source row is.
  • Outside agents, through the MCP connector or a personal agent, read what their person can see. The database lets them change things only in that person's personal space.
  • Channel and project instructions stack in a fixed order: Weft's rules, then the channel's, then the project's, then each person's own.

Testing

The test suite builds its own separate stack and runs more than 2,000 checks across its suites, then removes it, so it never touches the live workspace. The checks include that restricted content never reaches the model for someone who can't see it. The assistant suite uses stand-ins for the model and the embedder, so tests make no paid API calls.

Still Open

It's a working prototype for small teams. It isn't hardened for large or hostile multi-tenant use, and only a few people have used it so far.

Stack & Tools

Assistant
Claude, Anthropic API, optional Ollama fallback
AI Apps
MCP connector with OAuth sign-in
Data & Permissions
PostgreSQL 17, pgvector, row-level security, PostgREST
Co-editing
Hocuspocus, Yjs, BlockNote, Excalidraw
App
React, Vite, nginx
Testing
Separate test stack, 2,000+ checks, Playwright
Hosting
Docker Compose