Repository avatar
AI Tools
v1.2.1
active

clearrun-mcp

io.github.Adepoco/clearrun-mcp

Scores whether an AI answer's confidence is backed by its reasoning, 0 to 100; not a fact checker.

Documentation

ClearRun

Get an API key

A signed-in free account with a verified email can create one developer key at https://api.clearrun.net/account/keys. The full key is shown once and starts with crun_. It calls evaluate, score, and chat, and it returns the free verdict: score, grade, risk, and a summary of 16 words or fewer. componentSignals is limited to Evidence support and Reasoning integrity. confidenceInterval and scoringVersion are omitted. Calls spend the free plan's 30 monthly credits. The default cap is 2 requests a second, 6 a minute, 30 an hour, and 40 a day. Evaluate, score, and chat share that cap. Over the cap, the API returns 429 and Retry-After. Signed-in chat and Paste Check on api.clearrun.net do not use the key. Chain verification and audit export need a Pro plan or higher. An unverified account cannot create a key. A free account can hold one active developer key. Revoke it before creating another. A key that is not a free developer key is refused on a free account with 403 and code API_ACCESS_REQUIRED. On Pro, Business, and Enterprise, API access is a saved setting. Turning it off returns 403 and code API_ACCESS_DISABLED. That switch does not turn a free developer key on or off.

ClearRun does not use your content to train third-party or generation models. Whether your evaluations may help improve ClearRun's own scoring is an account setting: free plans start opted in, paid plans start opted out, and Enterprise stays off.

  1. Open https://api.clearrun.net/account/keys. Sign in on that page if you need an account. That page is where you create a key.
  2. Save the key on your machine:
npx @clearrun/cli login

Or set the CLEARRUN_API_KEY environment variable. Do not commit a real key.

CLEARRUN_API_KEY is checked first. When it is unset, the SDK, CLI, and MCP server read ~/.config/clearrun/config.json, which is the file clearrun login writes. XDG_CONFIG_HOME/clearrun/config.json is used when XDG_CONFIG_HOME is set.

ClearRun scores the honesty of an AI answer: whether the confidence it expresses is backed by its reasoning. It is not a fact-checker. A high score means the confidence matches the justification. It does not mean the answer is true.

You get a 0 to 100 score, a grade, component signals, a short summary, and a signed verdict you can look up again. The open packages in this repo are the client. The scoring engine runs as a hosted service at https://api.clearrun.net. It is not in this repository, and these docs do not describe its formula.

Calibrated for English. Scores on other languages are outside the current validated scope.

Why use it

Use ClearRun when an answer will be shown to a customer, checked into a review, or used for a decision. It flags answers that sound surer than their reasoning supports, and it leaves a record someone else can verify. It does not block or rewrite the answer.

Three ways to call it:

PackageVersionUse it when
@clearrun/sdk1.2.0Your own app or service should call the API.
@clearrun/cli1.2.0You want a terminal command or a CI check.
@clearrun/mcp1.2.1Claude Desktop, Claude Code, Cursor, or VS Code should call the tools.

@clearrun/core-types is 1.2.0. The SDK depends on it. @clearrun/scoring, @clearrun/security, and @clearrun/vendors stay at 0.1.0. One page for all three clients: docs/developers.md.

npm serves 1.2.0 of @clearrun/sdk, @clearrun/cli, @clearrun/mcp, and @clearrun/core-types. Breaking change from 0.2.0: clearrun verify --text no longer scores. Use clearrun score. clearrun verify <verdictId> is a lookup and does not need an API key. On npm 0.2.0, clearrun verify <file> scores text, the CLI exports a scoring verify(), the SDK does not export createVerifyClient(), and MCP verify still requires a key. The commands below match this repository. @clearrun/sdk and @clearrun/cli here are 1.2.0. @clearrun/mcp here is 1.2.1.

Access

The steps are in Get an API key above. createKernelClient() does not throw when no key is configured. The first score, evaluate, or chat throws MissingApiKeyError. The error names the keys page, npx @clearrun/cli login, and CLEARRUN_API_KEY.

For local development only, pass { forceMock: true } to the SDK. The mock returns schema-valid verdicts and is not a hosted score. The CLI and the MCP server do not offer that mock.

Install

