Skip to main content

Knowledge Item (KI) management MCP server for AI-assisted development

Project description

ki-manager — Knowledge Item MCP Server

AI-powered knowledge management for software projects.
Install once, use across all your projects.


What is ki-manager?

ki-manager is an MCP (Model Context Protocol) server that turns any project into a self-documenting codebase for AI agents (Claude, Antigravity, Cursor, Windsurf, etc.).

It provides:

  • Knowledge Items (KI) — structured Markdown snapshots of each module, stored in .ki-base/knowledge/
  • Coverage Audit — measures how well your KI base covers your actual code
  • Dependency Analysis — auto-updates "Related KIs" by analyzing imports
  • Git Snapshots — versioned knowledge state (git_checkpoint, git_restore)
  • Scaffolding — one command creates the complete .ki-base/ structure in any project

Installation

Option A: uvx (recommended — no install needed)

{
  "mcpServers": {
    "ki-manager": {
      "command": "uvx",
      "args": ["ki-manager"]
    }
  }
}

Requires uv — install with: curl -LsSf https://astral.sh/uv/install.sh | sh

Eager vs Lazy Loading (Advanced)

Because ki-manager provides a large number of tools, AI IDEs may downgrade it to "lazy" loading to save context window. For maximum performance, you can split the server into two instances using the --mode flag. This allows lightweight tools (status, read_know_file) to load natively (eager), while heavy operations remain lazy:

{
  "mcpServers": {
    "ki-manager-eager": {
      "command": "uvx",
      "args": ["ki-manager", "--mode", "eager"],
      "lifecycle": "eager"
    },
    "ki-manager-lazy": {
      "command": "uvx",
      "args": ["ki-manager", "--mode", "lazy"]
    }
  }
}

Option B: Smithery (Claude Desktop / Cursor / Windsurf GUI)

Search for ki-manager in your IDE's MCP marketplace and click Install.

Option C: pip

pip install ki-manager
ki-manager  # starts the MCP server

Option D: Docker

docker run -i --rm -v "$(pwd):/workspace" ghcr.io/laeryid/ki-manager

Quickstart

1. Add the MCP server to your IDE

Pick one of the options above and add it to your MCP config.

2. Initialize a project

In your IDE chat, call the ki_init_project tool:

ki_init_project(project_path="/absolute/path/to/your-project")

This creates:

your-project/
└── .ki-base/
    ├── config.json          ← machine-specific (auto-added to .gitignore)
    ├── ki_config.json       ← project settings (commit to git)
    ├── doc_config.json      ← file→KI map (commit to git)
    ├── AGENTS.md            ← agent instructions (commit to git)
    ├── DIR_INDEX.md         ← directory index (commit to git)
    └── knowledge/
        └── _OVERVIEW.ki.md  ← starter Knowledge Item

3. Start documenting

Use the available tools or slash commands:

Tool / Command Action
audit_coverage Find documentation gaps
generate_dir_index Build directory index
sync_agents_md Sync KI table in AGENTS.md
git_checkpoint Save knowledge snapshot to git
/expand-knowledge Iteratively fill gaps (Antigravity)
/sync-knowledge Full sync workflow (Antigravity)
/create-adr Record architectural decision

What Goes Into Git?

Path Git Notes
.ki-base/knowledge/*.ki.md Project knowledge
.ki-base/doc_config.json Module manifest
.ki-base/ki_config.json Project settings
.ki-base/AGENTS.md Agent instructions
.ki-base/DIR_INDEX.md Directory index
.ki-base/config.json Machine-specific paths
.ki-base/doc_state.json Hash cache

Security

The MCP server operates in a sandbox:

  • All file access is restricted to the .ki-base/ directory
  • Executable files (.py, .exe, .sh, etc.) cannot be modified via MCP
  • Critical config files are protected from direct overwrite

Project Structure (this repo)

ki-manager/
├── pyproject.toml            ← pip / uvx package config
├── smithery.yaml             ← Smithery MCP marketplace config
├── src/ki_manager/
│   ├── server.py             ← MCP server entry point
│   ├── tools/
│   │   └── scaffold.py       ← ki_init_project implementation
│   └── scripts/              ← bundled analysis scripts
│       ├── ki_utils.py       ← shared utilities
│       ├── audit_coverage.py
│       ├── sync_agents_md.py
│       ├── generate_dir_index.py
│       ├── ki_dependency_analyzer.py
│       └── ...
├── knowledge/                ← KI documentation of this repo itself
└── decisions/                ← Architecture Decision Records

License

MIT — free to use, copy, and adapt.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ki_manager-2.0.7.tar.gz (33.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ki_manager-2.0.7-py3-none-any.whl (45.0 kB view details)

Uploaded Python 3

File details

Details for the file ki_manager-2.0.7.tar.gz.

File metadata

  • Download URL: ki_manager-2.0.7.tar.gz
  • Upload date:
  • Size: 33.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ki_manager-2.0.7.tar.gz
Algorithm Hash digest
SHA256 1296d35eabd843953d79729605c4087cdaf1b703bef97c14149a81483a0c5e21
MD5 6d3846324698119a51e99be7b30a9230
BLAKE2b-256 a655f8dc8f500a7f62205e8e3ce11bacfd1f06f54c8dff9787eb1b87050d16cc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ki_manager-2.0.7.tar.gz:

Publisher: publish.yml on Laeryid/KI-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ki_manager-2.0.7-py3-none-any.whl.

File metadata

  • Download URL: ki_manager-2.0.7-py3-none-any.whl
  • Upload date:
  • Size: 45.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ki_manager-2.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 08ecf1f9a3266913721faa4da036f32bb9e82aaf7a37329aa52452335985a080
MD5 9091ab8fc7bad9ae0c13df9c7b11f294
BLAKE2b-256 094c5256f72fc19d2af2bb45436b84f90bb977c951960047d17dda9a12d2afc7

See more details on using hashes here.

Provenance

The following attestation bundles were made for ki_manager-2.0.7-py3-none-any.whl:

Publisher: publish.yml on Laeryid/KI-base

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page