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 basedistill_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 outputsearch_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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc4261fd630f2cae23fef6562ecdcf0ebfce18fff6364e8446da0d5f431415c5
|
|
| MD5 |
5d5106ae2d576464aaa071f9e4616ca5
|
|
| BLAKE2b-256 |
46de4da61abe1b1b2c0838451480fbc8e3911c116ee5008e6c78818562063331
|
File details
Details for the file tokenknows_mcp-0.2.1-py3-none-any.whl.
File metadata
- Download URL: tokenknows_mcp-0.2.1-py3-none-any.whl
- Upload date:
- Size: 14.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
067a4881dbfc7d29f13a329beffc33f0b6d7d9356cdae70b72492924f98ed8a2
|
|
| MD5 |
3a899cf21048f87a942529c21c2e6f80
|
|
| BLAKE2b-256 |
f6750b4d00dcdac8e626ca8138a7cce4b7146261b46d767ae482de50c0780188
|