ModelLens
ModelLens is an MCP server for discovering, probing, ranking, and recommending models across OpenAI-compatible endpoints.
List models: Show models advertised by each configured endpoint, optionally filtered by substring or limited per endpoint; read-only with no inference/token cost.
Probe models: Send real chat-completion requests to measure current latency, success, streaming, and tool-calling behavior; this consumes upstream tokens/quota and hits the network.
Rank models: Return a quality ranking from recorded probe history, scored by success rate, median latency, and cancellation rate.
Recommend a model: Pick the single best model for
fast,cheap, orcapableprofiles from recorded history.Generate a report: Produce a markdown overview of endpoints, verdict counts, top models, and the full per-model table from recorded history.
Ranking, recommendation, and report are read-only and do not perform new probes.
Discovers and probes locally hosted Ollama models through its OpenAI-compatible endpoint, enabling ranking and recommendation based on measured performance.
Probes and ranks OpenAI models through the OpenAI-compatible API, measuring real-request latency, success rates, streaming, and tool-calling behavior.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ModelLens which model should I use for fast responses?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ModelLens
See which of your models actually works.
An MCP server that turns any OpenAI-compatible gateway into an observable, rankable set of models. It discovers what a provider advertises, probes what works right now — latency, success, cancellation, streaming, tool calling — keeps the history, and answers "which model should I use?"
Zero third-party dependencies. Python 3.9+ standard library only.
中文落地页:LANDING_ZH.md
Why
If you run more than one model provider, you already have this problem:
The gateway says it serves 89 models. How many actually answer?
Which one is fast today? Yesterday's answer is already stale.
Your router picks the first entry in a list — and the first entry is slow.
Failures are invisible until a user complains.
ModelLens makes that visible. It is the difference between trusting a model list and measuring it.
Real example from a live gateway (89 models, 16 probed):
magpie/kilo/nvidia/nemotron-3.5-super-vl:free 97.6 100.0% 0.0% 628ms healthy
magpie/auto/beam-free 96.6 100.0% 0.0% 909ms healthy
magpie/longcat/LongCat-2.5 88.4 100.0% 0.0% 3104ms mixed
magpie/group/daily 70.0 100.0% 0.0% 77345ms mixed
magpie/radeon-cloud/DeepSeek-V4.1-Flash 70.0 100.0% 0.0% 87388ms mixed
magpie/nvidia/deepseek-ai/deepseek-v4.1-flash 0.0 0.0% 100.0% - unreliable
magpie/modelscope/Qwen/Qwen3.8-27B 0.0 0.0% 0.0% - quota_blockedThe default routing group was putting an 87-second model first and a 0.9-second model third. ModelLens found that in one pass.
Related MCP server: llmprobe
Install
# from PyPI
pip install modellens-mcp
modellens --config config.json --data history.json --once rankingor straight from source — no dependencies, no install step:
curl -fsSL https://raw.githubusercontent.com/Greatbeing/modellens/main/modellens.py -o modellens.py
python3 modellens.py --config config.json --data history.json --once rankingConfigure
{
"endpoints": [
{"name": "magpie", "base_url": "http://127.0.0.1:3425/v1", "api_key": ""},
{"name": "openai", "base_url": "https://api.openai.com/v1", "api_key": "sk-..."},
{"name": "ollama", "base_url": "http://127.0.0.1:11434/v1"}
]
}api_key may be empty for a localhost gateway. models optionally filters the
advertised list; enabled: false disables an endpoint without deleting it.
Run as an MCP server
Point any MCP client at it:
{
"mcpServers": {
"modellens": {
"command": "python3",
"args": ["/path/to/modellens.py",
"--config", "/path/to/config.json",
"--data", "/path/to/history.json"]
}
}
}Works with Claude Desktop, Cursor, Windsurf, VS Code, and any other MCP client.
DeepSeek Harness
Register it in the profile's cordis.patch.yml (note: a new entry needs
- insert:, not a bare - id: — a bare one means "modify an existing entry"):
- insert:
- id: modellens
name: "@deepseek-ai/dsh-mcp-client"
config:
serverName: "modellens"
transport: "stdio"
command: "python3"
args:
- "/data/workspace/modellens/modellens.py"
- "--config"
- "/data/workspace/modellens/config.json"
- "--data"
- "/data/workspace/modellens/history.json"Then restart dsh web. Verified: the server runs as a child process of
dsh-web (pgrep -P $(systemctl --user show dsh-web -p MainPID)).
Tools
Tool | What it does |
| What each endpoint advertises (optional substring filter) |
| Real requests: latency, success, streaming, tool calls |
| Quality ranking from recorded history |
| Best model for a profile: |
| The whole picture as markdown |
Example
probe(limit=20, check_tools=true)
ranking(limit=10)
recommend(profile="fast")Hosted / paid (x402, USDC on Base)
A hosted endpoint runs the same tools over MCP streamable-HTTP and charges per call with x402 — agents pay gasless USDC on Base, no accounts or API keys:
Endpoint:
https://8000-agqz7vbdiiy6cc2n2tbs63iji4.instabox.tech/mcpManifest:
/.well-known/x402(payTo address, prices, facilitator)Prices:
list_modelsfree ·ranking/recommend$0.01 ·report$0.02 ·probe$0.05 (probe makes real upstream requests, so it costs the most)
An unpaid paid-tool call returns HTTP 402 + PAYMENT-REQUIRED; the agent
signs an EIP-3009 USDC transfer and retries with X-PAYMENT, the facilitator
verifies/settles, and the tool result comes back with a PAYMENT-RESPONSE.
Self-host the same server anywhere with python3 server_x402.py
(set X402_PAY_TO to your receiving address; see server_x402.py header).
How it scores
Every probe is a real request, so the numbers are evidence, not estimates.
Signal | Weight | Notes |
Success rate | 50% | 0% success ⇒ score 0, regardless of anything else |
Median latency | 30% | Linear to 0 at 8 s |
Cancellation rate | 20% | Timeouts and client cancellations |
Verdicts: healthy (≥95% success, <3 s median) · mixed · unreliable
(≥30% cancelled) · quota_blocked (all 429) · dead (all 404) · untested.
History is kept per model (newest 200 probes) in history.json, so rankings
improve as you use it.
CLI
The server doubles as a command-line tool:
python3 modellens.py --config config.json --data history.json --once probe --limit 20
python3 modellens.py --config config.json --data history.json --once rankingUse cases
Before you pick a model —
recommend(profile="fast")When a provider goes quiet —
rankingshows it dropping before your users doWhen your router misbehaves — compare group members, find the slow one
Cost control — spot the expensive model that is never chosen
Onboarding a new provider — probe once, see what actually works
Status and roadmap
Working today: discovery, probing, streaming/tool-call checks, scoring, ranking, recommendation, markdown report, MCP stdio transport, CLI.
Roadmap: OpenAI-compatible /v1/models only for now; Anthropic and Gemini
transports, per-endpoint cost accounting, alerting webhooks, and a hosted
multi-team version.
License
MIT. Use it, ship it, charge for your own hosted version.
Honest notes
Probing costs tokens. Each probe is a real completion. Keep
limitsensible and don't probe a hundred models every minute.A single probe is weak evidence. The score is meaningful after several probes; the report says
n=1so you can see the sample size.Latency depends on you. Your network, not just the provider, is in the measurement. Run it from where your agents run.
Hosted / paid
Hosted landing page:
LANDING_EN.mdMCP server listing (MCPize):
MCPIZE_SUBMISSION.mdx402 buyer guide:
X402_BUYER_GUIDE.md
Available Tools
5 toolslist_modelsARead-onlyIdempotent
List the models each configured endpoint advertises (GET {base_url}/models). Read-only network call to your own configured endpoints — no inference, no token cost. Use this FIRST, before probe/ranking, to see what is available. Returns model ids grouped by endpoint name; empty list if an endpoint is unreachable.
Inputs: limit, contains.
probeA
Probe models by sending REAL chat-completion requests; measures latency, success rate, streaming and tool calling. Side effects: consumes upstream tokens/quota and hits the network (open-world) — every probe is a real, billed completion. Use to measure what works RIGHT NOW, then call ranking. Returns per-model probe rows (ok, latency_ms, status, stream_ok, tools_ok).
Inputs: limit, model, contains, endpoint, +1 more.
rankingARead-onlyIdempotent
Return the quality ranking computed from RECORDED probe history (read-only: no network, no new probes). Ordered best-first by score = success 50% + median latency 30% + cancellation 20%. Use after probe to see the ranked table; use recommend for a single best pick. Rows include model, score, success%, cancel%, median latency, verdict.
Inputs: limit.
recommendARead-onlyIdempotent
Return the single best model for a task profile: 'fast' (lowest latency), 'cheap', or 'capable' (highest quality). Read-only, computed from recorded probe history; omit profile to use the default. Use when you need ONE model to route to right now.
Inputs: profile.
reportARead-onlyIdempotent
Return the whole picture as a markdown report: endpoints, verdict counts, top models by score, and the full per-model table. Read-only, from recorded history (no network). Use to inspect or share overall gateway health (e.g. paste into a STATUS.md).
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a distinct role in a clear pipeline: list_models discovers, probe measures, ranking/recommend/report consume history. The main overlap is among ranking, recommend, and report, which all read the same recorded data, but the descriptions explicitly differentiate table vs. single pick vs. markdown report.
list_models follows a verb_noun pattern while probe, recommend, and report are single verbs and ranking is a noun, so conventions are mixed. Names remain short and readable, but the pattern is not uniform.
Five tools is well-scoped for a model-evaluation pipeline, with each tool covering a distinct stage (discover, measure, rank, pick, report). Nothing feels redundant or padded.
The surface covers the full discover-probe-rank-recommend-report lifecycle with no dead ends. Minor gaps exist: no tool to configure/manage endpoints, clear probe history, or filter rankings by endpoint/profile beyond the recommend shortcut.
Maintenance
Related MCP Connectors
Live health of 65 agent APIs/MCPs plus a 15-min LLM leaderboard; recommend(task) picks a provider.
Live LLM API price + status radar across 11 providers, with public per-model price HISTORY.
Live status, API pricing and rate limits for ChatGPT, Claude, Gemini, Cursor and 42+ AI tools.
Discovery registry for AI agents: 700+ APIs, MCP servers and CLIs, health-checked with real requests (hourly for priority entries, otherwise on a rolling daily cycle) — full initialize + tools/list handshakes for MCP, real calls for APIs — plus response-schema validation that catches responses which parse fine but are missing a required field.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes queryable GPU inference benchmark data (quantization, throughput, VRAM, concurrent users) as tools for LLM clients.MIT
- AlicenseAqualityCmaintenanceProbe LLM API endpoints and report health metrics including time to first token, latency, and throughput.48MIT
- AlicenseNot gradedqualityDmaintenanceDiscovers LLM models in real time from cloud providers and local Ollama instances, returning compatibility profiles and live pricing so AI agents can route tasks to the cheapest viable model without breaking tool calls or context clipping.9MIT
- AlicenseAqualityBmaintenanceIndependent latency and uptime data for 46 hosted AI inference APIs, probed every 5 minutes from 4 regions with no gateway, plus a verified model deprecation calendar and Claude Code / Codex speed and accuracy drift. Four read-only tools, no API key; data CC BY 4.0.2412MIT