npm install @clearrun/sdk
npm install -g @clearrun/cli
npx -y @clearrun/mcp

To work from a clone:

git clone https://github.com/Adepoco/ClearRun.git
cd ClearRun
npm install

Node.js 18 or newer. Tag v0.1.0-oss is an earlier snapshot. npm install from the registry resolves @clearrun/sdk, @clearrun/cli, @clearrun/mcp, and @clearrun/core-types to 1.2.0. This clone's @clearrun/mcp is 1.2.1. The quickstart below matches this repository. A secret API key belongs on a server or a backend proxy. The hosted API sends no CORS headers.

Quickstart

SDK:

import { createKernelClient } from '@clearrun/sdk';

const client = createKernelClient({
  hosted: { apiKey: process.env.CLEARRUN_API_KEY },
});

const { verdict } = await client.evaluate({
  prompt: 'Where is the Eiffel Tower?',
  responseText: 'The Eiffel Tower is in Berlin.',
});

console.log(verdict.score, verdict.grade, verdict.componentSignals);

CLI:

npx @clearrun/cli login
clearrun score --text "The Eiffel Tower is in Berlin."

export CLEARRUN_API_KEY=YOUR_CLEARRUN_API_KEY works too, and it overrides the saved key.

No API key for local development? Pass { forceMock: true } to the SDK. The mock returns schema-valid verdicts, never real scores. The MCP server never uses the mock.

MCP hosts use the copy-paste blocks in packages/mcp/README.md. Each one runs npx -y @clearrun/mcp with CLEARRUN_API_KEY in env. Cursor's project file is .cursor/mcp.json.

Tools and commands

SDK methods and MCP tools:

CallWhat it does
score / clearrun_scoreScore text that was already written (POST /api/score).
evaluate / clearrun_evaluateScore an existing answer, with the prompt when you have it (POST /api/evaluate).
chat / clearrun_chatAsk the hosted API to generate an answer and score it (POST /api/chat).
verify / clearrun_verifyLook up a verdict id (GET /api/verify/{id}).

The MCP process speaks stdio. It starts and lists these tools with no API key. clearrun_score, clearrun_evaluate, and clearrun_chat return an error on call until CLEARRUN_API_KEY is set. clearrun_verify does not read the key. Each tool input schema describes its arguments: responseText or message is required for a new call, and verdictId is required for a lookup.

CLI (score scores text, verify looks up a verdict id):

clearrun score answer.txt
clearrun score --text "The capital of France is Paris." --json
clearrun score --config ci/clearrun.config.json --threshold 75
clearrun verify VERDICT_ID

Short examples for each client are in the package READMEs and in docs/developers.md.

Credits

Credits are metered per call. On the public pricing page, evaluate and score cost at least 3 credits. Chat costs at most 4 credits per turn. clearrun verify and GET /api/verify/{id} spend no credits. Current costs and plans: https://api.clearrun.net/pricing.

Verify a verdict

A hosted verdict id can be checked again with no account:

curl https://api.clearrun.net/api/verify/VERDICT_ID

The lookup confirms the stored verdict. It does not fact-check the original answer.

What you get back

A Verdict (see schema/verdict.schema.json and docs/CONTRACT.md): score (0 to 100, or null when the API cannot score), grade, risk, componentSignals, summary, and an Ed25519 signature you can verify locally or with GET https://api.clearrun.net/api/verify/{verdictId}. Paid plans receive four signals: Evidence support, Reasoning integrity, Confidence calibration, and Ambiguity handling. Free use, developer API access, and public lookups receive Evidence support and Reasoning integrity.

Grades are Well supported, Generally reliable, Verify before use, High risk, Likely misleading, and Not configured. They are not labels of factual truth.

Open core

MIT in this repo: the SDK, model adapters (OpenAI, Anthropic, Google), CLI, MCP server, verdict types, and schema. Clone it, embed it, build on it.

The scoring kernel is hosted and closed. It provides honesty scoring and signed attestation. The SDK calls it. The scoring logic is not in this repo by design. The hosted kernel is licensed separately (BSL-1.1). See LICENSE.

Links

ClearRun is made by Adepoco, a California corporation. Contact: contact@adepoco.com.

NPM
@clearrun/mcp
Install Command
npm install @clearrun/mcp