Skip to main content

TokenKnows MCP server — distill AI coding sessions (Claude Code / Codex / Cursor) into weekly reports, ADRs and a knowledge graph on your self-hosted workbench

Project description

TokenKnows MCP Server

MCP server for TokenKnows — a self-hosted engineering knowledge workbench that captures AI coding sessions (Claude Code / Codex / Cursor / VS Code) and distills them into structured documents: weekly reports, tech designs, ADRs, incident reviews, long-form books, agent skills and a knowledge graph, via a 5-stage LLM pipeline. Evidence-linked: every distilled claim links back to source session events.

Prerequisites

This server is the bridge between your MCP host and a self-hosted TokenKnows backend (default http://127.0.0.1:8001). Deploy the backend first — see the main repository. Local-first: your data goes only to the backend you configure.

Install & run

# Run directly (stdio, for Claude Code / Cowork / Cursor)
uvx tokenknows-mcp

# Or install then run
pip install tokenknows-mcp
tokenknows-mcp

# SSE transport for remote / docker setups
tokenknows-mcp --transport sse --port 8765

Claude Code config example

{
  "mcpServers": {
    "tokenknows": {
      "command": "uvx",
      "args": ["tokenknows-mcp"],
      "env": { "TOKENKNOWS_API_BASE": "http://127.0.0.1:8001" }
    }
  }
}

Tip: in Claude Code you can instead install the full plugin (MCP server + slash commands + skills): /plugin marketplace add johnnywuj81/tokenknows/plugin install tokenknows@tokenknows.

Environment variables

Variable Default Description
TOKENKNOWS_API_BASE http://127.0.0.1:8001 Self-hosted TokenKnows backend URL
TOKENKNOWS_API_TOKEN JWT bearer token (optional)
TOKENKNOWS_DEFAULT_PROJECT Default project_id for event submission

Tools

  • submit_session_events — persist conversation turns into the knowledge base
  • distill_document — trigger the 5-stage pipeline (weekly_report / tech_design / adr / incident / book / agent_skill / knowledge_graph)
  • list_assets / get_asset / get_asset_chapters — read distilled output
  • search_entity — cross-document knowledge-graph entity search

Plus tokenknows://asset/{id} resources and prompt templates for all 7 document types.

License

MIT — source of truth for this package lives in code/tokenknows-api/mcp_server.

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

tokenknows_mcp-0.2.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

tokenknows_mcp-0.2.1-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file tokenknows_mcp-0.2.1.tar.gz.

File metadata

  • Download URL: tokenknows_mcp-0.2.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.6

File hashes

Hashes for tokenknows_mcp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cc4261fd630f2cae23fef6562ecdcf0ebfce18fff6364e8446da0d5f431415c5
MD5 5d5106ae2d576464aaa071f9e4616ca5
BLAKE2b-256 46de4da61abe1b1b2c0838451480fbc8e3911c116ee5008e6c78818562063331

See more details on using hashes here.

File details

Details for the file tokenknows_mcp-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tokenknows_mcp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 067a4881dbfc7d29f13a329beffc33f0b6d7d9356cdae70b72492924f98ed8a2
MD5 3a899cf21048f87a942529c21c2e6f80
BLAKE2b-256 f6750b4d00dcdac8e626ca8138a7cce4b7146261b46d767ae482de50c0780188

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