# Shweta-Mishra-ai/tokenmizer [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/Shweta-Mishra-ai/tokenmizer  
**GitHub Stars:** 30  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/shweta-mishra-ai-tokenmizer

## Description
Graph-structured session memory for LLMs. Local OpenAI-compatible proxy that extracts tasks, decisions, and files into a typed knowledge graph, auto-checkpoints before context overflow, and resumes any session in 250 tokens. 6 MCP tools including whydecision (traces why a decision changed, with reasons and evidence). pip install tokenmizer

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "tokenmizer": {
    "command": "uvx",
    "args": ["tokenmizer"],
    "env": {
      "TOKENMIZER_ANTHROPIC_API_KEY": "",
      "TOKENMIZER_URL": ""
    }
  }
}
```

**Requires environment variables:** `TOKENMIZER_ANTHROPIC_API_KEY`, `TOKENMIZER_URL` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Shweta-Mishra-ai/tokenmizer MCP server does

Shweta-Mishra-ai/tokenmizer MCP server connects MCP clients to TokenMizer’s graph-backed session memory. It supports checkpointing and resuming sessions, graph and savings statistics, file analysis, and decision tracing. The graph records typed items such as decisions, tasks, files, errors, and goals rather than reducing the session to a plain summary.

A decision that is replaced remains represented as superseded, allowing the reasoning history to be followed later. The resume output is a compact projection containing active decisions, unfinished work, and unresolved errors. This makes the server relevant to long-running coding or research sessions where preserving rationale matters as much as preserving the latest state.

## How it works

TokenMizer runs locally as a proxy between an OpenAI-compatible client and an LLM provider. Applications send chat requests to `http://localhost:8000/v1`; the proxy processes the request, updates its graph, applies compression and caching stages, and forwards the request to the configured provider. SQLite stores the graph, checkpoints, and ownership data.

The MCP process communicates with the proxy through `TOKENMIZER_URL`, normally set to `http://localhost:8000`. Checkpoint, resume, statistics, and decision-reasoning tools require the proxy to remain running. File analysis can run without the proxy.

The Shweta-Mishra-ai/tokenmizer MCP server is therefore an MCP interface to the shared graph, not a separate memory store for each client. A session saved from one supported tool can be resumed from another client using the same graph.

## Setup and configuration

Install the Python package with:

```bash
pip install "tokenmizer[anthropic,cache]"
```

For the Anthropic configuration shown in the README, set `TOKENMIZER_ANTHROPIC_API_KEY`, then start the proxy:

```bash
export TOKENMIZER_ANTHROPIC_API_KEY=sk-ant-...
tokenmizer serve
```

Configure an MCP client with the `tokenmizer-mcp` command and point it at the running proxy:

```json
{
  "mcpServers": {
    "tokenmizer": {
      "command": "tokenmizer-mcp",
      "env": { "TOKENMIZER_URL": "http://localhost:8000" }
    }
  }
}
```

The README documents configurations for Claude Desktop, Claude Code, Cursor, VS Code, Zed, and Codex CLI. If the executable is not on `PATH`, it gives `python -m tokenmizer.mcp.server` as an alternative command. Ollama can be used locally by setting the provider to `ollama`; the README also documents Docker deployment and additional provider configuration separately.

## Tools and capabilities

The Shweta-Mishra-ai/tokenmizer MCP server provides these six tools:

- `checkpoint_session` saves a session into graph memory.
- `resume_session` loads a compact continuation block.
- `get_graph_stats` reports graph statistics.
- `get_savings_stats` reports token savings.
- `analyze_file` processes a file for relevant session information.
- `why_decision` follows a decision’s supersession chain and returns the recorded reasons and evidence for each step.

The optional `session_id` request field enables memory for a named project or session when using the OpenAI-compatible API.

## Limitations and notes

The proxy must be running for checkpointing, resuming, statistics, and decision reasoning. File analysis is the exception and does not require the proxy. The README describes the system as local, but model-provider access still depends on the selected provider: Anthropic requires its configured API key, while Ollama can run locally.

The MCP configuration exposes the tools through a client, while ordinary model requests still use the OpenAI-compatible HTTP endpoint. The supplied material does not specify operating-system-specific requirements beyond the documented client configuration paths, nor does it provide a complete list of provider environment variables.

_Full upstream README: https://allmcps.com/mcp/shweta-mishra-ai-tokenmizer/readme_

