anticonf
by ksohos333
README.md
# anticonf — anti-confabulation MCP server
An MCP server that guards against LLM confabulation **structurally**: instead of
asking a model "is this true?", it fetches raw observed facts and makes the
calling model compare its own claim against them.
## The design
- `verify_claim` **never returns verdicts** like "supports" or "contradicts".
It fetches the claimed sources (or searches for candidates), extracts atomic
observed facts, and returns them raw. The model that is about to assert does
the comparison — against evidence it did not write.
- `note_observation` logs a fact with provenance and returns a `fact_id`. Any
citation of an "observation" in an answer should reference this id.
- Unverified claims surface in `list_observations` as missing entries, so gaps
are visible rather than silently filled.
- v1 makes deliberately **no external LLM calls** — no scorer that could itself
confabulate.
## Tools
| Tool | What it does |
|---|---|
| `verify_claim(claim, source_urls=[], search_query=None)` | Fetch sources, extract atomic observed facts, aggregate source stats |
| `note_observation(observation, source_url, source_kind)` | Log a fact with provenance, get back a `fact_id` |
| `list_observations(limit=20)` | Recent observations — gives the calling LLM context |
| `fetch_url(url)` | Fetch one URL (httpx → trafilatura extraction) |
| `reset_observations()` | Wipe the local observations log |
| `translate_text(text, target_lang)` | Translate text |
| `extract_json(...)` | Extract JSON from noisy model output |
| `bridge_post(source, kind, body)` / `bridge_read(n)` | Cross-session handoff: post a finding, read recent findings (append-only JSONL) |
Search runs through DuckDuckGo HTML (via `ddgs`) — no API keys anywhere.
## Install
```bash
git clone <this repo> && cd anticonf
python3 -m venv .venv && .venv/bin/pip install -r requirements.txt
```
## Configure (any MCP client)
```json
{
"mcpServers": {
"anticonf": {
"command": "/path/to/anticonf/.venv/bin/python",
"args": ["/path/to/anticonf/mcp_server.py"]
}
}
}
```
Data lives in `data/observations.jsonl` by default; override with the
`ANTICONF_DATA_DIR` environment variable.
A Rust sibling of this server ships inside
[openklawc](https://github.com/ksohos333/openklawc) (`crates/mcp-anticonf`).
## License
[MIT](LICENSE)
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues