The context layer that checks itself · MCP-delivered

Stop re-explaining your data to your AI every session.

Connect ClariLayer to Claude Code, Cursor, Codex, or claude.ai. It bootstraps real working context from five source kinds — SQL, dbt, notes, dictionaries, and semantic models — for your AI data agent to recall before it answers. Then your agent stops making the same data mistakes — wrong table, wrong join, refunds counted in revenue — session after session.

Claude CodeCursorCodexclaude.ai

CLI connection example

$ claude mcp add --transport http clarilayer https://app.clarilayer.com/api/mcp/mcp --header "Authorization: Bearer cl_YOUR_CONTEXT_KEY"

Your context layer

What your AI knows about your data

MCP connected
  • Active customer

    Definition · you → reconciled

    Asserted
  • Net revenue (excl. refunds)

    Definition · from dbt

    Asserted
  • orders.region — null before 2023

    Schema note · you → reconciled

    Caveat
  • fct_orders ↔ dim_customers join

    Join path · you

    Asserted

Reconciled against your source — not blindly asserted. Mismatches surface as a caveat so you and your agent know what to trust.

In the personal MCP path, ClariLayer never holds warehouse or CRM credentials, runs SQL, or calls HubSpot. Your agent uses its own source access and supplies the supported evidence; ClariLayer reconciles it and flags caveats.

Bootstraps SQL · dbt · CLAUDE.md · dictionaries · semantic models

Databricks
Snowflake
BigQuery
dbt
GitHub

See it work inside the agent

Your context, recalled and reconciled — without leaving Claude Code.

One command to connect. Then your agent recalls the definition you saved, runs the query with its own warehouse access, and reconcile flags what to treat with care.

claude-code — clarilayer
$ claude mcp add --transport http clarilayer https://app.clarilayer.com/api/mcp/mcp --header "Authorization: Bearer cl_YOUR_CONTEXT_KEY"
Connected. ClariLayer rides along inside the agent.
How many active customers do we have?
recall · use_case: "active customers"

saved context · returned by recall

"Active customer" → fct_customers,
status = 'active' AND mrr > 0
source: you → reconciled · status: asserted
Running it with my own warehouse access…
SELECT count(*) FROM fct_customers
WHERE status = 'active' AND mrr > 0;
reconcile · declared vs. actual
Caveat — declared definition excludes 142 rows where mrr is NULL; counted as not-active. Confirm NULL handling.
You have 4,820 active customers.
Grounded in your saved definition and checked against your warehouse — with one caveat noted above.

Reenactment of the real loop — the same recall → reconcile → caveat flow the MCP runs today. Your agent keeps its own warehouse access; ClariLayer never holds your warehouse credentials and never runs SQL server-side.

Your AI is brilliant — and it forgets your data every session.

Every session starts from zero

New chat, new context window — and your agent has forgotten which table is the real one, how the joins go, and which definition you actually use. You re-explain it. Again.

A CLAUDE.md is just asserted text

Hand-typing your definitions into a notes file has the same trust problem as the original numbers: nothing checked it against your warehouse. It drifts, and your agent trusts it anyway.

So it repeats your data mistakes

Wrong table, wrong join, refunds counted in revenue, an active customer defined three different ways — the same mistakes, session after session, because nothing remembers the correction you already made.

Reconciled, not asserted

A CLAUDE.md is asserted. A ClariLayer entry is reconciled.

Hand-typing your definitions into a notes file is a real, useful start — but nothing checked it against your warehouse. A ClariLayer entry is the same definition, reconciled against your real warehouse result: provenance and status are shown, and a declared-vs-actual mismatch surfaces as a caveat instead of a confident wrong answer.

Hand-written CLAUDE.md
CLAUDE.md
## Metrics
"Active customer" = a user who logged in
in the last 90 days (raw_users.last_login).
 
# TODO: double-check this is still right
asserted · nothing checked it

Just text. Nothing reconciled it against your warehouse, so when the definition drifts the agent keeps trusting the stale line — confidently.

ClariLayer entry
"Active customer"
"Active customer" → fct_customers,
status = 'active' AND mrr > 0
source
dbt + you → reconciled
last reconciled
2 days ago
status
asserted
caveat · declared ≠ actual

The declared definition counted logged-in users; reconciling against your warehouse showed the billing rule (mrr > 0) returns a different number. Flagged for you to resolve — not hidden behind a clean-looking total.

Reconciled against the result your agent computed locally. ClariLayer never holds your warehouse credentials and never runs SQL server-side — it checks declared against actual, and shows its work.

How it works

Bootstrap. Recall. Remember. Reconcile.

Four everyday verbs form the core loop. Supporting tools handle review, lifecycle, full-context fetches, and the completion receipt.

01

Bootstrap

