- Language
- Vue
- Last commit
- 2h ago
- Forks
- 2
- Open issues
- 0
- Registry update
- Oct 15, 2026
Connect
npm$claude mcp add llmxray \ -e LLMXRAY_URL=<llmxray-url> \ -e OLLAMA_URL=<ollama-url> \ -- npx -y [email protected]
Environment variables
LLMXRAY_URLThe running LLMxRay server the tools read from (start it with `npx llmxray`).
OLLAMA_URLThe Ollama daemon, for the local_models tool.
Security review
Review passedReviewed 24m ago.
- metadata
- scanned
- packages
- 1 checked
No findings.
Tools
This server runs on your machine, so its tool list is not fetched before install — the README below describes what it offers.
LLMxRay
See what your local AI is actually doing.
One command, one browser tab. Token-by-token streaming, cache diagnostics, model comparison, benchmarks and cost tracking
for the models running on your own machine through Ollama. No cloud. No API keys. No cost.
🌐 English • Français • 中文 • العربية • Srpski
Quick Start • What it shows you • Who is this for • Install • Ollama compatibility • Changelog
Quick Start
You need Ollama running with at least one model pulled (ollama pull llama3.2). Then:
npx llmxray
Or with Docker:
docker run -p 5174:5174 djovaneli/llmxray
Open http://localhost:5174. Pick a model, send a message, and watch what happens. That's it.
What LLMxRay shows you
You run a local model. You chat with it. LLMxRay answers the questions that come next: how fast was each token, what did the prompt cost, did the cache help, which setting was actually better, and what are your other tools sending to the same model.
Every page below is one of those answers.
Chat, token by token
Every token is drawn as it arrives, coloured by confidence. You see where the model hesitated and where it was sure. Markdown, multi-turn, file and image attachments, slash commands, and a thinking budget for reasoning models (off, model's choice, or low / medium / high / max).

Each response is also checked as it lands. A badge appears only when something is wrong: repetition, a refusal, gibberish, an empty answer, or a reply cut off at the token limit.
Session deep dive
Open any turn to see it as a timeline: time to first token, inter-token gaps, the reasoning block if there was one, tool calls, and the exact prompt that was sent.

Live: what your other tools send
LLMxRay opens a second port, 11435, that behaves exactly like Ollama and forwards everything to it. Point VS Code Copilot, Open WebUI, Continue, n8n or your own script at http://localhost:11435 and every turn they send appears here: client, model, prompt size, how much came from the cache, prefill and generation speed, tool calls.
VS Code Copilot ─┐
Open WebUI ──────┤ ┌─ Live page: every turn,
Continue / n8n ──┼─► http://localhost:11435 ─► Ollama ┤ cache hits, prefill speed,
your scripts ────┘ (LLMxRay) └─ where the cache broke

Select a turn to see what the prompt is made of and the exact point where it stopped matching the previous one, which is where the cache broke. Findings are plain sentences, each linked to the turn that proves it: a client re-reading its whole prompt every turn, a model running partly on CPU, tool schemas taking 40% of every prompt. Only counts and timings are kept, in memory. Prompt text is an opt-in that writes to a local file. Nothing leaves your machine.
Both ports listen on your network, not just localhost, so the Live page can run full-screen on a second screen or another machine while the agents work.
Cache Lab
A local model reuses its prompt cache only while the prompt matches from the very first token. One timestamp near the top forfeits everything below it. Cache Lab finds the values that change between turns, shows where reuse dies, and then measures against your own daemon what moving them to the end saves.

Measured on a real 324-token prompt: 4 tokens reused and 64.6 ms of prefill with the timestamp at the front, 290 reused and 18.6 ms with it at the back. 3.5x faster, same words.
Compare
The same prompt against up to four slots, each with its own model, temperature and system prompt, streaming side by side. One-click presets: Temperature Sweep, Deterministic Pair, Language Compare. A word-level diff shows exactly what changed between two answers.

Surgical Benchmark
Score models on curated question suites (MMLU-Pro, ARC-Challenge, HellaSwag, GSM8K, TruthfulQA) using the model's real token logprobs, not whether the answer happened to look right. Confidence versus accuracy per category, so you see where a model is confidently wrong. Import your own suites as JSON.

Decision Lab
Decision models (nimble, tev1, clef) answer typed questions with probabilities instead of prose. Give the lab a situation and ask for a choice among candidates, a yes/no probability, or a score on a scale. Every answer comes back as the model's own distribution, drawn as bars.

Protocol Observatory
The same prompt through Ollama's three serving protocols in parallel: native /api/chat, OpenAI-compatible /v1/chat/completions, and Anthropic-compatible /v1/messages. Side-by-side streaming, per-protocol metrics, and an envelope diff that shows how each one frames finish reasons, token counts and errors.

Knowledge Base and Embeddings
Drop in PDF, DOCX, Markdown or CSV files. They are chunked, embedded and searchable, so you see what retrieval actually returns before a model ever sees it. The Embeddings page lets you compare any two texts by cosine similarity, visualise the vectors, and see what Matryoshka truncation costs.
|
|
|
Everything stays in your browser's IndexedDB.
Code Completion
Fill-in-the-middle for Qwen-Coder, CodeLlama, Codestral, DeepSeek-Coder and StarCoder: a prefix, a suffix, and the model fills the gap. The stitched preview shows the result as your editor would.

Tool Workshop
A node canvas for building tool definitions, with the TypeScript kept in sync both ways: edit the nodes or edit the code. Probe an API, generate the schema, and test the tool with a live call.

Analytics and Costs
Latency percentiles (P50 / P95 / P99) for requests and first tokens, quality over turns, errors by model, a usage heatmap, and temperature against tokens per second. The cost page prices your local usage at cloud rates, so you see what running locally saves.
|
|
|
My System and Models
Hardware, runtime and inference overview on one page: CPU, memory, GPU, which models are loaded and where. The Models tab lists every installed model with its parameters, template and runner, and pulls new ones from the catalog.
|
|
|
Also in the box
- AI Training Pipeline. Curate pairs from your conversations, tag and review them, export JSONL for fine-tuning.
- Local history database. Every chat, comparison and benchmark is archived in IndexedDB with filters, trends, exports and retention rules.
- Educators Kit. Nine lesson modules on the docs site, each built around an LLMxRay page.
- Five languages. English, French, Serbian (Latin and Cyrillic), Chinese and Arabic, with RTL layout. Scaffolds ready for Hebrew and Japanese.
For agents
If you are an agent running on a local model, LLMxRay can tell you what went wrong with your own calls. Two steps.
- Send your Ollama calls to port 11435 instead of 11434. It behaves exactly like Ollama and forwards everything; LLMxRay only records what passes.
- Add the LLMxRay MCP server to your tools:
{ "mcpServers": { "llmxray": { "command": "npx", "args": ["-y", "-p", "llmxray", "llmxray-mcp"] } } }
Three tools, all read-only, nothing leaves the machine:
| Tool | Answers |
|---|---|
diagnose_my_turns | What stands out in your recent turns, as sentences with the fix: a prompt rejected for exceeding the loaded context, the prompt cache lost on every turn or on one turn, a model running partly on CPU, tool schemas crowding the prompt. |
last_turn_metrics | Your last turn in numbers: prompt tokens and cached share, prefill time and speed, generated tokens and speed, why generation stopped, what the prompt was made of, whether the model fit in video memory. |
local_models | Which models are pulled, their size and quantisation, which are loaded now and with what context, and whether each fits in video memory. |
LLMxRay itself must be running (npx llmxray). The MCP server reads from it over localhost.
Who is this for
| You are... | LLMxRay helps you... |
|---|---|
| Developer | Debug prompts, profile latency, compare models, inspect tool calls, see what your editor sends |
| Researcher | Run controlled experiments with the same settings across models and temperatures |
| Student / Educator | Watch model behaviour instead of reading about it, with the nine-module Educators Kit |
| AI team lead | Give every developer the same local setup, and collect the benchmark results and training pairs they export |
Install
npx (recommended)
npx llmxray
npx llmxray --port 3000
npx llmxray --ollama-url http://192.168.1.50:11434
npx llmxray --observe-port 11436 # the Live port, 11435 by default
Docker
docker run -p 5174:5174 -p 11435:11435 djovaneli/llmxray
docker run -p 5174:5174 -p 11435:11435 -e OLLAMA_URL=http://host.docker.internal:11434 djovaneli/llmxray
From source
git clone https://github.com/LogneBudo/llmxray.git
cd llmxray
npm install
npm run dev # http://localhost:5173
Ollama compatibility
Tested against Ollama 0.40.x (verified on 0.40.4, October 2026). Works with 0.20 and newer; older versions chat but lack think and JSON-schema format. Recommended: 0.33.3 or newer, which reports prompt-cache reuse, so prefill speed is measured over the tokens actually evaluated.
| Endpoint | Used for |
|---|---|
/api/chat | Streaming chat (NDJSON, with tools, think effort levels, format schema) |
/api/generate | Generation and Fill-in-the-Middle via suffix |
/api/tags, /api/show | Model list, capabilities, context length, parameters, template |
/api/embed | Vector embeddings for the Knowledge Base, with optional dimensions truncation |
/api/pull, /api/delete, /api/ps, /api/version | Model management and status |
/v1/chat/completions | OpenAI-compatible path, used by Surgical Benchmark for real logprobs |
/v1/messages | Anthropic-compatible path, used by Protocol Observatory |
/v1/systemone | Decision models, used by Decision Lab |
Under the hood
Vue 3.5, TypeScript 5.9 (strict), Vite 7, Tailwind CSS 4, Pinia stores per concern, Chart.js and D3 for charts, Vue Flow for the tool canvas, CodeMirror 6 for code. Storage is the browser's IndexedDB. The backend is Ollama, local.
Streaming reads Ollama's NDJSON through fetch() and a ReadableStream, and tokens update the UI through Pinia. Chat confidence is approximated from inter-token latency and labelled as such; benchmarks use real logprobs. Hardware detection is a small Vite plugin that asks the OS directly. The Live port is a transparent proxy that keeps counts and timings in memory.
| Command | What it does |
|---|---|
npm run dev | Dev server (port 5173) |
npm run build | Type-check and production build |
npm run test | Unit tests (Vitest) |
npm run test:e2e | End-to-end (Playwright) |
Contributing
Contributions welcome. See CONTRIBUTING.md for setup and guidelines. Community translations are especially welcome: scaffold files are ready for Hebrew and Japanese.
License
Trademark
LLMxRay is a trademark of Ivan Stankovic (LogneBudo). See TRADEMARK.md.
If LLMxRay helps you understand your AI better, consider giving it a star.
It helps others discover the project.
From the server's repository — third-party content, read it before running anything it suggests.
More in AI & LLMs
GroundLens
io.github.groundlens-dev
Guardrails for LLM answers: exact checks against sources, PASS/REVIEW/FAIL, signed records.
Token Lens
io.github.duttkunal101-lab
Count and cut tokens in prompts, chats and agents for any model. Runs locally, collects no data.
Russia–NATO risk ladder
site.russianato
Russia–NATO risk: labelled forecasts, scenarios and intelligence assessments. Cite russianato.site.
prompt-leak-scanner
io.github.GuardBee
Catches leaked credentials and PII in outbound LLM prompts
Neural Cosmology
com.neuralcosmology
Answers, essays, experiments and books on consciousness and cosmology: search, read, buy.
gpt-image-2-mcp
io.github.runapi-builder
RunAPI MCP server for GPT Image 2: create tasks, poll status, check pricing.
Listing from the official MCP Registry · repository facts from GitHub, 26m ago.





