The Problem

Teams adopting LLMs face a context problem: internal knowledge lives in scattered documents, gets copy-pasted into chatbots, and reaches models without access control or traceability. Arkon addresses this by centralizing organizational knowledge into a permission-scoped wiki served to AI clients through a single MCP endpoint.

What This Does

Arkon is a self-hosted knowledge management layer with a Python/Django-style backend (app/) and a Next.js frontend (frontend/). The core is an MRP pipeline (app/ai/mrp/) that maps source documents, reduces them into structured wiki pages, plans changes for human review, merges new content with existing pages, and verifies claims against source material. Every page tracks which documents it was compiled from.

The system exposes a Model Context Protocol server (app/mcp/server.py) that lets Claude and other LLM clients query the wiki through a single permission-scoped endpoint. Access control is enforced at the API, MCP, and search layers via a permission engine (app/services/permission_engine.py) with department-level and global scopes.

How It Is Wired

Execution starts at app/main.py, which mounts the FastAPI application, the MCP server at app/mcp/server.py, and routers under app/routers/. The wiki router (app/routers/wiki.py) handles page CRUD, drafts, and branches; the sources router (app/routers/sources.py) handles document ingestion. Both route through app/services/wiki_service.py and app/services/kb_service.py, which write to the PostgreSQL database via app/database/repository.py and app/database/models.py.

The MRP pipeline is the highest-blast-radius component. app/ai/mrp/pipeline.py orchestrates mapper, reducer, planner, merger, verifier, and writer stages (mapper.py, reducer.py, merger.py, verifier.py, writer.py). A pipeline run makes multiple LLM API calls per document, then writes wiki pages and source references to the database. The pipeline is resumable — drafts persist mid-run, so a crash doesn't repeat expensive LLM work.

The frontend is a standard Next.js app under frontend/src/app/, with pages for wiki browsing, knowledge graph visualization, admin settings, and audit logs. It talks to the backend via REST endpoints. The app/worker.py file suggests background task processing, though the exact worker framework isn't documented in the structure.

Database migrations live in alembic/versions/ — 36 migrations covering schema evolution from initial tables through RBAC, wiki branches, and multi-dimensional embeddings. The alembic/env.py handles migration execution.

How To Use It

Setup: Docker is the primary path — docker-compose.yml at the root defines the full stack (backend, frontend, PostgreSQL). Build with:

docker compose up --build

Configuration: Copy .env.docker.example to .env and set database credentials, LLM API keys (Anthropic, OpenAI, Google providers are supported via app/ai/providers/), and OAuth settings. The app/config.py file loads these.

Running it: The Docker entry point (entrypoint.sh) starts the backend and applies migrations. For development, run the backend with uvicorn app.main:app and the frontend with npm run dev in frontend/.

Real-World Use

An HR team connects Claude Desktop to Arkon via OAuth. When an employee asks about parental leave policy, the MCP server routes the query through the permission engine, returns only pages from the HR department scope, and includes source citations. An editor ingests a new policy PDF via the sources router; the MRP pipeline generates a plan, the editor approves it, and the wiki updates without losing prior content.

Code Health & Issues

  • Med - No CI/CD pipeline - no .github/ directory or CI config exists, so there's no automated build or test gate.
  • Low - Test coverage is thin - 8 test files across the entire repo, none covering the MRP pipeline or MCP server directly.
  • Low - License is restrictive - PolyForm Internal Use 1.0.0 permits internal use but not redistribution or commercial SaaS offerings.

The Bottom Line

Arkon is a serious, well-architected answer to the enterprise AI context problem. The MRP pipeline and permission scoping are genuinely differentiated. The lack of CI and thin test coverage are the main risks for a team adopting it. It's a strong fit for organizations that need controlled, traceable AI access to internal knowledge and can invest in hardening the deployment pipeline.