Start from five shipped sources: SQL, dbt models, CLAUDE.md or notes, a data dictionary, and a semantic model. SQL, dictionaries, and semantic models become structured context; dbt and notes come along too.

02

Recall

Mid-task, your agent pulls relevant context in-flow. Exact names lead, use-case scoping stays explicit, and the result says when useful context was scoped away instead of silently hiding it.

03

Remember

Every correction, definition, and schema note you make persists. Your agent retains it across sessions, so you stop re-explaining the same thing every chat.

04

Reconcile

Ground a saved definition against a warehouse result or bounded, row-free HubSpot evidence. A mismatch surfaces as a caveat; otherwise the entry remains asserted.

Before the agent says done

Persist the agent's context declaration.

Managed instructions ask supported local agents to recall first, write confirmed durable changes, then call context_checkpoint. The durable, idempotent receipt persists either the agent's context_updated declaration or an explicit no_update_required declaration and validates ownership and eligibility of referenced ClariLayer objects. It does not independently prove an entry changed or certify the code, query, deployment, or external system. A pending proposal or failed update cannot complete the loop.

Same agent. Same prompt. The difference is your context.

Without your saved context, the agent guesses from raw table names. With it, the agent recalls the definition you reconciled against your warehouse — and knows what to treat with care.

Agent without your context
// You: "How many active customers do we have?"

SELECT count(*) FROM raw_users
WHERE last_login > now() - interval '90 days';

// Wrong table (raw_users, not fct_customers).
// "Active" = logged-in, not your billing rule.
// The same mistake you corrected last week.
Agent with ClariLayer
// You: "How many active customers do we have?"

// Agent recalls your saved context:
"Active customer" → fct_customers,
status = 'active' AND mrr > 0
source: you → reconciled · status: asserted

SELECT count(*) FROM fct_customers
WHERE status = 'active' AND mrr > 0;

// Grounded in your definition, checked against
// your warehouse. Caveats flagged, not hidden.

The first reconcile

“Why don’t these two numbers match?”

The acute analyst moment: two sources disagree and the QBR is in an hour. ClariLayer reconciles a saved definition against your real warehouse result and flags the drift as a caveat — checked against source, never blindly asserted.

Your dashboard says

$1.42M

Net revenue for the quarter — the number on the board.

Your agent’s query returns

$1.51M

The ad-hoc query your agent just wrote, against the same warehouse.

A $90K gap, and no way to tell which one is right.

reconcile

Your agent runs the stored net_revenue SQL with its own access and reports the result shape back. ClariLayer compares the saved definition’s declared signals — its columns, grouping, and aggregates — against what came back.

Caveat recorded

They don’t line up: the live result is missing a column the saved definition expects, so reconcile records a caveat. That’s the signal to look closer — not a ruling on which dollar figure is right.

The caveat sends your agent digging

With its own warehouse access it traces the $90K to the cause: the ad-hoc query never joined the refunds table, so it reported gross, not net. You ship the refund-adjusted $1.42M.

remember

You correct it once so next quarter the agent starts from it instead of rediscovering it:

// saved to your context
“net revenue must net refunds”
source: you · status: asserted

The caveat caught the $90K discrepancy an hour before the QBR. Your agent traced it to the missing refunds join, you shipped the right number, and the correction is remembered for good. Your agent runs the query with its own access; ClariLayer never holds your warehouse credentials and never runs SQL server-side.

Live now · HubSpot CRM reconcile

Check the CRM rules hidden behind internal values.

Save a row-free contract for a HubSpot property — expected stages, a canonical value, deprecated aliases, or an expected label. Your agent reads HubSpot with its own authorized access and sends ClariLayer only bounded property metadata and value distributions.

On this personal path, ClariLayer never receives CRM credentials or records, and it never calls HubSpot. A mismatch becomes a caveat; otherwise the contract remains asserted. Salesforce contracts can be stored and recalled, but Salesforce reconciliation is not enabled.

See the HubSpot evidence recipe

Synthetic deal-stage check

Saved contract

Property
deals.dealstage
Canonical
contract_signed
Deprecated alias
closedwon

Row-free observation

Canonical records
248
Deprecated records
3
Distribution
Complete · exact counts
Outcome
Caveat — both values are in use

A configured expected value with an exact zero in a complete distribution is absent from the observed records. That does not mean the option is missing from HubSpot configuration.

Your context, working for you.

One analyst, your own data, your own agent. No governance rollout or procurement cycle — just your context, bootstrapped, reconciled, and remembered.

Day-1, not blank-slate

Bootstrap

Your agent doesn't start from zero — and it doesn't start from a hand-typed CLAUDE.md. Point ClariLayer at the work you already have.

What gets ingested

SQL
Validated SELECTs, deterministically structured
dbt
Model files imported as schema notes
CLAUDE.md
Your existing notes, brought along
Dictionary
One structured schema note per variable
Semantic model
One canonical definition per model

