flaiwheel
Flaiwheel is a self-hosted MCP memory and governance layer that lets AI coding agents search, write, validate, and maintain structured engineering knowledge across projects.
Search the entire knowledge base semantically, with filtered searches for bugfixes, tests, or document types.
Retrieve file-specific context and recent session summaries to restore temporal and spatial project knowledge.
Write structured docs for bugfixes, architecture, APIs, best practices, setup, changelogs, and test cases.
Validate markdown before committing and inspect document relations and git timelines.
Check index stats, reindex changed files, pull from git then reindex, and run knowledge-quality checks.
Manage multiple projects, bind sessions to a project, and list project health/stats.
Analyze knowledge repos for duplicates/misplacements, execute safe cleanup moves, and classify documents for migration.
Run cold-start codebase analysis server-side and check for Flaiwheel updates.
Save session summaries so future sessions can recover decisions, open questions, and modified files.
Automatically captures engineering knowledge from commit messages and manages a dedicated repository of structured documentation via Git-native automation.
Leverages the GitHub CLI (gh) for secure authentication and synchronization of the persistent knowledge layer across distributed engineering teams.
Integrates with VS Code Copilot to provide high-precision context from previous bug fixes and architectural decisions during active coding sessions.
Stores and governs all engineering knowledge, including bugfix summaries and best practices, as structured flat Markdown files within the user's infrastructure.
Directs AI agents to create and maintain self-updating Mermaid.js diagrams for system components and technical flows within the project documentation.
Flaiwheel
Self-hosted memory & governance layer for AI coding agents. Turn every bug fix into permanent knowledge. Zero cloud. Zero lock-in.
π Why Flaiwheel Exists
AI coding agents forget everything between sessions. That leads to repeated bugs, lost architectural decisions, and knowledge decay.
Flaiwheel ensures:
Agents search before coding
Agents document after fixing
Commits automatically capture knowledge
Memory compounds over time
Every bug fixed makes the next bug cheaper.
Related MCP server: MCP VectorStore Server
π§ How Flaiwheel Is Different
Persistent AI Memory That Compounds β knowledge doesn't reset between sessions.
Git-Native Automation β commits automatically become structured knowledge.
Governance, Not Just Storage β quality gates + enforced documentation.
Hybrid Search + Reranking β high-precision context for real codebases.
Fully Self-Hosted β single Docker container, no external infrastructure.
Zero Lock-In β all knowledge stored as structured flat files in Git.
β Who Flaiwheel Is For
Engineering teams using AI coding assistants in real projects
Codebases where repeated bugs are expensive
Teams requiring full data control
AI-native development environments
β Not For
Small hobby projects under a few thousand lines
Developers who just want better autocomplete
Pure SaaS workflows with no interest in self-hosting
π Where Flaiwheel Fits
AI coding tools generate code.
RAG tools retrieve documents.
Flaiwheel governs and compounds structured engineering knowledge inside your own infrastructure.
It does not replace your AI assistant. It makes it reliable at scale.
π Whitepaper (PDF) β Vision, architecture, and design in depth.
βοΈ Key Technical Features
Flaiwheel is a self-contained Docker service that operates on three levels:
Pull β agents search before they code (search_docs, get_file_context)
Push β agents document as they work (write_bugfix_summary, write_architecture_doc, β¦)
Capture β git commits auto-capture knowledge via a post-commit hook, even without an AI agent
Indexes your project documentation (
.md,.pdf,.html,.docx,.rst,.txt,.json,.yaml,.csv) into a vector databaseProvides an MCP server that AI agents (Cursor, Claude Code, VS Code Copilot) connect to
Hybrid search β combines semantic vector search with BM25 keyword search via Reciprocal Rank Fusion (RRF) for best-of-both-worlds retrieval
Cross-encoder reranker β optional reranking step that rescores candidates with a cross-encoder model for significantly higher precision on vocabulary-mismatch queries
Behavioral Directives β AI agents silently search Flaiwheel before every response, auto-document after every task, and reuse before recreating β all without being asked
get_file_context(filename)β pre-loads spatial knowledge for any file the agent is about to edit (complementsget_recent_sessionsfor full temporal + spatial context)post-commit git hook β captures every
fix:,feat:,refactor:,perf:,docs:commit as a structured knowledge doc automaticallyLiving Architecture β AI agents are instructed to maintain self-updating Mermaid.js diagrams for system components and flows
Executable Test Flows β test scenarios are documented in machine-readable BDD/Gherkin format (
Given,When,Then) for QA automationLearns from bugfixes β agents write bugfix summaries that are instantly indexed
Structured write tools β 7 category-specific tools (bugfix, architecture, API, best-practice, setup, changelog, test case) that enforce quality at the source
Structured relations (v1) β
relations()andtimeline()derive a per-project knowledge graph from optional YAML frontmatter on existing docs (id,replaces,depends_on,fixes,implements,status). No second store β markdown stays canonical and Git history is the validity windowPre-commit validation β
validate_doc()checks freeform markdown before it enters the knowledge base, including unknown-relation-key warningsIngest quality gate β files with critical issues are automatically skipped during indexing (never deleted β you own your files)
Auto-syncs via Git β pulls AND pushes to a dedicated knowledge repo
Tool telemetry (persistent) β tracks every MCP call per project (searches, writes, misses, patterns), detects knowledge gaps, and nudges agents to document β persisted across restarts and visible in the Web UI
Impact metrics API β
/api/impact-metricscomputes estimated time saved + regressions avoided; CI pipelines can post guardrail outcomes to/api/telemetry/ci-guardrail-reportProactive quality checks β automatically validates knowledge base after every reindex
Knowledge Bootstrap β "This is the Way": analyse messy repos, classify files, detect duplicates, propose a cleanup plan, execute with user approval (never deletes files)
Cold-Start Codebase Analyzer β
analyze_codebase(path)scans a source code directory entirely server-side (zero tokens, zero cloud). Uses Python's built-inastmodule for Python, regex for TypeScript/JavaScript, the existing MiniLM embedding model for classification and duplicate detection. Returns a singlebootstrap_report.mdwith language distribution, category map, top 20 files to document first ranked by documentability score, duplicate pairs, and coverage gaps. Reduces cold-start token cost by ~90% on legacy codebases.Multi-project support β one container manages multiple knowledge repos with per-project isolation
Includes a Web UI for configuration, monitoring, and testing
Whatβs New in v3.16.0 β Dependency security refresh
Docker builds apply available Debian security updates, including the native Brotli decoder fix for CVE-2026-111497.
Security constraints require patched Pillow, filelock and Python packaging tools, and prevent vulnerable optional Python Brotli bindings from entering the image.
Gitleaks 8.30.1 is rebuilt with patched Go dependencies. CPU-only PyTorch remains in use.
The runtime uses
uvfor maintenance installs instead of pip and its bundled libraries.Rebuild and replace the container to receive dependency updates; preserve both data volumes and existing deployment settings. MCP client configuration is unchanged.
For a manual build with fresh dependency layers:
docker build --pull --no-cache --build-arg FLAIWHEEL_VERSION=3.16.0 -t flaiwheel:3.16.0 .security-constraints.txt applies to the image build. For a source installation,
pass -c security-constraints.txt to pip install. Constraints do not install
optional packages by themselves.
Whatβs New in v3.15.3 β Plain HTTP remains the default
A new installation uses
http://host:8081/sse. This is the recommended configuration until the Web UI provides TLS activation, CA download, and operating-system installation instructions. An update preserves its existing mode unlessFLAIWHEEL_TLS_AUTO=0or1is set explicitly.Automatic TLS remains available as an opt-in feature. The generated certificate is valid, but Cursor/Electron and other clients may require the Flaiwheel CA to be installed in the operating-system trust store.
FLAIWHEEL_TLS_AUTO=0now explicitly returns an existing TLS-enabled installation to HTTP while preserving its volumes and otherMCP_*settings.Leaving
FLAIWHEEL_TLS_AUTOunset during an update preserves the currently deployed mode.
v3.15.2 TLS caveat
v3.15.2 corrected endpoint schemes and certificate persistence, but its direct-SSE client guidance was incomplete. An env block containing NODE_EXTRA_CA_CERTS does not necessarily control TLS for a direct Cursor/Electron SSE connection. Direct clients may require the generated CA in the operating-system trust store. Use the default HTTP endpoint unless you have completed that trust step.
Whatβs New in v3.15.0 β Flaiwheel issues its own TLS certificate
A LAN deployment can now be encrypted without the operator touching a certificate tool. No public CA will issue for
192.168.178.230, so the only previous options wereopensslby hand or a proxy. SetMCP_SSE_TLS_AUTO=trueand Flaiwheel generates a private CA plus a server certificate on first start, covering the configured hosts and loopback.Everything on Flaiwheel's side is automatic, and repeated starts are safe. Material is persisted in
/data/tlsand reused while it is valid and still covers the requested names β an upgrade does not change the fingerprint, so a client that pinned the CA stays valid. A certificate that has gone stale, stopped covering a host, or lost its matching key is re-issued, with the reason logged.One thing it genuinely cannot do: make another machine trust the CA. The container has no access to a client's trust store β the same boundary that forces
mkcertto run a per-machine step. So the startup log prints the fingerprint and the exactNODE_EXTRA_CA_CERTS=...line for the client's env block. That is the floor, and it is real TLS: encryption and identity, with the CA pinned by trust-on-first-use.No
NODE_TLS_REJECT_UNAUTHORIZED=0anywhere in this path. The easy way to "make HTTPS work" is to disable verification, which defends against nothing; it is not offered as an option here.Opt-in, because turning it on is a protocol change. Auto-TLS flips the endpoint from
http://tohttps://, and doing that unasked during an upgrade would break every existing client β the same class of failure as an installer that refuses to upgrade. It fails closed too: if provisioning fails, startup aborts rather than quietly serving cleartext.Verified with a real TLS stack, not a fixture. A client trusting only the generated CA completes a TLSv1.3 handshake and gets a
200; an untrusting client is rejected. Both directions asserted.Tests: 370 β 439, covering SAN derivation, signature chain verification, idempotence, stale/mismatched material, key permissions and every fail-closed path.
Whatβs New in v3.14.0 β Remote MCP without a reverse proxy
Serve MCP to a LAN or remote client without adding a component. Until now the SSE endpoint was reachable only from
localhost: the socket bound0.0.0.0while the application layer answeredHTTP 421 Invalid Host headerto every otherHost. The workaround was a proxy that rewritesHost: localhostβ a moving part, and a boot-ordering dependency. SetMCP_SSE_ALLOWED_HOSTS=flaiwheel.example.comand connect directly.The root cause was not the bind address. Flaiwheel builds
FastMCPitself and passed neitherhostnortransport_security, so the SDK's loopback-only guard always applied.FASTMCP_HOSTlooks like the fix and is silently inert β init arguments outrank environment variables in pydantic-settings. Verified empirically before and after.The guard stays ON. The tempting one-liner (
host='0.0.0.0') makes the SDK skip its auto-enable and turn DNS-rebinding protection off entirely. Instead, protection remains enabled with a wider allowlist βHostandOriginare still validated, and lookalike suffixes likeflaiwheel.example.com.evil.comare still rejected.Nothing changes for existing installs. An unconfigured Flaiwheel is loopback-only, exactly as before, and still rejects remote hosts. Loopback entries are never dropped, so container health checks,
ssh -Lforwards and existing Host-rewriting proxies keep working.Native TLS β a remote deployment needs no proxy at all. Set
MCP_SSE_TLS_CERTFILE+MCP_SSE_TLS_KEYFILEand the endpoint is served over HTTPS directly. Verified against a real TLS listener: TLSv1.3,200over HTTPS for the allowlisted host,421still enforced forevil.example.com, and a plain HTTP request to the same port rejected.TLS fails closed. A half-configured or unreadable certificate aborts startup instead of quietly serving plaintext β an operator who asked for encryption must never silently get cleartext.
Startup tells you when you are no longer loopback-only, and
SECURITY.mdcarries the deployment table so you can see which layer encrypts what.Tests: 335 β 370, including the guard exercised through the SDK's real middleware and every fail-closed TLS path.
Previous: v3.13.0 β Observability
Flaiwheel now knows whether its knowledge repo is still connected to its remote. Everything before this reported on pushes that were attempted. The failure that hid 325 documents in a Docker volume for 2.5 months attempted nothing: the clone had drifted from its remote, so there was never anything to commit, so no push could fail, so nothing went red.
check_divergence()comparesHEADagainst@{u}and classifies the result assynced/ahead/behind/diverged/no-upstream.The "nothing to push" path is where this matters. That branch used to return an unconditional "already in sync". It now verifies the claim. Divergence is also checked after every successful push (did the commit actually land?), after a rejected push (a rejection is the classic symptom β now named instead of leaving you to read a git error), and on every pull.
A repo that indexes perfectly and pushes nothing is no longer "healthy".
/healthgainsdivergence_status,commits_ahead,commits_behindandlast_divergence_at, and reportsdegradedondiverged,aheadorno-upstream. Beingbehindis the normal state between two pulls and deliberately does not alarm.The agent is told directly.
write_*results append an explicit warning when the repo has diverged β including on "nothing to push". A warning in an endpoint nobody polls does not exist; the agent that just wrote the document is the one that needs to know it never left the machine.Tests: 316 β 335, against real temp repos including a force-pushed rewritten upstream β the real-world trigger, where a secret purge or a squash silently desynchronises every clone.
This closes the 2026-08-19 incident completely. The one item that looked outstanding β "watcher path scoping" β was retracted as a misdiagnosis after checking the running container. Its only evidence was the log line
knowledge: update flaiwheel/telemetry.json, read as one project's file being committed into all 11 repos. The real path is.flaiwheel/telemetry.json, with a leading dot: the signature of the porcelain off-by-one already fixed in v3.12.2. Every project owns an identically-named telemetry file, so all 11 watchers logged the same mangled string at once β uniformity caused by shared code, mistaken for shared state.
Previous: v3.12.3
Every dependency is capped below the next major. Eleven requirements were unbounded
>=X. That fails silently: the breaking release lands, existing installs keep working off a stale resolve, and it only bites on the next fresh install β CI, a Docker rebuild, a new contributor. Exactly howmcp2.0.0 broke CI and the Docker build together three weeks after release while every dev machine stayed green. A clean install resolves to identical versions as before, so this constrains the future without moving anything today.Sustained push failure now degrades
/health.HealthTrackerkept onlylast_push_okβ a single boolean the next attempt overwrites β so one blip and a repo failing for weeks looked the same.push_failures_consecutiveescalates past 3 consecutive failures. A single failure deliberately does not degrade; crying wolf on transients is how alerts get ignored./healthnames the failing projects. Addslast_push_ok,last_push_error,push_failures_consecutiveanddegraded_projectsβ previously the endpoint could saydegradedwhile showing only the default project's numbers, with no way to tell which repo was broken.Pre-deploy image smoke test documented. An image can build cleanly and still fail every import at runtime. The README now verifies
from flaiwheel.server import create_mcp_serverinside the image before starting a container, and renames rather than removes the previous container so rollback is instant.Tests: 308 β 316.
Previous: v3.12.2
Auto-commit no longer drops the first worktree-modified file.
git status --porcelainemitsXY <path>where a leading space is data (" M file"). Stripping the whole output before splitting ate that space on the first line only, soline[3:]truncated the filename's first character β.flaiwheel/telemetry.jsonbecameflaiwheel/telemetry.json,git addfailed, and the commit aborted. Intermittent and file-order dependent, which is why it survived so long.Renamed and copied files are staged correctly. Porcelain reports
old -> new; the whole string was passed togit add, so renames were never committed.
Previous: v3.12.1
Pinned
mcp[cli]<2.0.0.mcp2.0.0 removedmcp.server.fastmcp(FastMCPβmcp.server.mcpserver), breaking every import of the server on a fresh resolve.
Previous: v3.12.0
Auto-push now reports what actually happened.
push_pending()returns a structured result (ok/noop/disabled/failed/blocked) and everywrite_*tool renders that outcome. Previously the success line was derived from configuration (git_auto_push and bool(git_repo_url)), so it readAuto-pushed to remote: Trueeven when every push was being rejected. A failed push now says "Auto-push: FAILED β this doc is NOT on the remote" with the git error attached.Push errors are no longer swallowed. The bare
exceptinpush_pending()that only wrote to the diagnostic log now records toHealthTrackerand returns the error to the caller. A failinggit commitis reported instead of raising through an uncheckedcheck=True.gitleaks runs inside the container, on the write path. Flaiwheel's commits are machine-generated and never human-reviewed, so secret scanning now happens in
_push_local_changes()before the commit β not as a per-clone git hook that gets lost on re-clone.MCP_GITLEAKS_MODE=block(default) refuses to commit and reports the findings through the MCP result;warncommits and reports;offdisables. Honours a.gitleaks.tomlin the knowledge repo for allowlisting. A missing or broken scanner is reported explicitly, never silently skipped.Tests: 300 β 308 (
tests/test_watcher_push.py: push success/failure/noop/disabled reporting, gitleaks block/warn/clean, unavailable-scanner visibility).
Previous: v3.11.0
Telemetry now survives
docker volume rm flaiwheel-data. A per-project summary slice is mirrored from the Docker volume into each knowledge repo at<docs_path>/.flaiwheel/telemetry.json. On the next cold start,hydrate_from_mirrors()rebuilds the in-memory state from these files so the Tool Telemetry dashboard does not reset to zero. Hot tier wins when both exist; mirror writes are rate-limited to 60s/project to avoid one Git commit per tool call. Events stay in the volume only (too noisy for the knowledge repo). Don't want it committed? Add.flaiwheel/to your knowledge repo's.gitignoreβ Flaiwheel will still read/write the file locally.Reset Telemetry button on every per-project tile in the Web UI. Zeroes summary counters across both storage tiers via the new
POST /api/telemetry/reset?project=<name>endpoint. The 30-day impact-metrics window keeps working because events history is preserved.Agent instructions taught the relations workflow.
AGENTS.mdand both install.sh templates now include a "Structured Relations Workflow" section with three concrete rules (when to addfixes, when to addreplaces, when to adddepends_on) so agents actually use the v3.10.x graph machinery instead of ignoring it.Client Configuration's "VS Code" tab is now "VS Code + Copilot" with explicit help text pointing at GitHub Copilot agent mode. The
.vscode/mcp.jsonfile Flaiwheel emits already works for Copilot β no separate snippet needed.Tests: 292 β 300 (8 new tests in
test_telemetry.pyfor mirror writes, rate limiting, cold-start hydration, hot-tier authority, and reset semantics).
Previous: v3.10.1
Every structured writer now auto-emits frontmatter.
write_bugfix_summary,write_architecture_doc,write_api_doc,write_best_practice,write_setup_doc,write_changelog_entry, andwrite_test_caseprependid/type/status: active+ empty relation lists to every new doc. Every doc you create from now on is automatically a graph node β no manual frontmatter editing required. IDs are derived from the existing filename slugs (e.g.adr-2026-05-22-payment-service-architecture,bugfix-2026-05-22-fix-race-condition,api-create-user-endpoint).New helper
flaiwheel.frontmatter.emit()with stable, deterministic key order so same-day overwrites produce minimal diffs.
Previous: v3.10.0
Structured relations (v1) β two new read-only MCP tools,
relations(entity_id)andtimeline(entity_id), derive a per-project knowledge graph from YAML frontmatter on existing markdown docs. No new persistent store and nograph_add/invalidatewrites: markdown stays the single source of truth and Git history is the validity window. Recognised relation keys:replaces,depends_on,fixes,implements. Scalar keys:id,type,status,superseded_at.Frontmatter-aware quality checks β
validate_doc()now warns on unknown relation keys (info severity) and invalidstatusvalues (warning severity); heading-structure checks strip the leading---block first so frontmatter does not confuse the "first heading is h1" rule.GitWatcher.log_for_file()β read-only helper returning newest-first commits (hash,author, ISOdate,subject); backs thetimeline()tool.Zero new dependencies β frontmatter parsing is stdlib-only (
flaiwheel.frontmatter). Nopython-frontmatter/PyYAMLadded.Total tools: 28 β 30.
Note: the SQLite ER store (
graph_add/graph_invalidate/valid_from/valid_tocolumns) originally proposed for this feature is deferred as v2, gated on a real query becoming measurably too slow on v1. AST-driven codeβsymbol edges (v3) remain merged with thefeature_ideas_backlog#13 track.
Previous: v3.9.40
Installer:
claude-mdno longer fails on repeat runs βclaude mcp addnon-zero exits (e.g. MCP already registered) no longer abort the parallel phase underset -e; registration output is captured safely.Installer: correct release version from GitHub β
_FW_VERSIONis refreshed frommainpyproject.tomlwhen reachable so Docker rebuild / version checks stay aligned with the package even if rawinstall.shonmainlags at the CDN.
Previous: v3.9.29
Glama tool detection fix β
AuthManagercrashed on read-only/databefore the MCP server could start (the real reason Glama saw 0 tools). Skipped in stdio cold-start mode.Zero print() on stdout β 36 remaining
print()in watcher, indexer, readers, bootstrap replaced withdiag()(stderr). Verified: full MCP handshake returns all 28 tools over stdio.config.save()resilient β read-only filesystem logs warning instead of crashing.
Previous: v3.9.28
Glama / MCP stdio fix β all diagnostic output moved to stderr; stdout is now JSON-RPC only. Glama Inspector now detects all 28 tools correctly.
Improved cold-start detection β stdio cold-start logic handles empty Docker volumes correctly (no bootstrap / model download during Glama inspection).
Previous: v3.9.27
License cleanup β one
LICENSEfile (BSL 1.1) for correct GitHub/Glama detection; all docs and headers point toLICENSE(notLICENSE.md).Glama / stdio inspection β optional
[inspect]deps and cold-start stdio path for lightweight MCP directory builds.
Previous: v3.9.26
Claude Cowork skill β the Flaiwheel workflow is now distributed as a native Claude skill. The installer writes
.skills/skills/flaiwheel/SKILL.mdto your project. When you open the project in Claude (Cowork), the skill is auto-available β no extra setup needed. The skill drives session-start context restore, pre-coding knowledge search, mandatory post-bugfix documentation, and session-end summarisation.Skill source also committed to
skills/flaiwheel/SKILL.mdin this repo for reference and manual install.
Previous: v3.9.25
WSL2 automatic pre-flight setup β WSL2 is now detected automatically and a dedicated pre-flight block runs before the main installer flow. No manual steps required:
Switches
iptablesto legacy backend (fixes Docker networking / DNAT errors)Adds the current user to the
dockergroup (no morepermission denied)Starts the Docker daemon via
service(no systemd on WSL2)Adds a Docker auto-start snippet to
~/.bashrc(idempotent, runs on every WSL2 login)
Scattered WSL2 checks throughout the script consolidated into the single pre-flight block.
Previous: v3.9.24
Fix: auto-install python3 if missing β the installer uses
python3extensively for JSON manipulation. On minimal Linux/WSL2 systems without python3, config file writes silently failed (/dev/fd/63: line N: python3: command not found). python3 is now checked as prerequisite #0 and auto-installed via apt/dnf/yum/pacman/brew if missing.
Previous: v3.9.23
Fix: Docker daemon start on WSL2 with iptables-legacy β Docker on WSL2 often fails to start silently because the default
iptables-nftbackend is not supported. The installer now switches toiptables-legacyviaupdate-alternativesbefore starting Docker. Also adds the current user to thedockergroup automatically.All install commands updated to
bash <(curl ...)β every displayed install/re-run command throughout the script (error messages, AGENTS.md, Cursor rules, etc.) now uses process substitution to avoid WSL2 pipe issues.
Previous: v3.9.22
Fix:
curl | bashpipe write failures on WSL2 βcurl | bashcan fail withcurl: (23) Failure writing outputon WSL2 due to pipe/tmp permission issues. The primary install command in README is nowbash <(curl ...)(process substitution), which avoids the pipe entirely. The re-exec block also tries$HOMEas a fallback temp dir when/tmpwrites fail. Error message explicitly recommends thebash <(curl ...)form.
Previous: v3.9.21
Fix: sudo guard moved before re-exec block β when
sudo curl | bashwas used, thecurl: (23)pipe error truncated the script before the previous sudo guard (which was after colors/functions) was ever reached. The guard is now the very first executable line (set -euo pipefailaside), so it fires even on a truncated download. Duplicate guard after colors removed.
Previous: v3.9.20
Fix: Docker daemon startup poll on WSL2 β instead of a fixed 5-second sleep, the installer now polls
docker infoevery 2 seconds for up to 30 seconds afterservice docker start. Also shows the actual output ofservice docker startso startup errors are visible instead of silently swallowed.
Previous: v3.9.19
Fix: Docker daemon start on WSL2 β WSL2 typically has no
systemd, sosystemctl start dockersilently failed. The installer now detects WSL2 via/proc/versionand usessudo service docker startinstead. If Docker still isn't running after install, a clear WSL2-specific error is shown with the exact fix command and a tip to add it to~/.bashrcfor auto-start on login.
Previous: v3.9.18
Fix: block
sudo curl | bashandsudo bash install.shβ running the installer as root viasudobreaks GitHub CLI authentication:gh authstores credentials in/root/.config/gh/instead of the real user's home, making every subsequentghcall fail. Also causedcurl: (23) Failure writing outputpipe errors on WSL. The installer now detectsSUDO_USERat startup and exits immediately with a clear message telling the user to re-run withoutsudo. Privilege escalation for package installs is handled internally.
Previous: v3.9.17
Fix:
gh auth loginmust not be run with sudo β after auto-installingghon Linux/WSL, the installer now explicitly tells the user to rungh auth loginwithoutsudo. If auth was previously done withsudo, credentials ended up in/root/.config/gh/and were invisible to the current user, causing the auth check to fail. The error messages at both the post-install and the auth-check step now clearly warn: do not use sudo forgh auth.
Previous: v3.9.16
Fix: installer works on WSL and non-root Linux β all Linux package manager commands (
apt-get,dnf,yum,zypper,pacman), Docker convenience script, andsystemctlcalls now automatically usesudowhen the installer is not running as root. Root installs are unaffected. FixesPermission denied/ lock file errors on WSL and standard Linux desktop users.
Previous: v3.9.15
Cold-start report cached in
/data/βanalyze_codebase()saves the report to/data/coldstart-<project>.mdafter the first run. Subsequent calls return the cached report instantly (<1s). The installer also writes the cache during install so the very first MCP call by any agent is instant. Call withforce=Trueto regenerate after major codebase changes.analyze_codebase()in all agent Session Setup templates βAGENTS.md,.cursor/rules/flaiwheel.mdc,CLAUDE.md, and.github/copilot-instructions.mdall now include it as step 3 of Session Setup. Agents automatically get the codebase overview before starting work.Cold-start prompt asked before Docker rebuild β all interactive questions (embedding model + cold-start) are now batched upfront, then the rebuild runs unattended.
Fix: used
docker execfor cold-start β replaced broken HTTP calls to the MCP SSE endpoint with directdocker exec python3. Analysis now works reliably in ~20s.
Previous: v3.9.14
Fix: fast-path always prompts for cold-start β no more silent skip when cached report exists.
Previous: v3.9.13
Improved cold-start classification β two-pass classifier: path heuristics first, code-specific embedding templates as fallback.
Previous: v3.9.12
Fix: y/n answer respected before cache check β explicit
ynow always re-runs analysis even when cached report exists.
Previous: v3.9.11
Fix: coldstart functions in global scope β moved
_run_coldstart/_do_coldstart_analysisto top of script so fast-path can call them.
Previous: v3.9.10
Fix: version check β
LATEST_VERSIONnow uses_FW_VERSIONdirectly, no CDN fetch.
Previous: v3.9.9
Fix: cold-start on all paths β
_run_coldstart()called from fast-path, update, and fresh install. Smart cache detection.
Previous: v3.9.8
Cold-start report caching β
analyze_codebase()cached to/data/coldstart-<project>.mdfor instant reads. Newforce=Trueparam.
Previous: v3.9.7
Agent Session Setup β all instruction templates now include
analyze_codebase()as a first-session step.
Previous: v3.9.6
Fix: use docker exec β replaced broken HTTP calls to MCP SSE endpoint with direct
docker exec python3invocation. Cold-start report now actually works (~20s).
Previous: v3.9.5
Fix: warm up embedding model β added model warm-up before cold-start analysis (superseded by v3.9.6).
Previous: v3.9.4
Fix: cold-start retries while model loads β installer now retries
analyze_codebase()for up to 90s after container starts.
Previous: v3.9.3
Fix: update detection always checks
mainβLATEST_VERSIONnow fetched frommainbranch so stale cached installers no longer silently skip updates.
Previous: v3.9.2
Cold-start prompt moved before Docker rebuild β all interactive questions now batched upfront.
Previous: v3.9.1
Cold-start prompt moved upfront β the
install.shcold-start question is now asked right after the embedding model selection (before the Docker rebuild), so all interactive questions are gathered first and the user never misses the prompt after a long rebuild.
Previous: v3.9.0
analyze_codebase(path)β new 28th MCP tool for zero-token cold-start analysis of legacy codebases. Runs entirely server-side in Docker. Uses Pythonast, regex, MiniLM embeddings, and nearest-centroid classification. Returns a rankedbootstrap_report.mdwith language distribution, category map, top 20 files by documentability score, near-duplicate pairs, and recommended next steps. Reduces cold-start token cost by βΌ90%.
Previous: v3.8.3
No auto-index on project add β adding a project via the web UI no longer immediately pulls and embeds the knowledge repo. Indexing is now deferred until explicitly triggered (βGit Pull + Reindexβ or
reindex()MCP tool), keeping the vector DB clean until the repo has been reviewed.
Previous: v3.6.x
VS Code / GitHub Copilot support β installer writes
.vscode/mcp.jsonand.github/copilot-instructions.md.Claude Desktop support β installer auto-configures Claude Desktop via
mcp-remote.Web UI Client Configuration panel β VS Code and Claude Code CLI tabs added.
Previous: v3.5.x
Claude Desktop + Claude Code CLI support added.
README strategically rewritten with positioning, target audience, and competitive framing.
Previous: v3.4.x
Search miss rate fix β
search_bugfixescalls no longer inflate miss rate above 100%.Classification consistency β
_path_category_hintunified token-based approach across all categories.CHANGELOG.mdadded to repo root.
Quick Start β One Command (recommended)
Prerequisites: GitHub CLI authenticated (gh auth login), Docker running.
Platform support: macOS and Linux work out of the box. On Windows, run the installer from WSL or Git Bash (Docker Desktop must be running with WSL 2 backend enabled).
Run this from inside your project directory:
bash <(curl -sSL https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install.sh)WSL2 / Linux note: Use the
bash <(curl ...)form above β it avoidscurl: (23)pipe write errors that occur withcurl | bashon some WSL2 setups. Never prefix withsudo.
That's it. The installer automatically:
Detects your project name and GitHub org from the git remote
Creates a private
<project>-knowledgerepo with the standard folder structureStarts the Flaiwheel Docker container pointed at that repo
Configures Cursor β writes
.cursor/mcp.jsonand.cursor/rules/flaiwheel.mdcConfigures VS Code / GitHub Copilot β writes
.vscode/mcp.json(native SSE, VS Code 1.99+) and.github/copilot-instructions.mdConfigures Claude Desktop (macOS app) β writes
claude_desktop_config.jsonviamcp-remotebridge (requires Node.js)Configures Claude Code CLI β writes
.mcp.json+CLAUDE.mdand runsclaude mcp addautomatically if the CLI is on PATHInstalls Claude Cowork skill β writes
.skills/skills/flaiwheel/SKILL.mdso the full Flaiwheel workflow is available as a native Claude skillWrites
AGENTS.mdfor all other agentsIf existing
.mddocs are found, creates a migration guide β the AI will offer to organize them into the knowledge repo
After install:
Agent | What to do |
Cursor | Restart Cursor β Settings β MCP β enable |
Claude Desktop (macOS app) | Quit and reopen Claude for Mac β hammer icon appears when connected |
Claude Code CLI | Already registered automatically β run |
VS Code | Open project β Command Palette β MCP: List Servers β start |
Claude (Cowork) | Skill auto-loads from |
The installer also sets up a post-commit git hook that automatically captures every fix:, feat:, refactor:, perf:, and docs: commit as a structured knowledge doc β no agent or manual action required.
Once connected, the AI has access to all Flaiwheel tools. If you have existing docs, tell the AI: "migrate docs".
Optional: Open Terminal Local Daemon (Open WebUI)
If you also use Open WebUI's Open Terminal integration, this repo includes helper installers for a local open-terminal daemon.
Third-party write-ups (for example AIΒ·Collab β Open Terminal) may mirror only the Linux script; macOS uses scripts/macos/install-open-terminal-launchagent.sh below. After any mirror update, re-check the file with shasum -a 256 against the same revision on GitHub.
One-liner install via curl (no git clone)
Use main or pin a commit SHA / tag in the URL for reproducible bytes.
Linux / WSL2 (systemd --user):
curl -fsSL -o install-open-terminal-systemd-user.sh \
https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install-open-terminal-systemd-user.sh
/bin/chmod +x install-open-terminal-systemd-user.sh
/bin/bash ./install-open-terminal-systemd-user.shmacOS (LaunchAgent; do not use sudo):
curl -fsSL -o install-open-terminal-launchagent.sh \
https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/macos/install-open-terminal-launchagent.sh
/bin/chmod +x install-open-terminal-launchagent.sh
/bin/bash ./install-open-terminal-launchagent.shIf chmod or bash are βnot foundβ, your PATH is broken (often Conda base); the /bin/β¦ paths above still work.
Linux / WSL2 (systemd --user)
./scripts/install-open-terminal-systemd-user.shService name:
com.flaiwheel.open-terminal-local.serviceDefault endpoint:
http://localhost:8000The script auto-generates an API key and prints it after install/reset.
On WSL2, make sure
systemd=trueis enabled in/etc/wsl.conf.
Useful commands:
systemctl --user status com.flaiwheel.open-terminal-local.service
journalctl --user -u com.flaiwheel.open-terminal-local.service -fmacOS (launchctl LaunchAgent)
./scripts/macos/install-open-terminal-launchagent.shLaunchAgent label:
com.flaiwheel.open-terminal-localDefault endpoint:
http://localhost:8000The script auto-generates an API key and prints it after install/reset.
The LaunchAgent sets WorkingDirectory to
$HOMEby default so Open Terminal does not start in/private/tmp.PATH:
launchddoes not load~/.zshrc, so the daemon used to see only/usr/bin:/bin:β¦and miss Homebrew / Supabase CLI. The generated wrapper prepends/opt/homebrew/bin,/usr/local/bin,~/.local/bin, and~/.npm-global/bin. Re-run the installer (menu β1 Update) after pulling this change so the wrapper is regenerated.Persisted custom folder: the installer can save a path in
~/.config/flaiwheel/open-terminal-working-directory(fresh-install prompt, or menu β5 when re-running the script). Update (menu β1) keeps using that saved path. One-off override: setOPEN_TERMINAL_WORKING_DIRECTORYfor that run only.
Environment overrides (both scripts):
HOST=127.0.0.1 PORT=8000 OPEN_TERMINAL_CORS_ALLOWED_ORIGINS='https://your-openwebui.example' ./scripts/install-open-terminal-systemd-user.shHOST=127.0.0.1 PORT=8000 OPEN_TERMINAL_CORS_ALLOWED_ORIGINS='https://your-openwebui.example' ./scripts/macos/install-open-terminal-launchagent.shmacOS only β custom initial folder for Open Terminal (must exist before you save it):
OPEN_TERMINAL_WORKING_DIRECTORY="$HOME/projects/my-repo" ./scripts/macos/install-open-terminal-launchagent.shRe-run the same script and choose 5 to change or clear the saved folder (or edit ~/.config/flaiwheel/open-terminal-working-directory). Non-interactive install: set the env var above or create that file with a single line (path); use AUTO_INSTALL_DEPS=1 to skip the first-run path prompt.
Updating
Run the same install command again from your project directory:
bash <(curl -sSL https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install.sh)The installer detects the existing container, asks for confirmation, then:
Verifies the target host ports are actually free before touching anything (and refuses if a non-Flaiwheel process owns them)
Rebuilds the Docker image with the latest code before stopping the old container, so a failed build is not an outage
Recreates the container, preserving both volumes (
/dataand/docs), the host port bindings, and allMCP_*settingsRefreshes all agent configs and guides
Your knowledge base, index, and credentials are preserved β only the code is updated.
Shared hosts, custom ports, and proxies
If 8080/8081 are already taken (e.g. by a fronting proxy), point the installer at free ports instead of fighting over the defaults:
FLAIWHEEL_WEB_PORT=18080 FLAIWHEEL_SSE_PORT=18081 \
FLAIWHEEL_WEB_BIND=127.0.0.1 FLAIWHEEL_SSE_BIND=127.0.0.1 \
bash <(curl -sSL https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install.sh)Variable | Default | Purpose |
|
| Host port for the Web UI |
|
| Host port for the MCP SSE endpoint |
|
| Host bind address for the Web UI |
|
| Host bind address for MCP SSE |
|
| Allow host-wide Docker pruning ( |
|
| Where the installer exports the TLS CA so clients on this host can trust it |
On a shared host, leave FLAIWHEEL_AGGRESSIVE_CLEANUP unset. Those commands affect every project and container on the machine β systemctl stop docker stops all containers β so they are off by default and only run when you explicitly opt in.
Which ports does the installer change?
FLAIWHEEL_SSE_PORTchanges the container's published port only. Client config files generated for other tools still reference the default8081, so update those yourself if you remap it.
Manual Setup
1. Create a knowledge repo
# On GitHub, create: <your-project>-knowledge (private repo)
mkdir -p architecture api bugfix-log best-practices setup changelog
echo "# Project Knowledge Base" > README.md
git add -A && git commit -m "init" && git push2. Build and start Flaiwheel
git clone https://github.com/dl4rce/flaiwheel.git /tmp/flaiwheel-build
docker build -t flaiwheel:latest /tmp/flaiwheel-build
# Smoke-test the image BEFORE starting or replacing a container.
# A broken transitive dependency only surfaces on a fresh resolve, so an
# image can build cleanly and still fail every import at runtime.
docker run --rm --entrypoint sh flaiwheel:latest -c \
'python -c "from flaiwheel.server import create_mcp_server; import flaiwheel; print(flaiwheel.__version__)"'
docker run -d \
--name flaiwheel \
-p 8080:8080 \
-p 8081:8081 \
-e MCP_GIT_REPO_URL=https://github.com/you/yourproject-knowledge.git \
-e MCP_GIT_TOKEN=ghp_your_token \
-v flaiwheel-data:/data \
flaiwheel:latestUpgrading an existing container? Run the smoke test above first, then rename the old container instead of removing it (
docker rename flaiwheel flaiwheel-rollback) so you can restore it instantly if the new one fails its health check. Confirm every knowledge repo is pushed (git rev-list --count @{u}..HEADβ0) before swapping.
3. Connect your AI agent
Cursor β add to .cursor/mcp.json:
{
"mcpServers": {
"flaiwheel": {
"type": "sse",
"url": "http://localhost:8081/sse"
}
}
}VS Code / GitHub Copilot (1.99+) β add to .vscode/mcp.json:
{
"servers": {
"flaiwheel": {
"type": "sse",
"url": "http://localhost:8081/sse"
}
}
}Then: Command Palette β MCP: List Servers β start flaiwheel.
Claude Desktop (macOS app) β add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"flaiwheel": {
"command": "npx",
"args": ["-y", "mcp-remote", "http://localhost:8081/sse"]
}
}
}Requires Node.js. Restart Claude for Mac after editing.
Claude Code CLI β run once in your project directory:
claude mcp add --transport sse --scope project flaiwheel http://localhost:8081/sse3b. Remote / LAN deployment (serving MCP beyond localhost)
By default the MCP endpoint is loopback-only: the transport guard accepts
only localhost, 127.0.0.1 and [::1], and any other client gets
HTTP 421 Invalid Host header. Binding is not the problem β the allowlist is,
and it is enforced at the application layer, so it is invisible from inside the
container.
To serve a shared or LAN instance, allowlist the hostname you connect with:
docker run -d --name flaiwheel -p 8080:8080 -p 8081:8081 \
-v flaiwheel-data:/data -v flaiwheel-docs:/docs \
-e MCP_SSE_ALLOWED_HOSTS=flaiwheel.example.com,flaiwheel.lan \
flaiwheel:latestBoth forms work: comma-separated (host1,host2) or JSON (["host1"]). Each
host matches with or without a port, so the same entry covers
flaiwheel.example.com and flaiwheel.example.com:8081. Loopback entries are
always kept, so an SSH tunnel or an existing Host-rewriting proxy keeps working
unchanged.
Then point your client at that hostname:
{ "mcpServers": { "flaiwheel": { "type": "sse",
"url": "http://flaiwheel.example.com:8081/sse" } } }Default and recommended: use the HTTP endpoint on port
8081. This avoids client trust-store setup and is the configuration produced by the normal installer command. HTTP traffic is not encrypted, so use it only on a trusted LAN, localhost, an SSH tunnel, or an encrypted network such as WireGuard or Tailscale.
Optional automatic TLS β client trust required
Automatic TLS is available, but it is not the default recommendation yet.
Flaiwheel generates and persists a private CA and a server certificate. Each
client computer must trust that CA. Direct Cursor/Electron SSE connections use
the operating-system trust store; an env object in a direct remote-server
entry does not establish certificate trust.
New installation, with TLS off by default (an update preserves its current mode):
bash <(curl -sSL https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install.sh)Explicitly return an existing TLS-enabled installation to HTTP:
FLAIWHEEL_TLS_AUTO=0 bash <(curl -sSL https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install.sh)Enable automatic TLS only when the clients have been prepared to trust its CA:
FLAIWHEEL_TLS_AUTO=1 bash <(curl -sSL https://raw.githubusercontent.com/dl4rce/flaiwheel/main/scripts/install.sh)The generated files are stored in /data/tls in the persistent data volume.
The installer exports the public CA certificate to
${HOME}/.flaiwheel/ca.pem; override that path with
FLAIWHEEL_CLIENT_CA_PATH. Flaiwheel reuses the generated CA across container
restarts and upgrades.
After enabling TLS, install the exported CA into the trust store used by the client operating system, restart the client, and use an HTTPS endpoint such as:
{ "mcpServers": { "flaiwheel": { "type": "sse",
"url": "https://192.168.178.230:8081/sse" } } }macOS: verified direct Cursor/Electron setup
The following procedure was verified against the live v3.15.3 deployment on
2026-09-11. It uses the current user's login keychain and does not require
NODE_EXTRA_CA_CERTS for the direct SSE entry.
Copy the CA from the Flaiwheel server to the Mac and verify its SHA-256 against the server copy:
mkdir -p "$HOME/.flaiwheel"
scp user@flaiwheel-host:/path/to/exported/ca.pem "$HOME/.flaiwheel/ca.pem"
chmod 644 "$HOME/.flaiwheel/ca.pem"
shasum -a 256 "$HOME/.flaiwheel/ca.pem"Add the verified CA to the login keychain as a trusted root:
security add-trusted-cert \
-r trustRoot \
-k "$HOME/Library/Keychains/login.keychain-db" \
"$HOME/.flaiwheel/ca.pem"Configure the direct SSE endpoint with
https://and the hostname or IP covered by the certificate. Do not add anenvblock:
{
"mcpServers": {
"flaiwheel": {
"type": "sse",
"url": "https://flaiwheel.example.com:8081/sse"
}
}
}Fully quit and restart Cursor after installing the CA or changing
.cursor/mcp.json.Verify system trust without
-k,--cacert, or an environment override:
curl -i --max-time 5 https://flaiwheel.example.com:8081/sseExpected: HTTP/1.1 200 OK, content-type: text/event-stream, and an
event: endpoint payload. curl exits after the timeout because an SSE stream
remains open; receiving the 200 and event proves the TLS and SSE connection.
Do not use NODE_TLS_REJECT_UNAUTHORIZED=0; it disables certificate
verification.
Native TLS β your own certificate, no proxy at all
Set a certificate and key and the endpoint is served over HTTPS directly:
docker run -d --name flaiwheel -p 8080:8080 -p 8081:8081 \
-v flaiwheel-data:/data -v flaiwheel-docs:/docs \
-v /etc/ssl/flaiwheel:/certs:ro \
-e MCP_SSE_ALLOWED_HOSTS=flaiwheel.example.com \
-e MCP_SSE_TLS_CERTFILE=/certs/fullchain.pem \
-e MCP_SSE_TLS_KEYFILE=/certs/privkey.pem \
flaiwheel:latest{ "mcpServers": { "flaiwheel": { "type": "sse",
"url": "https://flaiwheel.example.com:8081/sse" } } }Obtain the certificate from your CA (e.g. certbot certonly --standalone -d flaiwheel.example.com), or generate an internal-CA cert for a LAN hostname.
Use fullchain.pem, not the bare leaf certificate, or clients will reject it
for an incomplete chain.
TLS fails closed. If only one of the two paths is set, or the file is
unreadable, Flaiwheel refuses to start rather than quietly falling back to
plain HTTP β an operator who asked for encryption must never silently get
cleartext. Check the logs for FATAL: MCP_SSE_TLS_... if the container exits
immediately. Note the Web UI on MCP_WEB_PORT is still plain HTTP; terminate
TLS for the UI at a proxy if you expose it beyond localhost.
FASTMCP_HOST will not help. It looks like the obvious knob and is
silently ignored: FastMCP.__init__ passes host and transport_security
into its Settings(...) as explicit init arguments, and pydantic-settings
gives init arguments precedence over environment variables. Use
MCP_SSE_HOST (bind address, default 0.0.0.0) and MCP_SSE_ALLOWED_HOSTS
(allowlist) instead.
4. Done. Start coding.
Knowledge Repo Structure
yourproject-knowledge/
βββ README.md β overview / index
βββ architecture/ β system design, decisions, diagrams
βββ api/ β endpoint docs, contracts, schemas
βββ bugfix-log/ β auto-generated bugfix summaries
β βββ 2026-02-25-fix-payment-retry.md
βββ best-practices/ β coding standards, patterns
βββ setup/ β deployment, environment setup
βββ changelog/ β release notes
βββ tests/ β test cases, scenarios, regression patternsSupported Input Formats
Flaiwheel indexes 9 file formats. All non-markdown files are converted to markdown-like text in memory at index time β no generated files on disk, no repo clutter.
Format | Extension(s) | How it works |
Markdown |
| Native (pass-through) |
Plain text |
| Wrapped in |
| Text extracted per page via | |
HTML |
| Headings/lists/code converted to markdown, scripts stripped |
reStructuredText |
| Heading underlines converted to |
Word |
| Paragraphs + heading styles mapped to markdown |
JSON |
| Pretty-printed in fenced |
YAML |
| Wrapped in fenced |
CSV |
| Converted to markdown table |
Quality checks (structure, completeness, bugfix format) apply only to .md files. Other formats are indexed as-is.
Configuration
All config via environment variables (MCP_ prefix), Web UI (http://localhost:8080), or .env file.
Variable | Default | Description |
|
| Path to .md files inside container |
|
|
|
|
| Embedding model name |
|
|
|
|
| Enable cross-encoder reranker for higher precision |
|
| Reranker model name |
|
| RRF k parameter (lower = more weight on top ranks) |
|
| Vector search weight in RRF fusion |
|
| BM25 keyword search weight in RRF fusion |
|
| Minimum relevance % to return (0 = no filter) |
| Knowledge repo URL (enables git sync) | |
|
| Branch to sync |
| GitHub token for private repos | |
|
| Pull interval in seconds (0 = disabled) |
|
| Auto-commit + push bugfix summaries |
|
| Secret scan before auto-commit: |
| GitHub webhook secret (enables | |
|
| MCP transport: |
|
| MCP SSE endpoint port |
|
| SSE bind address (an IP, not a hostname). Set |
| Extra | |
| Extra | |
|
| Keep on. |
| PEM certificate β with the key, serves MCP over HTTPS natively (no proxy) | |
| PEM private key. TLS is all-or-nothing: set both or neither | |
|
| Let Flaiwheel issue its own CA + certificate when none is configured. Opt-in: it flips the endpoint to HTTPS, so existing clients must trust the new CA |
|
| Where generated certificates live. Must be persistent β regenerating the CA invalidates every client that trusts it |
|
| Web UI port |
Multi-Repo Support
A single Flaiwheel container can manage multiple knowledge repositories β one per project. Each project gets its own ChromaDB collection, git watcher, index lock, health tracker, and quality checker, while sharing one embedding model in RAM and one MCP/Web endpoint.
How it works:
The first
install.shrun creates the Flaiwheel container with project ASubsequent
install.shruns from other project directories detect the running container and register the new project via the API β no additional containersAll MCP tools accept an optional
projectparameter (e.g.,search_docs("query", project="my-app"))Call
set_project("my-app")at the start of every conversation to bind all subsequent calls to that project (sticky session)Without an explicit
projectparameter, the active project (set viaset_project) is used; if none is set, the first project is usedThe Web UI has a project selector dropdown to switch between projects
Use
list_projects()via MCP to see all registered projects (shows active marker)
Adding/removing projects:
Via AI agent: call
setup_project(name="my-app", git_repo_url="...")β registers, clones, indexes, and auto-bindsVia install script: run
install.shfrom a new project directory (auto-registers)Via Web UI: click "Add Project" in the project selector bar
Via API:
POST /api/projectswith{name, git_repo_url, git_branch, git_token}Remove:
DELETE /api/projects/{name}or the "Remove" button in the Web UI
Backward compatibility: existing single-project setups continue to work without changes. If no projects.json exists but MCP_GIT_REPO_URL is set, Flaiwheel auto-creates a single project from the env vars.
Embedding Model Hot-Swap
When you change the embedding model via the Web UI, Flaiwheel re-embeds all documents in the background using a shadow collection. Search remains fully available on the old model while the migration runs. Once complete, the new index atomically replaces the old one β zero downtime.
The Web UI shows a live progress bar with file count and percentage. You can cancel at any time.
Embedding Models (local, free)
Model | RAM | Quality | Best for |
| 90MB | 78% | Large repos, low RAM |
| 520MB | 87% | Best English quality |
| 2.2GB | 86% | Multilingual (DE/EN) |
Select via Web UI or MCP_EMBEDDING_MODEL env var. Full list in the Web UI.
Cross-Encoder Reranker (optional)
The reranker is a second-stage model that rescores the top candidates from hybrid search. It reads the full (query, document) pair together, which produces much more accurate relevance scores than independent embeddings β especially for vocabulary-mismatch queries where the user and the document use different words for the same concept.
How it works:
Hybrid search (vector + BM25) retrieves a wider candidate pool (
top_k Γ 5)RRF merges and ranks the candidates
The cross-encoder rescores the top candidates and returns only the best
top_k
Enable via Web UI (Search & Retrieval card) or environment variable:
docker run -d \
-e MCP_RERANKER_ENABLED=true \
-e MCP_RERANKER_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2 \
...Reranker Model | RAM | Speed | Quality |
| 90MB | Fast | Good β best speed/quality balance |
| 130MB | Medium | Better β higher precision |
| 420MB | Slower | Best β state-of-the-art accuracy |
The reranker is off by default (zero overhead). When enabled, it adds ~50ms latency per search but typically improves precision by 10-25% on vocabulary-mismatch queries.
GitHub Webhook (instant reindex)
Instead of waiting for the 300s polling interval, configure a GitHub webhook for instant reindex on push:
In your knowledge repo on GitHub: Settings β Webhooks β Add webhook
Payload URL:
http://your-server:8080/webhook/githubContent type:
application/jsonSecret: set the same value as
MCP_WEBHOOK_SECRETEvents: select "Just the push event"
The webhook endpoint verifies the HMAC signature if MCP_WEBHOOK_SECRET is set. Without a secret, any POST triggers a pull + reindex.
CI Guardrail Telemetry (ROI tracking)
Track non-vanity engineering impact directly in Flaiwheel:
POST
/api/telemetry/ci-guardrail-reportβ CI reports guardrail findings/fixes per PRGET
/api/impact-metrics?project=<name>&days=30β returns estimated time saved + regressions avoided
Example payload:
{
"project": "my-app",
"violations_found": 4,
"violations_blocking": 1,
"violations_fixed_before_merge": 2,
"cycle_time_baseline_minutes": 58,
"cycle_time_actual_minutes": 43,
"pr_number": 127,
"branch": "feature/payment-fix",
"commit_sha": "abc1234",
"source": "github-actions"
}Flaiwheel persists telemetry on disk (<vectorstore>/telemetry) so metrics survive container restarts and updates.
Diff-aware Reindexing
Reindexing is incremental by default β only files whose content changed since the last run are re-embedded. On a 500-file repo, this means a typical reindex after a single-file push takes <1s instead of re-embedding everything.
Use reindex(force=True) via MCP or the Web UI "Reindex" button to force a full rebuild (e.g. after changing the embedding model).
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Docker Container (single process, N projects) β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Web-UI (FastAPI) Port 8080 β β
β β Project CRUD, config, monitoring, search, health β β
β βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ β
β β shared state (ProjectRegistry) β
β βββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ β
β β MCP Server (FastMCP) Port 8081 β β
β β 30 tools (search, write, classify, manage, projects,β β
β β relations, timeline) β β
β βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ β
β β β
β βββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ β
β β Shared Embedding Model (1Γ in RAM) β β
β βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββ β
β β β
β ββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββ β
β β Per-Project Contexts (isolated) β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β β β Project A β β Project B β β Project C β β β
β β β collection β β collection β β collection β β β
β β β watcher β β watcher β β watcher β β β
β β β lock β β lock β β lock β β β
β β β health β β health β β health β β β
β β β quality β β quality β β quality β β β
β β βββββββββββββββ βββββββββββββββ βββββββββββββββ β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β
β /docs/{project}/ β per-project knowledge repos β
β /data/ β shared vectorstore + config + projects β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββSearch Pipeline
query
β
ββββΊ Vector Search (ChromaDB/HNSW, cosine similarity)
β fetch top_k (or top_kΓ5 if reranker enabled)
β
ββββΊ BM25 Keyword Search (bm25s, English stopwords)
β fetch top_k (or top_kΓ5 if reranker enabled)
β
ββββΊ RRF Fusion (configurable k, vector/BM25 weights)
β merge + rank candidates
β
ββββΊ [optional] Cross-Encoder Reranker
β rescore (query, doc) pairs for higher precision
β
ββββΊ Min Relevance Filter (configurable threshold)
β
ββββΊ Return top_k results with relevance scoresWeb UI
Access at http://localhost:8080 (HTTP Basic Auth β credentials shown on first start).
Features:
System health panel: last index, last git pull, git commit, version, search metrics, quality score, skipped files count
Index status and statistics (including reranker status)
Embedding model selection (visual picker)
Search & Retrieval tuning: cross-encoder reranker toggle + model picker, RRF weights, minimum relevance threshold
Chunking strategy configuration
Git sync settings (URL, branch, auto-push toggle)
Test search interface
Knowledge quality checker (also runs automatically after every reindex)
Search metrics (hits/total, miss rate, per-tool breakdown)
Skipped files indicator (files excluded from indexing due to critical quality issues)
"This is the Way" β Knowledge Bootstrap: agent-driven project classification + in-repo cleanup (Web UI shows guidance + advanced scan)
Multi-project switcher (manage multiple repos from one instance)
Client configuration snippets (Cursor, Claude Desktop, Docker)
Password management
Development
# Clone
git clone https://github.com/dl4rce/flaiwheel.git
cd flaiwheel
# Install
pip install -e ".[dev]"
# Run tests (259 tests covering readers, quality checker, indexer, reranker, health tracker, MCP tools, model migration, multi-project, bootstrap, classification, file-context, cold-start analyzer)
pytest
# Run locally (needs /docs and /data directories)
mkdir -p /tmp/flaiwheel-docs /tmp/flaiwheel-data
MCP_DOCS_PATH=/tmp/flaiwheel-docs MCP_VECTORSTORE_PATH=/tmp/flaiwheel-data python -m flaiwheelLicense
Business Source License 1.1 (BSL 1.1)
Flaiwheel is source-available under the Business Source License 1.1.
You may use Flaiwheel for free if:
Your use is non-commercial (personal, educational, no revenue), or
Your organization has no more than 10 individuals using it
Commercial use beyond these limits (e.g., teams of 11+ or commercial deployment) requires a paid license.
Effective 2030-02-25, this version converts to Apache License 2.0 (fully open source)
Commercial licenses: info@4rce.com | https://4rce.com
See LICENSE for full terms.
Available Tools
30 toolsanalyze_codebaseA
Analyze a source code directory and return a cold-start bootstrap report. Read-only.
Does not modify source files or the vector index. Runs entirely
server-side using Python ast, regex, and local MiniLM embeddings β
no cloud calls, no token cost.
The report is cached at /data/coldstart-{project}.md after the first
run and returned instantly on subsequent calls. Use force=True only
after significant code changes β not for routine sessions.
Use at the START of work on an unfamiliar codebase instead of reading
dozens of files. Then use the write_*() tools to document the top
files identified in the report. Use classify_documents() for existing
.md files in the project repo.
The path must be accessible inside the Docker container (i.e. mounted
as a volume). It cannot reach paths on the host that are not mounted.
Args:
path: Absolute path to the source directory to scan
force: Regenerate even if a cached report exists (default: False)
project: Target project name (optional)
Returns:
Markdown report (~5β20 KB) with language distribution, category map,
top 20 files ranked by documentability, near-duplicate file pairs,
undocumented directories, and recommended next steps.
Inputs: path (required), force, project. Returns: result
analyze_knowledge_repoA
Analyse the knowledge repo for structure issues, duplicates, and misplaced files.
Read-only β no files are modified. Scans files already inside the
knowledge repo (inside the Docker volume), not the project source repo.
Caches the report in memory so execute_cleanup() can act on it in the
same session.
To classify and migrate files from the project source repo use
classify_documents() instead. For a simpler quality check without
cleanup proposals use check_knowledge_quality().
Args:
project: Target project name (optional)
Returns:
Structured report with file counts by category, duplicate pairs,
misplaced files, and numbered proposed cleanup actions (a1, a2, β¦)
ready for execute_cleanup().
Inputs: project. Returns: result
check_knowledge_qualityA
Validate the knowledge base for consistency and structural correctness. Read-only.
Does not modify any files or the vector index. Use periodically
or after adding many documents to spot quality regressions.
Use validate_doc() instead to check a single document before committing.
Use get_index_stats() to check chunk counts rather than quality.
Args:
project: Target project name (optional)
Returns:
Quality score 0β100, counts of critical/warning/info issues,
and a per-file issue list tagged [!] critical, [~] warning, [i] info.
Critical issues cause files to be skipped during indexing.
Inputs: project. Returns: result
check_updateA
Check whether a newer Flaiwheel version is available on GitHub. Read-only.
Makes a single network request to GitHub (git ls-remote) to compare
version tags against the running version. No files are modified.
Use when you suspect Flaiwheel may be outdated, or periodically to
keep the server current.
Returns:
"Up to date" message, or the available version number plus the
exact bash command to give the user for upgrading.
Inputs: no named parameters. Returns: result
classify_documentsA
Classify project repo documents for migration into the knowledge base. Read-only.
Does not write any files. The agent reads project files locally and
passes their content here; the Docker container cannot access the
project source repo directly. Flaiwheel classifies each file by
semantic similarity and returns a migration plan.
Trigger: user says "This is the Way" or "42".
Step 1 of the migration workflow β after classification, use the
suggested write_*() tool for each file to push it into the knowledge base.
Use analyze_knowledge_repo() instead when files are already inside the
knowledge repo and need reorganisation.
Args:
files: JSON array of {"path": "...", "content": "..."} objects.
Send the first ~2000 characters of each file as content.
Example: [{"path": "docs/auth.md", "content": "# Auth..."}]
project: Target project name (optional)
Returns:
Per-file classification (category, suggested write_*() tool),
duplicate detection, and a step-by-step migration plan.
Inputs: files (required), project. Returns: result
execute_cleanupA
Execute approved cleanup actions from analyze_knowledge_repo().
Side effects: moves files within the knowledge repo using git mv
(preserves git history) and creates missing category directories.
NEVER deletes any file. Requires analyze_knowledge_repo() to have
been called first in this session.
Use "all" to execute every proposed action, or pass a comma-separated
list of specific action IDs (e.g. "a1,a3") to cherry-pick.
Call reindex() after cleanup to rebuild the search index.
Args:
actions: Comma-separated action IDs from the analysis report,
e.g. "a1,a2,a5", or "all" to execute everything
project: Target project name (optional)
Returns:
Per-action results (directories created, files moved), any errors,
and a rollback command to undo the moves if needed.
Inputs: actions (required), project. Returns: result
get_active_projectA
Show the active project for this session. Read-only, no side effects.
Use to verify which project is bound before making tool calls.
Use set_project() to change the binding. Use list_projects() to see
all registered projects and their stats.
Returns:
Active project name, chunk count, and docs path when bound.
Instructions to call set_project() or setup_project() when not bound.
Inputs: no named parameters. Returns: result
get_file_contextA
Retrieve knowledge base context relevant to a specific source file. Read-only.
Runs multiple semantic searches derived from the filename and returns
architecture decisions, past bugfixes, and best practices related to
that file β without requiring a manual search query. No files modified.
Complements get_recent_sessions() (temporal context) with file-level
spatial context. Use before reading or editing any source file.
Use search_docs() for free-form queries not tied to a specific file.
Args:
filename: File path or name being opened/edited, e.g.
"payment.service.ts" or "src/auth/jwt.py"
project: Target project name (optional)
Returns:
Relevant architecture docs, bugfix summaries, and best practices
for the given file, ranked by relevance. Returns "no context found"
when the knowledge base has nothing for that file yet.
Inputs: filename (required), project. Returns: result
get_index_statsA
Show vector index statistics for the active project. Read-only, no side effects.
Use to check how many chunks are indexed, verify a reindex completed,
or inspect the embedding model and chunking configuration.
Use check_knowledge_quality() instead when you want quality issues, not stats.
Args:
project: Target project name (optional)
Returns:
Total chunk count, docs path, embedding provider and model,
chunking strategy, and per-document-type chunk distribution.
Inputs: project. Returns: result
get_recent_sessionsA
Retrieve recent session summaries to restore context. Read-only.
Reads from /data/sessions-{project}.json. Does not modify any data.
Call at the START of every session before any other tools to understand
what was done previously and pick up open questions.
Use save_session_summary() at the END of a session to store context.
Args:
limit: Number of most-recent sessions to return (default: 5, max: 20)
project: Target project name (optional)
Returns:
Timestamped session entries showing summary, decisions, open
questions, and modified files for each session, newest first.
Inputs: limit, project. Returns: result
git_pull_reindexA
Pull latest commits from the knowledge repo git remote, then re-index.
Call this AFTER pushing .md files to the knowledge repo. Runs
'git pull' on the cloned docs directory, then re-indexes only changed
files. No-op if the repo is already up to date.
Requires MCP_GIT_REPO_URL to be configured. Use reindex() instead
when files were written locally (not via git push).
Args:
project: Target project name (optional)
Returns:
"Already up to date" if no changes, otherwise files indexed,
chunks upserted, and stale chunks removed.
Inputs: project. Returns: result
list_projectsA
List all registered projects with chunk counts and health stats. Read-only.
Use to check which projects exist, their index sizes, quality scores,
and git repo URLs. Use get_active_project() to check only the active
project for the current session.
Returns:
Per-project summary: name (with active marker), total chunks,
quality score, docs path, and git repo URL if configured.
Returns setup instructions when no projects are registered.
Inputs: no named parameters. Returns: result
reindexA
Re-index the knowledge base docs into the vector store.
Modifies the vector index in place. Does not modify source .md files.
By default only re-embeds changed files (fast, diff-aware). Set
force=True to rebuild all embeddings from scratch β use this after
changing the embedding model, not for routine updates.
Use git_pull_reindex() instead when the docs changes came from a
git push to the knowledge repo.
Args:
force: Rebuild all embeddings from scratch, not just changed files
(default: False β use only when changing embedding model)
project: Target project name (optional)
Returns:
Files indexed, changed, skipped; chunks upserted; stale chunks removed.
Inputs: force, project. Returns: result
relationsA
Return structured relations for an entity, derived from YAML frontmatter. Read-only.
Entities and edges are declared **explicitly** in markdown frontmatter:
---
id: adr-0042
type: architecture
replaces: [adr-0017]
depends_on: [service-summarizer]
status: active
---
Recognised relation keys: replaces, depends_on, fixes, implements.
Use timeline() to see when the doc holding an entity changed over time.
Args:
entity_id: Frontmatter ``id`` value of the entity to resolve
project: Target project name (optional)
Returns:
Markdown showing the entity, its outbound edges (declared on
this doc), and inbound edges (other docs that reference it).
Lists are truncated; entities not found return a hint.
Inputs: entity_id (required), project. Returns: result
save_session_summaryA
Append a session summary to the project's session log.
Side effects: appends a JSON entry to /data/sessions-{project}.json.
Does not modify the vector index or the knowledge repo. Safe to call
multiple times in one session β each call adds a new entry.
Call at the END of every session. Use get_recent_sessions() at the
START of the next session to restore context.
Args:
summary: What was accomplished this session (1β3 sentences)
decisions: Key decisions made, comma-separated (optional)
open_questions: Unresolved questions or next steps, comma-separated (optional)
files_modified: Files changed, comma-separated (optional)
project: Target project name (optional)
Returns:
Confirmation with the project name and total session count stored.
Inputs: summary (required), project, decisions, files_modified, +1 more. Returns: result
search_bugfixesA
Search only bugfix summaries for similar past problems. Read-only, no side effects.
Prefer this over search_docs() when debugging β it filters to bugfix
documents only, surfacing root causes and solutions faster.
Use search_docs() for broader queries that span all doc types.
Args:
query: Description of the current problem or error message
top_k: Number of results (default: 5)
project: Target project name (optional)
Returns:
Ranked bugfix chunks showing root cause, solution, and lessons
learned, with source file and relevance %. Prompts to call
write_bugfix_summary() when no matches are found.
Inputs: query (required), top_k, project. Returns: result
search_by_typeA
Search filtered by a specific document category. Read-only, no side effects.
Use instead of search_docs() when you know the category β it improves
precision by restricting results to that type only.
Use search_bugfixes() or search_tests() as convenient shortcuts for
those specific categories.
Args:
query: Search query (natural language)
doc_type: Category filter β one of: "architecture", "api",
"bugfix", "best-practice", "setup", "changelog",
"test", "readme", "docs"
top_k: Number of results (default: 5)
project: Target project name (optional)
Returns:
Ranked chunks of the specified type with source, relevance %, and text.
Inputs: query (required), doc_type (required), top_k, project. Returns: result
search_docsA
Semantic search over the ENTIRE project knowledge base. Read-only, no side effects.
Use this ALWAYS before writing or changing code to retrieve architecture
decisions, past bugs, best practices, and API contracts.
Prefer search_bugfixes() when debugging a specific error (searches only
bugfix summaries). Use search_by_type() when you know the category.
Use search_tests() when looking for test coverage.
Args:
query: What you want to know (natural language, be specific)
top_k: Number of results (default: 5, increase for broad questions)
project: Target project name (optional, defaults to active project)
Returns:
Ranked doc chunks, each showing source file:line, section heading,
relevance %, doc type, and text. Returns a "no results" message with
a rephrasing suggestion when nothing matches.
Inputs: query (required), top_k, project. Returns: result
search_testsA
Search test case documents in the knowledge base. Read-only, no side effects.
Call BEFORE write_test_case() to check what is already covered and
avoid duplicates. Equivalent to search_by_type(query, "test") but
more intent-clear for test-coverage workflows.
Args:
query: What to search for (e.g. "authentication edge cases")
top_k: Number of results to return (default: 5)
project: Target project name (optional)
Returns:
Ranked test case chunks with scenario, steps, expected result,
and status. Returns a prompt to call write_test_case() when empty.
Inputs: query (required), top_k, project. Returns: result
set_projectA
Bind all subsequent tool calls in this session to a specific project.
In-memory only β no files are created or modified. The binding is
per-connection: setting project A in workspace-1 does not affect
workspace-2. The project= parameter on individual tools overrides
this session binding for a single call.
Call at the START of every session. Use setup_project() to create
a new project. Use get_active_project() to check the current binding.
Args:
name: Name of a registered project (see list_projects())
Returns:
Active project name, chunk count, and docs path on success.
Lists available projects and suggests setup_project() on failure.
Inputs: name (required). Returns: result
setup_projectA
Register and initialise a new project in Flaiwheel.
Side effects: creates a project directory under MCP_DOCS_PATH, optionally
clones the git knowledge repo, runs an initial index, and binds this
session to the new project. Idempotent β safe to call again if the
project already exists (just rebinds the session).
Call once per project. Use set_project() to switch between already
registered projects. Use list_projects() to see what exists.
Args:
name: Short project identifier, no spaces (e.g. "my-app")
git_repo_url: HTTPS URL of the knowledge git repo (optional,
can be added later via the Web UI)
git_branch: Branch to track for git sync (default: "main")
display_name: Human-readable label shown in the Web UI (optional)
git_auto_push: Auto-commit and push write_*() docs to git (default: True)
git_sync_interval: Background git pull interval in seconds (default: 300)
Returns:
Project name, chunk count, active-project confirmation, and next steps.
Inputs: name (required), git_branch, display_name, git_repo_url, +2 more. Returns: result
timelineA
Return the git history of the document that holds an entity. Read-only.
Resolves ``entity_id`` to a file via frontmatter ``id:`` field, then
runs ``git log`` for that file. Use this to answer "what was true at
time T?" β Git history is the validity window; no separate
``valid_from``/``valid_to`` columns are stored.
Args:
entity_id: Frontmatter ``id`` value of the entity
limit: Max commits to return (default 20, max 200)
project: Target project name (optional)
Returns:
Newest-first list of commits with short hash, ISO date, author,
and subject. Empty result hints if the docs repo is not a git
checkout or the file has no history.
Inputs: entity_id (required), limit, project. Returns: result
validate_docA
Validate a markdown document before committing it to the knowledge repo. Read-only.
Does not write any files or modify the index. Not needed when using
the write_*() tools β they validate internally. Use this only when
you are writing raw markdown and committing it manually via git.
Args:
content: Full markdown content to validate
category: Target category β one of: "architecture", "api",
"bugfix", "best-practice", "setup", "changelog", "test", "docs"
project: Target project name (optional)
Returns:
"OK" if the document passes all checks, or a list of issues
tagged [!] critical (blocks indexing), [~] warning, [i] info.
Inputs: content (required), project, category. Returns: result
write_api_docA
Create an API endpoint document, index it, and auto-push to git.
Side effects: creates api/{slug}.md in the docs path, indexes it into
the vector store, and pushes to git if configured. Overwrites an
existing file with the same title.
Use for HTTP endpoints, REST APIs, and RPC schemas.
Use write_architecture_doc() for system-level design decisions.
Use write_best_practice() for API coding conventions.
Args:
title: Short title (e.g. "Create User Endpoint")
endpoint: URL path (e.g. "/api/v1/users")
method: HTTP method: GET, POST, PUT, PATCH, DELETE, etc.
request_schema: Request body or query params description
response_schema: Response body schema and status codes
auth: Authentication/authorization requirements (optional)
examples: Curl or code examples (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: title (required), method (required), endpoint (required), request_schema (required), +4 more. Returns: result
write_architecture_docA
Create an architecture decision or system design document, index it, and auto-push.
Side effects: creates architecture/YYYY-MM-DD-{slug}.md in the docs path,
indexes it into the vector store, and pushes to git if configured.
Overwrites an existing file with the same title.
Use for system design, ADRs, and component relationships.
Use write_api_doc() for HTTP endpoint specs, write_best_practice()
for coding patterns, write_bugfix_summary() after fixing bugs.
Include a Mermaid diagram in the diagrams field for best results.
Args:
title: Short title (e.g. "Payment Service Architecture")
overview: High-level description of the system/component
decisions: Key architectural decisions made and why
trade_offs: Alternatives considered and rejected, pros/cons
components: Optional component breakdown (optional)
diagrams: Optional Mermaid or ASCII diagrams (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: title (required), overview (required), decisions (required), trade_offs (required), +3 more. Returns: result
write_best_practiceA
Create a coding standard or best practice document, index it, and auto-push.
Side effects: creates best-practices/{slug}.md in the docs path,
indexes it into the vector store, and pushes to git if configured.
Overwrites an existing file with the same title.
Use for recurring patterns, conventions, and rules the team should follow.
Use write_architecture_doc() for system-level decisions,
write_bugfix_summary() after fixing a specific bug.
Args:
title: Short title (e.g. "Error Handling in API Routes")
context: When and where this practice applies
rule: The actual rule or pattern to follow (be specific)
rationale: Why this rule exists and what problems it prevents
examples: Code examples showing correct vs incorrect usage (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: rule (required), title (required), context (required), rationale (required), +2 more. Returns: result
write_bugfix_summaryA
Create a bugfix summary .md file, index it immediately, and auto-push to git.
MANDATORY after every bug fix β these summaries are retrieved during
future debugging sessions to avoid repeating the same mistakes.
Side effects: creates bugfix-log/YYYY-MM-DD-{slug}.md in the knowledge
repo docs path, indexes it into the vector store, and pushes to the
remote git repo if MCP_GIT_REPO_URL is configured. Overwrites an
existing file if the same title is used on the same day.
Use write_architecture_doc() for design decisions,
write_best_practice() for recurring patterns.
Args:
title: Short, descriptive title of the bug (used in filename)
root_cause: What was the actual cause? (be technical)
solution: How was it fixed? (describe code changes made)
lesson_learned: What should be done differently next time?
affected_files: Comma-separated list of changed files (optional)
tags: Comma-separated categories, e.g. "auth,race-condition,critical" (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: title (required), solution (required), root_cause (required), lesson_learned (required), +3 more. Returns: result
write_changelog_entryA
Create a changelog entry for a release, index it, and auto-push to git.
Side effects: creates changelog/{version-slug}.md in the docs path,
indexes it into the vector store, and pushes to git if configured.
Calling twice with the same version overwrites the existing entry.
Returns an error if none of added/changed/fixed/breaking is provided.
Use for release notes and version history. At least one of the
content fields (added, changed, fixed, breaking) must be non-empty.
Args:
version: Version string (e.g. "2.1.0" or "v3.9.40")
release_date: ISO date string (e.g. "2026-05-03")
added: New features added in this release (optional)
changed: Changes to existing functionality (optional)
fixed: Bug fixes included (optional)
breaking: Breaking changes requiring migration (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: version (required), release_date (required), added, fixed, +3 more. Returns: result
write_setup_docA
Create a setup, deployment, or infrastructure document, index it, and auto-push.
Side effects: creates setup/{slug}.md in the docs path, indexes it
into the vector store, and pushes to git if configured. Overwrites
an existing file with the same title.
Use for environment setup guides, CI/CD configuration, Docker or
infrastructure docs, and deployment runbooks.
Use write_architecture_doc() for system design rather than how-to guides.
Args:
title: Short title (e.g. "Local Development Setup")
prerequisites: Tools, accounts, or config required before starting
steps: Step-by-step instructions (numbered list recommended)
verification: How to confirm the setup is working correctly
troubleshooting: Common issues and their fixes (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: steps (required), title (required), verification (required), prerequisites (required), +2 more. Returns: result
write_test_caseA
Create a test case document, index it immediately, and auto-push to git.
Call search_tests() first to check for existing coverage before adding
a new test case.
Side effects: creates tests/YYYY-MM-DD-{slug}.md in the docs path,
indexes it into the vector store, and pushes to git if configured.
Use after writing or modifying tests to make them discoverable.
Status values: "pass", "fail", "blocked", "pending" (default: pending).
Args:
title: Short test case title (e.g. "User login with expired token")
scenario: What is being tested and why (the test intent)
steps: Step-by-step test procedure
expected_result: What should happen when the test passes
preconditions: Setup required before running the test (optional)
actual_result: Observed result if already executed (optional)
status: "pass", "fail", "blocked", or "pending" (optional)
tags: Comma-separated tags, e.g. "auth,regression,critical" (optional)
project: Target project name (optional)
Returns:
Saved filename, chunk count, and whether auto-push succeeded.
Inputs: steps (required), title (required), scenario (required), expected_result (required), +5 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 30 tools
Each tool has a clearly distinct purpose, from codebase analysis to document writing and search. Even similar tools like search_docs, search_bugfixes, and search_by_type are differentiated by scope and description, eliminating ambiguity.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., analyze_codebase, get_index_stats, write_api_doc). This uniformity makes it easy to predict tool functionality from its name.
30 tools is high but justified by the scope of the server, which covers analysis, search, writing, indexing, and project management. Some tools could potentially be merged (e.g., search_by_type with search_docs), but overall the count is reasonable for the intended functionality.
The tool set covers the full knowledge management lifecycle: analysis, classification, writing, indexing, search, and session management. Minor gaps exist, such as the lack of explicit deletion tools for documents or projects, but the core workflow is well-supported.
Maintenance
Related MCP Connectors
Team memory for AI coding agents and code reviews, reviewed by humans and served over MCP.
Persistent, inspectable memory for AI agents with lineage, correction, and a hosted MCP endpoint.
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
A second brain for your AI agent. Shared memory for your team's AI agents, plus public and private knowledge bases β works with ChatGPT, Claude, Cursor and any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that transforms codebases into knowledge graphs using Neo4J, enabling AI assistants to understand code structure, relationships, and metrics for more context-aware assistance.28MIT
- AlicenseNot gradedqualityDmaintenanceProvides advanced document search and processing capabilities through vector stores, including PDF processing, semantic search, web search integration, and file operations. Enables users to create searchable document collections and retrieve relevant information using natural language queries.MIT
- AlicenseBqualityDmaintenanceEnables web search via Serper API with advanced search operators and webpage scraping capabilities to extract content in plain text or markdown format.22,292 npmMIT
- AlicenseNot gradedqualityDmaintenancePersistent codebase knowledge layer for AI agents. Pre-digests codebases into structured knowledge (symbols, dependency graphs, co-change patterns, architectural decisions) and serves via MCP. 28 languages, 14 tools, ~85% token reduction.22 npm10MIT