Skip to main content

Taste oracle MCP server — proxies for the user in Ouroboros Socratic interviews

Project description

kkanbu

A taste oracle that learns who you are — your preferences, values, and reasoning patterns — then speaks on your behalf.

kkanbu is an MCP server that builds a persistent knowledge graph of your identity. When an AI agent needs to know something about you, kkanbu answers grounded in what it actually knows — not guesses.

How It Works

AI Agent ←──MCP──→ kkanbu ←──→ Knowledge Graph (SQLite)

kkanbu stores knowledge as a graph of nodes (preferences, values, patterns, reasoning) connected by edges (supports, contradicts, derives_from). Each node tracks what you believe and why. When kkanbu isn't confident, it flags the question for later review rather than guessing.

Installation

Requires Python 3.11+ and an Anthropic API key.

With Claude Code (recommended)

claude mcp add --scope user kkanbu -- uvx kkanbu

This installs kkanbu from PyPI and registers it as an MCP server. The --scope user flag makes it available across all sessions.

From source

git clone <repo-url>
cd kkanbu
pip install -e .

# Optional: JS-rendered webpage ingestion (SPAs, React sites)
pip install -e ".[js]"

# Register with Claude Code
claude mcp add --scope user kkanbu -- uv run --directory /path/to/kkanbu kkanbu

Manual MCP config

Add to your .mcp.json:

{
  "mcpServers": {
    "kkanbu": {
      "command": "uvx",
      "args": ["kkanbu"],
      "env": {
        "ANTHROPIC_API_KEY": "sk-ant-..."
      }
    }
  }
}

Usage

Create a profile and log in

kkanbu_of_who(action="create", username="myname")
kkanbu_of_who(action="login", username="myname")

Each user gets an isolated knowledge graph at ~/.kkanbu/profiles/<username>/knowledge.db.

Teach it about yourself

kkanbu_learn(
  insight="I value simplicity in design — clean, minimal interfaces over feature-packed ones",
  why="Visual noise stresses me out"
)

Or ingest existing material — codebases, documents, or webpages:

kkanbu_ingest(path="/path/to/my-project")
kkanbu_ingest(path="https://my-portfolio.com")

Let it ask you questions

kkanbu can proactively find gaps in what it knows and ask deep questions:

kkanbu_curious()
# → "When you feel most like yourself, what are you usually doing?"

kkanbu_curious(session_id="abc123", user_response="When I'm building something...")
# Drills deeper into the same thread

Answer on your behalf

kkanbu_answer(question="What kind of work environment do you thrive in?")
# → Voice-faithful answer grounded in the knowledge graph,
#   with confidence scores and automatic flagging when uncertain

Correct mistakes

kkanbu_correct(
  original="prefers quiet isolation",
  correction="prefers collaborative spaces",
  why="Does best thinking when bouncing ideas off people"
)

Reflect on the graph

kkanbu_reflect()
# → Finds contradictions, tensions, and blind spots
#   Stores findings as flags for review

Visualize

kkanbu_visualize()
# → Opens interactive D3.js graph at http://localhost:7742

Tools

Tool Description
kkanbu_of_who Manage user profiles — create, delete, list, login, logout
kkanbu_answer Answer questions on your behalf using the knowledge graph
kkanbu_learn Teach preferences, values, or patterns
kkanbu_ingest Extract insights from codebases, documents, or webpages
kkanbu_curious Ask deep questions to fill knowledge gaps
kkanbu_reflect Analyze the graph for contradictions and tensions
kkanbu_correct Fix wrong answers or stored preferences
kkanbu_distill Distill conversation history into persistent graph learnings
kkanbu_get_flags Show unresolved flagged items
kkanbu_resolve_flag Review and resolve flags through Socratic conversation
kkanbu_status Show knowledge graph statistics
kkanbu_visualize Launch interactive graph visualization in the browser

Configuration

Environment Variable Description Default
ANTHROPIC_API_KEY Required for LLM-powered tools
KKANBU_HOME Base directory for profiles and data ~/.kkanbu
KKANBU_QA_LOG Append every kkanbu_answer Q&A pair (question, answer, confidences, flag) to <profile>/answers.jsonl. Set to 0/false/off to disable. 1 (on)

Development

pip install -e ".[dev]"
pytest
ruff check src/

License

MIT

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

kkanbu-0.1.6.tar.gz (256.7 kB view details)

Uploaded Source

Built Distribution

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

kkanbu-0.1.6-py3-none-any.whl (69.5 kB view details)

Uploaded Python 3

File details

Details for the file kkanbu-0.1.6.tar.gz.

File metadata

  • Download URL: kkanbu-0.1.6.tar.gz
  • Upload date:
  • Size: 256.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.5","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kkanbu-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e24d2021c3656f8233c905e3bbe0a58e3105f3190a1386b528698f90cfa69108
MD5 b44e2f18f1c4bc0d1fc64952fdabd598
BLAKE2b-256 2cbd63ee52ac75ef7b93f81043905b04a3909c0a6730259466e857c77d64a600

See more details on using hashes here.

File details

Details for the file kkanbu-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: kkanbu-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 69.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Red Hat Enterprise Linux","version":"9.5","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for kkanbu-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2d3971f4b39ef25ed713919826e1378f48b77f21ae6c524c61973229da401b
MD5 965780e573e9e44b26324deeb522ab44
BLAKE2b-256 a1f3b2e8b5b6b883f859d061f3d9961819995a4a24c17577aac8fb08f38273ce

See more details on using hashes here.

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