“Bootstrap my context from ./analytics/sql + my dbt models.” Real working context on the first session.

Checked, not just claimed

Reconcile

A saved definition is reconciled against a warehouse result or bounded, row-free HubSpot evidence collected by your agent.

What reconcile returns

Match
Applicable checks pass; the entry remains asserted, not verified
Mismatch
Flagged as a caveat so you know what to trust
CRM boundary
No HubSpot rows or credentials; ClariLayer never calls the provider
Measured
Internal paired eval: 36/38 data questions right with the layer vs 26/38 without

Warehouse access and CRM access stay with your agent. ClariLayer compares only the supported evidence it sends.

It compounds

Remember

Every correction, every reconcile, every new note persists. Your agent grounds on more of your context over time.

The retention loop

Correct once
The fix is remembered, not re-typed next session
Recall in-flow
The right context, pulled mid-task
Checkpoint
The agent's updated or no-update declaration is recorded before completion
Over weeks
Progressively more right about your data

“Claude Code finally understands my project.” The context you build is the moat.

For teams · the Governed Context Edge

Yours today. Your team's — in pilot now.

ClariLayer starts as your personal context layer. The Governed Context Edge — your reconciled definitions promoted into a governed team canon, with ownership, approval, and one right metric — is built and in private pilot. A few design-partner slots are open.

Personal context merges into shared

The definitions and corrections you build solo are exactly what later merges into shared, owned team context — the same engine, one level up.

Ownership, approval, one right metric

When a team adopts it, governance arrives: who owns a definition, what's approved, and the one right answer everyone's agents use.

Land solo, expand to the team

Start as your personal context layer with no procurement. When the team is ready, the Edge is already built — private pilots are onboarding now.

Connect your AI

One command — or one OAuth approval.

Connect Claude Code, Cursor, or Codex with a context key, or add ClariLayer as a custom claude.ai Connector and approve over OAuth. Managed instructions keep supported local agents on the recall, confirmed-update, and completion-checkpoint loop.

Connect from claude.ai

OAuth · no context key

Add ClariLayer as a custom Connector, paste only the MCP URL, then sign in and approve in your browser.

https://app.clarilayer.com/api/mcp/mcp
  1. In claude.ai, open Settings → Connectors → Add custom connector.
  2. Paste the ClariLayer MCP URL: https://app.clarilayer.com/api/mcp/mcp
  3. Sign in to ClariLayer and approve the connection when prompted.
  4. Back in a chat, confirm it worked by asking Claude to run the clarilayer__health tool.

Connect a local coding agent

Claude Code, Cursor, and Codex authenticate with the context key you mint in ClariLayer.

Run in your terminal

claude mcp add --transport http clarilayer https://app.clarilayer.com/api/mcp/mcp --header "Authorization: Bearer cl_YOUR_CONTEXT_KEY"

Replace cl_YOUR_CONTEXT_KEY with your context key. The key is shown once at creation, so paste it straight into the command.

Built to be trusted with your data

Grounded against supported evidence — and it shows its work.

The whole point is that your AI's context is grounded against reality, not just asserted. We measured what that is worth — and we label every claim with exactly how far it goes.

Measured, not manufactured

36 of 38 with the layer. 26 of 38 without.

In our internal paired eval, the same agent answered 36 of 38 data questions correctly with ClariLayer connected — 26 of 38 without. The cheaper the model, the bigger the lift: the control went confidently wrong under session load.

Shipped, not slideware

Four everyday verbs, with the supporting loop behind them.

Bootstrap, recall, remember, and reconcile are live in production, alongside review, lifecycle, full-entry fetch, and a durable completion receipt. Connect Claude Code, Cursor, or Codex with a context key, or claude.ai over OAuth.

A standard, not a shortcut

Every mark you see is one we can back.

A compatible saved definition is checked against a warehouse result or bounded, row-free HubSpot evidence. A mismatch is flagged as a caveat; otherwise it stays asserted. The stronger “verified” mark is not a live status.

Your data, your access

Personal reconciliation keeps source credentials with your agent.

On the personal MCP path, ClariLayer never runs SQL or calls HubSpot. Warehouse evidence can include optional preview rows; HubSpot evidence contains only bounded metadata and aggregate distributions, with CRM rows forbidden.

FAQ

Straight answers to the real objections.

What ClariLayer can see, what it doesn't touch, what's free, and what “reconciled” actually means.

Stop re-explaining your data.

Connect ClariLayer to Claude Code, Cursor, or Codex in one command. Free to start — no team, no procurement, just your context.

Connect your AI

For teams

The Governed Context Edge is in private pilot — a shared, governed canon for your whole team's agents. We onboard design partners personally.