Skip to main content
Glama

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.

Related MCP server: Arkheia Hallucination Detection MCP

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:

Package

Version

Use it when

@clearrun/sdk

1.2.0

Your own app or service should call the API.

@clearrun/cli

1.2.0

You want a terminal command or a CI check.

@clearrun/mcp

1.2.1

Claude 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:

Call

What it does

score / clearrun_score

Score text that was already written (POST /api/score).

evaluate / clearrun_evaluate

Score an existing answer, with the prompt when you have it (POST /api/evaluate).

chat / clearrun_chat

Ask the hosted API to generate an answer and score it (POST /api/chat).

verify / clearrun_verify

Look 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.

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

Available Tools

4 tools
clearrun_chatWrite an answer and score itA

Ask the hosted ClearRun API to write an answer and score it. Use this when you want a new answer, not a score of text you already have. Use clearrun_score or clearrun_evaluate for text that was already written. Use clearrun_verify to look up a verdict id you already have. Do not use this to check whether an existing answer is true. ClearRun scores whether an answer's confidence is backed by its reasoning, from 0 to 100. It does not check facts. A high score does not mean the answer is true. Needs CLEARRUN_API_KEY. Calls POST https://api.clearrun.net/api/chat, which spends credits, writes an answer, and stores a verdict. Without a key, the tool returns an error and does not call the API. The tool is an error when the body has no answer and no verdict.

Inputs: message (required), modelId, sessionId.

clearrun_evaluateScore an answer with its promptA

Score an existing answer together with the prompt that produced it. Use this when you have both the answer and the prompt. Use clearrun_score when you have only the answer. Use clearrun_chat when the hosted API should write the answer. Use clearrun_verify to look up a verdict id you already have. Do not use this to check whether the answer is true. ClearRun scores whether an answer's confidence is backed by its reasoning, from 0 to 100. It does not check facts. A high score does not mean the answer is true. Needs CLEARRUN_API_KEY. Calls POST https://api.clearrun.net/api/evaluate, which spends credits and stores a verdict. Without a key, the tool returns an error and does not call the API. The tool is an error when the body has no verdict.

Inputs: responseText (required), prompt, modelId, sessionId.

clearrun_scoreScore text already writtenA

Score text that was already written. Use this when you have the answer and do not have the prompt. Use clearrun_evaluate when you also have the prompt. Use clearrun_chat when the hosted API should write the answer. Use clearrun_verify to look up a verdict id you already have. Do not use this to check whether the answer is true. ClearRun scores whether an answer's confidence is backed by its reasoning, from 0 to 100. It does not check facts. A high score does not mean the answer is true. Needs CLEARRUN_API_KEY. Calls POST https://api.clearrun.net/api/score, which spends credits and stores a verdict. Without a key, the tool returns an error and does not call the API. The tool is an error when the body has no verdict.

Inputs: responseText (required), modelId.

clearrun_verifyLook up a stored verdictA
Read-onlyIdempotent

Look up a stored ClearRun verdict by its id. Use this when you already have a verdict id. Use clearrun_score or clearrun_evaluate to score text you already have, and clearrun_chat when the hosted API should write an answer. Do not use this to score new text or to check facts. The stored score, when the API includes one, says whether an answer's confidence is backed by its reasoning, from 0 to 100. It does not check facts. A high score does not mean the answer is true. Sends no API key. Calls GET https://api.clearrun.net/api/verify/{verdictId}, which reads the stored verdict, spends no credits, and does not change it. The tool is an error when the body is not a verification result.

Inputs: verdictId (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.6/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct input shape: verify takes an id, score takes text only, evaluate takes text plus prompt, and chat generates an answer. The descriptions explicitly cross-reference one another with 'use X when... use Y when...' guidance, leaving almost no room for misselection.

    Naming Consistency5/5

    All names follow a strict clearrun_<verb> snake_case pattern: verify, score, evaluate, chat. The verbs are meaningful and consistent in style, with no casing or prefix deviations.

    Tool Count5/5

    Four tools map cleanly onto the service's apparent endpoints (score, evaluate, chat, verify) with no redundant entries. The set is compact and each tool earns its place for this narrow scoring domain.

    Completeness4/5

    The core scoring lifecycle is covered: generate, score with or without prompt, and retrieve a stored verdict. However, there is no way to list past verdicts or check credit/account status, so an agent that loses a verdict id has no recovery path.

    Maintenance

    ActivityActive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers