Metadata-Version: 2.4
Name: touchstone-mcp
Version: 0.1.0
Summary: Model Context Protocol server for Touchstone: hallucination detection for LLM outputs without calling another LLM. Wraps the calibrated Verifier and the raw measurement orchestrator from the clarethium-touchstone reference implementation as MCP tools.
Author-email: Lovro Lucic <11740211+lluvr@users.noreply.github.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Clarethium/touchstone/tree/main/touchstone-mcp
Project-URL: Repository, https://github.com/Clarethium/touchstone
Project-URL: Issues, https://github.com/Clarethium/touchstone/issues
Project-URL: Changelog, https://github.com/Clarethium/touchstone/blob/main/touchstone-mcp/CHANGELOG.md
Project-URL: Touchstone Library, https://pypi.org/project/clarethium-touchstone/
Project-URL: Touchstone Standard, https://github.com/Clarethium/touchstone/blob/main/STANDARDS/touchstone-1.0.md
Keywords: ai,ai-evaluation,claude-desktop,clarethium,cursor,fabrication-detection,grounding,hallucination-detection,mcp,model-context-protocol,structural-verification,touchstone
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: clarethium-touchstone>=0.2.0
Requires-Dist: fastmcp>=2.0
Provides-Extra: test
Requires-Dist: pytest>=8.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.23; extra == "test"
Requires-Dist: ruff>=0.6; extra == "test"
Requires-Dist: mypy>=1.10; extra == "test"
Dynamic: license-file

# touchstone-mcp

Model Context Protocol server for [Touchstone](https://github.com/Clarethium/touchstone): hallucination detection for LLM outputs without calling another LLM.

`touchstone-mcp` exposes the calibrated `Verifier` and the raw measurement orchestrator from the [`clarethium-touchstone`](https://pypi.org/project/clarethium-touchstone/) reference implementation as MCP tools. Any MCP host (Claude Desktop, Claude Code, Cursor, custom) can attach it as a stdio MCP server.

## Install

```bash
pip install touchstone-mcp
```

`fastmcp` and `clarethium-touchstone` install transitively. The `touchstone-mcp` console script is registered automatically and runs on the stdio transport by default.

## Host config

Drop this into your MCP host config:

```json
{
  "mcpServers": {
    "touchstone": {
      "command": "touchstone-mcp"
    }
  }
}
```

For Claude Code: `claude mcp add touchstone touchstone-mcp`.

## Tools exposed

* `verify` — calibrated `(text, source)` hallucination probability with scope classification, signal breakdown, and span-level localization.
* `measure` — raw multi-layer Touchstone output (all eleven Section 5 measurement layers).
* `assess_derivation_regime` — Layer 11 standalone regime classifier.
* `list_modes` — enumerate the four Verifier modes with their required inputs.

See [the host wiring guide](https://github.com/Clarethium/touchstone/blob/main/docs/mcp.md) for full tool reference, scope semantics, and threshold guidance.

## Programmatic use

```python
from touchstone_mcp import build_server

server = build_server()
server.run()                 # stdio transport
```

## Version pairing

`touchstone-mcp` depends on `clarethium-touchstone>=0.2.0`. The MCP server is a thin wrapper around the library's public surface; measurement semantics and calibration coefficients are defined and tested in the library, not here.

## License

Apache-2.0. See `LICENSE`.
