wallras-mcp
Official# Wallras clients for Python
Two single-file, zero-dependency clients for [Wallras](https://wallras.com), the AI monitoring proxy you run next to your app:
- **`wallras_mcp.py`**: an MCP server, so Claude Desktop, Claude Code, Cursor or your own agent can check drift, read requests and agent runs, work the review queue, fetch prompts and run regression sets. Read-only unless you pass `--enable-writes`.
- **`wallras_sdk.py`**: report what Wallras can't see on its own: a self-hosted model's token probabilities and decision records, agent steps (tool runs, lookups), and feedback; fetch prompt versions.
Both talk only to your own Wallras with your token. The Wallras engine itself ships as a Docker image (`ghcr.io/wallras/wallras-engine`); this repository holds the open-source clients.
## Install
```bash
pip install wallras
```
Or run the MCP server without installing anything:
```bash
uvx --from wallras wallras-mcp
```
Each file also works on its own: copy it next to your code.
## MCP server
```json
{"mcpServers": {"wallras": {
"command": "uvx", "args": ["--from", "wallras", "wallras-mcp"],
"env": {"WALLRAS_URL": "http://localhost:8080", "WALLRAS_TOKEN": "a viewer or admin token"}}}}
```
Add `"--enable-writes"` to `args` for the tools that change something (feedback, review decisions, saving or promoting prompts, regression runs, optionally graded by a `judge_model`). Those need an admin token; regression runs call your provider with `WALLRAS_PROVIDER_KEY` (and `WALLRAS_ANTHROPIC_KEY` / `WALLRAS_GEMINI_KEY`), which stay on your machine.
## SDK
```python
from wallras_sdk import Wallras
w = Wallras("http://localhost:8080", token="your WALLRAS_APP_TOKEN")
w.report(model="llama-3.1-8b", prompt=prompt, answer=text,
tokens=Wallras.tokens_from_openai(response["choices"][0]["logprobs"]["content"]))
```
Reports go in the background and never raise into your code. See the [docs](https://wallras.com/docs.html) for traces, decision records and prompts.
## Try a hub with two nodes
[`examples/docker-compose.hub.yml`](examples/docker-compose.hub.yml) starts one hub and two nodes on your machine:
```bash
docker compose -f examples/docker-compose.hub.yml up -d
```
Send requests to a node (`http://localhost:8081/v1` or `:8082`, with your provider key), then open `http://localhost:8080/wallras/ui` and the Nodes tab.
## Try active-active
[`examples/docker-compose.active.yml`](examples/docker-compose.active.yml) starts Postgres, three Wallras containers and a load balancer. Any container answers any request, and together they keep one tamper-evident record:
```bash
docker compose -f examples/docker-compose.active.yml up -d
```
Send requests to `http://localhost:8080/v1`, then ask the MCP server's `wallras_fleet` tool (or `GET /wallras/fleet`) which containers answered.
## Issues
Bugs and ideas for the clients, or for Wallras itself: [open an issue](https://github.com/wallras/wallras-python/issues). Security reports: see [SECURITY.md](https://wallras.com/security.html), not public issues.
MIT licensed. The files here are copies of the ones published with each Wallras release.
TDQS
Scored across 22 tools
Most tools target a distinct object and grain: singular names fetch one record (wallras_request, wallras_trace, wallras_prompt, wallras_dataset) while plurals list them, and analytics tools (wallras_usage, wallras_judge, wallras_drift, wallras_consistency, wallras_blind_spots) each cover a different metric family. The main overlap risk is the cluster of situational-awareness tools (wallras_overview, wallras_status, wallras_fleet, wallras_hub, wallras_hub_nodes), which are only separated by deployment mode and are easy to pick wrong without reading descriptions carefully.
Every tool shares the wallras_ prefix and snake_case, with a predictable singular=one-record / plural=list-or-collection convention (dataset/datasets, prompt/prompts, request/requests, trace/traces) plus qualified variants (wallras_prompt_diff, wallras_prompt_usage). The only weakness is that no verbs appear in names, so the list-vs-detail distinction is implicit rather than stated.
22 tools is heavy for a single server, though the domain (LLM observability, drift, regressions, prompts, agent traces, multi-node fleet) genuinely spans several sub-areas. Every tool maps to a real surface, but the hub/fleet/overview cluster inflates the count for users running a single node.
Read coverage is broad and coherent: requests, traces, prompts with diff and per-version usage, datasets, experiments, judge, drift, review queue, and hub/fleet views all have entry points. However the surface is entirely read-only — there is no way to create or edit a prompt or dataset, trigger or re-run a regression set, or resolve/acknowledge review-queue and drift items, which leaves the described workflows as dead ends.