Integration

Connect WitWiki to your LLM agent and teach it how to use the wiki effectively.

MCP configuration

Add this to your project's .mcp.json:

{
  "mcpServers": {
    "witwiki": {
      "url": "https://witwiki-api.fly.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Replace YOUR_API_KEY with the key from the Keys page.

Your agent will have access to these tools: wiki_getPage, wiki_updatePage, wiki_deletePage, wiki_listPages, wiki_getIndex, wiki_updateIndex, wiki_appendLog, wiki_getLog, wiki_lint, wiki_listSources, wiki_getSource, wiki_markSourceIngested, wiki_rebuildGraph, project_list, project_get, project_create, project_update.

CLAUDE.md snippet

Paste this into your project's CLAUDE.md so Claude knows when and how to use the wiki:

## WitWiki Knowledge Base

This project uses WitWiki as a persistent knowledge base via MCP.

### When to read
- **Session start** — call `wiki_getIndex` to orient yourself, then fetch
  relevant pages with `wiki_getPage` before diving into unfamiliar areas
- **Before deciding** — search with `wiki_listPages` (use the `q` param) to find
  existing knowledge before asking the user or making assumptions

### When to write
- **After completing work** — create or update pages with `wiki_updatePage`
  to record decisions, patterns, and discoveries; don't let knowledge vanish
  at session end
- **After significant operations** — call `wiki_appendLog` to record what
  you did and why (ingest sessions, architectural choices, answered questions)

### Writing conventions
- Cross-reference related pages with `[[PageName]]` wikilinks
- Keep each page focused on a single topic
- Update the index with `wiki_updateIndex` when adding major new pages
- Run `wiki_lint` occasionally to surface orphan pages and dead links

AGENTS.md snippet

For OpenAI Agents SDK, AutoGen, LangGraph, or custom agent frameworks — paste this into your AGENTS.md:

## WitWiki Knowledge Base

This agent has access to a WitWiki knowledge base via MCP tools. Use it to
read accumulated knowledge before starting work and record new knowledge after.

### When to read
- At task start, call `wiki_getIndex` to orient yourself
- Search for relevant pages with `wiki_listPages` (use the `q` parameter)
  before making decisions or assumptions

### When to write
- After completing a task, write what you learned to wiki pages with
  `wiki_updatePage`
- After significant operations, append a log entry with `wiki_appendLog`

### Conventions
- Link related pages with `[[PageName]]` wikilinks
- Keep each page focused on a single topic
- Run `wiki_lint` periodically to find dead links and orphan pages

Tips for a healthy wiki

  • Link aggressively — every [[wikilink]] builds the graph; the more connected, the better search and lint work
  • One topic per page — narrow pages are easier to update and less likely to go stale
  • Update the index — when you add a major new page, update the index so future sessions can find it
  • Run lint periodicallywiki_lint surfaces orphan pages (no inbound links) and dead links (targets that do not exist); fix them before they accumulate