AgentWiki v0.2.0
LOCAL MCP SERVER & DETERMINISTIC CONTEXT ENGINE

Deterministic Knowledge for AI Coding Agents.

Turn chaotic markdown and tribal codebase knowledge into a sub-400-token deterministic index for Cursor and Claude Code. Zero hallucinations. Sub-5ms retrieval.

$ npx @hamidshahid/agentwiki init
How It Works
agentwiki terminal session
stdio active
$ agentwiki status
Knowledge Root .agentwiki/
Indexed Files 14 documents (architecture, api, specs)
Index Footprint 48.2 KB (SQLite FTS5 + JSON)
Registered Tools 3 tools (search, read, propose_diff)
Daemon Transport stdio (Cursor & Claude Code)
OK Knowledge index up to date (compiled in 12ms)
MCP Local stdio MCP server ready on port unix:stdio
TCR Atomic test-commit-revert cycle verification active
TOKEN ECONOMICS

Radical Context Compression

LLM context windows degrade rapidly when flooded with raw markdown and entire documentation files. AgentWiki compiles and extracts only high-value semantic nodes.

RAW UNSTRUCTURED INGESTION Standard Practice
2,169 tokens / query

Bloated context, prose filler, and redundant boilerplate injected into every prompt.

# Documentation Overview
This guide explains how authentication works in our system...
We support OAuth2, JWT, and API keys. Here is an explanation...
Lorem ipsum detailed background on legacy architecture v1...
[+ 148 lines of prose, markdown headers, and unparsed text]
Query Latency: ~1,200ms Context Dilution High
82.3% Less Tokens
AGENTWIKI COMPILED SCHEMA Deterministic
384 tokens / query

Exact typed entities, constraints, and deterministic function signatures only.

{
"entity": "AuthStrategy",
"invariant": "JWT stored in HttpOnly cookies only",
"guardrails": ["No raw tokens in localStorage"],
"endpoints": ["/api/v1/auth/refresh", "/api/v1/auth/verify"]
}
Retrieval Latency: <4ms Zero Hallucinations
82.3%
Context Window Reduction
< 5ms
SQLite FTS5 Query Speed
100%
Local & Offline Stdio
ARCHITECTURE

Engineered for Deterministic Execution

Three crisp mechanisms make AgentWiki the most reliable knowledge engine for autonomous coding agents.

01 / COMPILE

Git-Native Knowledge Graph

Store documentation in human-readable markdown inside .agentwiki/. AgentWiki parses frontmatter, extracts relational links, and builds an optimized SQLite database in milliseconds.

$ agentwiki compile → index.db
02 / SERVE

Zero-Config Local MCP Stdio

Runs as a standard I/O process compliant with the Model Context Protocol. Seamlessly works with Cursor, Claude Code, and Windsurf without network overhead or cloud tokens.

Transport: stdio / JSON-RPC 2.0
03 / REVIEW

Atomic Proposal Diffs

When agents discover architecture updates, they submit proposals via agentwiki_propose_diff. Review changes via the Obsidian CLI with confidence scores before accepting.

$ agentwiki review → git diff
PROTOCOL SPECIFICATION

Three High-Precision MCP Tools

AgentWiki provides a minimal, non-overlapping tool surface for AI models. Click any tool below to inspect its schema and JSON-RPC payload.

agentwiki_search(query, limit)
Sub-5ms BM25 full-text search returning relevant documents with token metrics.
READ-ONLY
// Example tool call from Claude Code
{
  "name": "agentwiki_search",
  "arguments": {
    "query": "authentication token rotation",
    "limit": 3
  }
}
QUICKSTART

Up and Running in 60 Seconds

Zero installation footprint. Compatible with all modern LLM IDEs and terminals.

1

Initialize AgentWiki in your repository

Creates the .agentwiki/ directory with starter documentation templates and schema validation.

$ npx @hamidshahid/agentwiki init
2

Compile the knowledge graph

Builds the local SQLite full-text search index and verifies Markdown frontmatter integrity.

$ npx @hamidshahid/agentwiki compile
3

Register the MCP Server in Cursor or Claude Code

Add the following block to your .cursor/mcp.json or Claude Code configuration:

{
  "mcpServers": {
    "agentwiki": {
      "command": "npx",
      "args": ["-y", "@hamidshahid/agentwiki", "serve"]
    }
  }
}