codebase-wiki
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Codebase Wiki
Architectural knowledge base with MCP interface for AI agents.
Agents discover services, generate LLM-powered docs with Mermaid C2/C3/sequence diagrams, and index them for semantic search. Includes self-learning notes and first-class workflow/flow indexing.
Quick Start
npm install -g @carreira-cloud/codebase-wiki
cd my-project
codebase-wiki init # Initialize knowledge base
codebase-wiki serve # Browse at http://localhost:3080
codebase-wiki start-mcp # Start MCP server for AI agentsRelated MCP server: ainative-opencode-memory-mcp
Commands
Command | Description |
| Initialize knowledge base for current repo |
| Start web UI (markdown + mermaid rendering, flows tab) |
| Start MCP server (stdio JSON-RPC, 12 tools) |
| Search docs, notes, and flows by keyword |
| Retrieve full documentation for a service |
| List all indexed services |
| Statistics: services, flows, notes, content size |
| Install OpenCode skills and commands |
MCP Tools
Documentation (8 tools)
Tool | Description |
| Index an LLM-generated architectural document |
| Search documentation by keyword |
| Retrieve full documentation for a service |
| List all indexed services |
| Remove a service's documentation |
| Statistics: services, content size, notes count, flows count |
Self-Learning Notes (3 tools)
Tool | Description |
| Store a self-learning discovery note |
| Search agent notes by keyword |
| List notes (optional type filter) |
Workflows & Flows (3 tools)
Tool | Description |
| Index a workflow diagram with keywords and linked services |
| Search flows across all services by keyword |
| List flows (optional service/flow_type filter) |
OpenCode Commands
/wiki generate <service> → Agent discovers, generates docs, indexes via MCP
/wiki generate-all → Generate docs for all services
/wiki enhance <service> <flow> → Add Mermaid C3/C2/sequence diagrams
/wiki discover-flows <service> → Discover and index all workflows with edge cases
/wiki flow-search <query> → Search flows across all services
/wiki flow-list <service> → List flows for a service
/wiki search <query> → Search docs + notes + flows
/wiki get <service> → Retrieve full doc
/wiki list → List all indexed services
/wiki stats → Knowledge base statisticsSelf-Learning
Agents automatically add notes when they discover something new. Six note types:
Type | Trigger |
| Unexpected behavior, edge case, known bug |
| Recurring pattern across 2+ services |
| Undocumented service integration detail |
| Code convention, naming pattern |
| Design decision (lightweight ADR) |
| Shortcut, useful command, workflow hack |
Flows & Diagrams
Each flow is independently indexed with:
Mermaid sequence diagram (happy path + error paths + edge cases)
Keywords for discoverability
Linked services for cross-service navigation
Flow type: happy_path, error_path, edge_case, recovery, full
Diagrams render in the web UI via Mermaid.js. The UI also renders service documentation markdown (tables, code blocks, headings) via marked.js.
Architecture
src/
├── cli.ts # CLI entry (8 commands)
├── mcp-server.ts # MCP JSON-RPC server (12 tools)
├── ui-server.ts # Web UI (marked.js + mermaid.js, flows tab)
├── lancedb/client.ts # JSON file-backed storage (docs, notes, flows)
├── types.ts # TypeScript types
└── index.ts # Public API exports
docs/
├── getting-started.md
├── mcp-tools.md
├── self-learning.md
├── configuration.md
└── architecture.mdStorage: .codebase-wiki/rag_db/docs.json + notes.json + flows.json
License
MIT — Bruno Carreira
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Private, multimodal knowledge store for agents: hybrid search with cited, provenance-backed results.
1
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides persistent, searchable memory and knowledge capture for AI-assisted development, enabling agents to retain decisions, bugs, and patterns across sessions and projects.53 PyPIMIT
- AlicenseAqualityDmaintenanceProvides persistent memory for OpenCode coding agents, allowing them to store and recall architecture decisions, conventions, and gotchas across sessions via semantic search.5100 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to record and retrieve architectural decision records, check precedent before making decisions, and avoid repeating past mistakes or contradicting settled choices.92 PyPI4Apache 2.0
- FlicenseNot gradedqualityCmaintenanceEnables AI agents like Claude and Codex to store, search, and exchange project knowledge such as architectural decisions and work packets, with tenant isolation for security.-