WikoriDocsMCP & AI Agents

MCP & AI Agents

Connect any AI agent to your vault — with persistent memory, reliability-ranked search, and auto-generated schema intelligence.

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI agents call tools and read resources from external servers. Wikori runs a built-in MCP server — so instead of copy-pasting content into your AI's chat, the agent can search and read your vault directly, on demand.

Beyond basic search, Wikori's MCP layer includes agent memory — agents save decisions, errors, and patterns into your vault as persistent entries. It also includes confidence-weighted search that ranks results by reliability, and an auto-generated vault schema that helps agents understand your knowledge base before asking a single question.

Starting the MCP Server

1
Go to the MCP page

Click MCP in the left sidebar.

2
Set an MCP Secret

Enter a secret token in the MCP Secret field — this is like a password that your AI agents need to authenticate. Click Save Secret. Keep this private.

3
Start the server

Click Start Server. The status badge turns green: Running on port 8787

Enable Auto-start on launch (in Settings) so the MCP server starts automatically every time Wikori opens. No manual step required.

Connect Claude Desktop

Open your Claude Desktop config file. On macOS it's at ~/Library/Application Support/Claude/claude_desktop_config.json, on Windows at %APPDATA%\Claude\claude_desktop_config.json.

Add the Wikori server to the mcpServers block:

{ "mcpServers": { "wikori": { "command": "npx", "args": ["-y", "mcp-remote", "http://127.0.0.1:8787"], "env": { "AUTH_TOKEN": "your-mcp-secret" } } } }

Replace your-mcp-secret with the secret you set in Wikori. Restart Claude Desktop — Wikori will appear as a connected tool.

The Wikori MCP page has a Copy button that generates this snippet pre-filled with your secret and port. Use that to avoid typos.

Connect Cursor

Open Cursor Settings → Features → MCP Servers. Add a new server with type sse:

{ "mcpServers": { "wikori": { "url": "http://127.0.0.1:8787/sse", "headers": { "Authorization": "Bearer your-mcp-secret" } } } }

Connect Cline / Roo Code

In VS Code with Cline installed, open the Cline settings panel and add an MCP server with HTTP transport:

{ "wikori": { "transport": { "type": "http", "url": "http://127.0.0.1:8787", "headers": { "Authorization": "Bearer your-mcp-secret" } } } }

Connect OpenCode

OpenCode supports MCP via remote HTTP. Add to your opencode.json config:

{ "mcp": { "wikori": { "type": "remote", "url": "http://127.0.0.1:8787", "auth": "Bearer your-mcp-secret" } } }

Agent Prompts

For the best experience, add Wikori's system prompt to your agent so it knows how to navigate your knowledge base. Go to the MCP page in Wikori and copy the prompt from the Agent Prompt (MCP) section. Paste it into your agent's system prompt or instructions.

The prompt teaches the agent:

  • How to list available vaults
  • How to search across all vaults or a specific one
  • How to read individual entries
  • How to navigate the knowledge graph by entity or tag

If your agent doesn't support MCP, use the Legacy Prompt on the MCP page instead. It points the agent directly to your vault's index.md file for search-based navigation.

Multi-Vault Queries

Wikori's MCP server exposes all your vaults, not just the active one. An agent can:

  • List all available vaults
  • Search a specific vault by name or ID
  • Search across all vaults simultaneously
  • Compare content between vaults

You can say things like: "Search the 'startup' vault for anything about pricing" or "Find all mentions of Ray across all my vaults".

Agent Memory

Wikori gives AI agents persistent memory across sessions. Instead of starting from zero every time, an agent can save what it learns — decisions, errors, patterns, preferences — directly into your vault as first-class knowledge entries.

How agents save observations

The agent calls the memory_save tool with:

FieldDescriptionExample
ObservationThe text to save"Agreed to migrate from AWS to GCP by Q3"
Typedecision, error, pattern, preference, or lessondecision
Confidence0.0 to 1.00.95
Memory tierworking, episodic, semantic, or proceduralworking

Each observation becomes a Markdown file with full YAML frontmatter, indexed alongside your human-authored documents on the next wiki rebuild.

The memory lifecycle

1
Working memory

Raw observations from a single session — quick, unfiltered. The default tier for memory_save.

2
Episodic memory

Consolidated summaries of a day's or week's work. The agent uses memory_consolidate to group raw observations and synthesize them into a clean summary.

3
Semantic memory

Distilled facts and evergreen patterns — promoted from high-confidence episodic memories. These are the long-term reference material agents rely on months later.

Real-world examples

  • Decision preservation: After a strategy call, the agent saves "Agreed to switch vendors by Q3. Confidence: 0.95." Three months later, a different session finds this entry and avoids reopening a settled question.
  • Error logging: The agent generates a report in the wrong currency format. It saves "Error: This client expects BRL formatting." Next time, it checks observations before formatting and gets it right.
  • Pattern recognition: After reviewing 5 vendor contracts, the agent saves "Pattern: All vendors include a 90-day termination clause. Negotiate for 30 days." Searchable, AI-discovered intelligence for the whole team.

Use memory_sessions to review recent working memories at the start of any new session. This gives your agent continuity without re-reading the entire vault.

Vault Schema

Every time you rebuild the wiki, Wikori auto-generates a SCHEMA.md file at the vault root. This file is a structured overview that tells AI agents what your vault contains before they search a single document.

What's in the schema

  • Taxonomy: Entity types, tags, memory tiers, and source types found in the vault
  • Inferred conventions: Patterns the system has detected (e.g., "entries tagged #compliance and typed decision appear together 12 times")
  • Ground Truth: A curated list of entries with confidence ≥ 0.9 and source_authority: high — the most reliable material in the vault

Agents read the schema via the get_vault_schema tool. A well-written agent prompt instructs the agent to call this first, before any search — so it understands the vault's structure and knows which entries to trust most.

The schema regenerates automatically on every wiki rebuild. You never need to write or edit it manually — it's always in sync with your vault's actual contents.

All Memory Tools Reference

ToolWhat it doesWhen to use it
get_vault_schemaRead the auto-generated schema to understand the vaultAt the start of every session, before any search
memory_saveSave a decision, error, pattern, preference, or lessonWhen the agent learns something worth preserving
memory_smart_searchSearch with confidence-weighted rankingAny search where reliability matters (most searches)
memory_sessionsList recent observations (newest first)To review yesterday's work before starting today
memory_consolidateGroup working memories and suggest consolidationWeekly cleanup — compress raw notes into summaries