nrly
nrly's MCP server is a local workbench for weight-space experimentation: discover what's supported, inspect parameters, run bounded weight-edit experiments, read the evidence back, and referee studies against registered controls.
Discover capabilities — list supported backends, operations, and limits without loading a model (
capabilities).Submit experiments — queue bounded runs with a model spec, cases, weight program (scale/replace/patch/add/sparse-add/low-rank/slice-scale, activation edits, pipelines), generation settings, budgets, activation captures, diagnostics, and weight reads; idempotent via
request_id(submit_experiment).Inspect weights only — read a tensor catalog and pre-edit parameter slices/coordinates with no forward passes (
submit_inspection).Read run evidence — status/results, run listing, sample enumeration and per-sample output text, exact weight changes, activation captures, and teacher-forced token probabilities (
get_run,list_runs,get_samples,get_sample,get_inspection,get_capture,get_diagnostics).Compare and control — diff compatible scored runs to surface improvements and regressions separately (
compare_runs); cancel owned queued/running jobs (cancel_run).Work with studies — browse operator-provisioned studies, their public development cases, case specs/messages, comparators, and aggregate assessments, without touching sealed holdout data (
list_studies,get_study,get_study_cases,get_study_case_spec,get_study_case_messages,get_study_comparator,get_study_assessment).Run candidate attempts — submit a frozen candidate to queue baseline/control/candidate development runs, track all attempts (including failures), and read per-arm samples (
submit_study_candidate,get_study_attempt,list_study_attempts,get_study_samples).Finalize or cancel — freeze a nominee for one-shot held-out evaluation, or cancel final/attempt runs (cancelled finals stay frozen and inconclusive) (
finalize_study,cancel_study_final,cancel_study_attempt).Bounded by design — paginated limits/offsets on large records, summaries plus artifact handles, and hard caps (e.g. 32 operations, 65,536 inline values).
Supports loading and inspecting pinned Hugging Face causal language models from a local cache, including safetensors-based models with remote code disabled, and running weight-editing and replayable experiments against them.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nrly inspect output.weight and show its shape and hash"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Make the weights your workspace
What happens when you change the model itself?
nrly gives that question an executable form: a weight program, bound to an exact model, with recorded changes and a repeatable evaluation. Work directly with parameters, inspect activations and token probabilities, compare an edit against controls, and export a bundle someone else can run.
The ambition is a shared experimental language for weight-space programming. Today, nrly supplies the local instruments: a Python kernel, CLI, MCP server, and typed TypeScript client.
Research question | Instrument |
What is actually in this tensor? | Coordinate and slice reads, statistics, shapes, and hashes. |
What did my edit change? | Recorded parameter deltas, selected activation captures, and continuation token probabilities. |
Does it beat a simpler intervention? | Registered prompt or checkpoint comparators, paired seeds, and target/regression summaries. |
Did the next repair undo the first? | Immutable edit ancestry and original → A → A+B comparisons. |
Which sites in this checkpoint have been tested? | A local lever map: pencil until a registered held-out study inks or strikes it. |
Can someone reproduce this? | Exact model/runtime fingerprints, checksummed bundles, fresh execution, and portable patch programs. |
Related MCP server: groundtruth-mcp
First contact
Start with a small, real PyTorch network on the CPU. No model download or GPU is needed for this demo; setup installs Python dependencies, including PyTorch.
Requires Git, uv, and Python 3.12+. Windows with Python 3.13 is the validated environment. Install from the checkout while registry releases are being prepared:
git clone https://github.com/JMoak/nrly.git
cd nrly
uv sync --python 3.13 --extra torch
uv run --no-sync nrly doctor
uv run --no-sync nrly demo --export .nrly/first-contact
uv run --no-sync nrly replay .nrly/first-contactThe demo repairs a deliberately faulty sum network, evaluates six cases, and reruns the original model to check restoration. Expected results:
Original | Edited | Restored |
1 / 6 correct | 6 / 6 correct | Original outputs match |
This is an engineering fixture with a known repair. It demonstrates the workflow; it does not establish a language-model capability improvement. Choose a new export directory on subsequent runs: existing bundles are never overwritten. Keep --no-sync on later commands to preserve the selected environment.
For Hugging Face execution, select --extra hf instead of --extra torch. On Windows with a compatible NVIDIA GPU, use the pinned CUDA 13.2 environment:
uv sync --python 3.13 --extra cuda
uv run --no-sync nrly doctorThe real-model acceptance uses Qwen3-0.6B, BF16, eager attention, and an RTX 5090. Recipes pin the checkpoint revision and default to local files. Follow the model setup before running them; CPU execution requires a CPU device/dtype in the model specification and has a different runtime fingerprint.
The diagnosis guide explains continuation probabilities and activation captures. Qwen evidence records what was actually measured.
Write a weight program
A program describes an edit to a particular model. The same validated representation travels through Python, the CLI, MCP, studies, and replay.
from nrly.authoring import WeightProgram
from nrly.backends.tiny import TinyBackend
from nrly.contracts import CaseSpec, GenerationSpec, ModelSpec, ProgramSpec
case = CaseSpec(id="sum", input="[2,4]", expected="6", scorer="numeric")
with TinyBackend(ModelSpec()) as model:
repair = (
WeightProgram(model.identity.fingerprint)
.scale("output.weight", 2)
.build()
)
before = model.run_case(case, ProgramSpec(), [], GenerationSpec()).output
edited = model.run_case(case, repair, [], GenerationSpec()).output
after = model.run_case(case, ProgramSpec(), [], GenerationSpec()).output
print(before, edited, after) # 3 6 3Inspect → apply → execute → restore → verify. The edit is scoped to execution; source checkpoints stay intact. The saved program preserves the intervention so it can be run again.
Compose sparse patches, scaling, dense/sparse additions, or low-rank updates. Python helpers compile direction removal and rank-one calculations into declarative operations. Record ancestry, check whether successive edits interfere, and export a patch pinned to its base model.
Read authoring and reusable patches, the operation reference, or the example recipes.
Make the experiment answerable
An edited output is the start of an investigation. nrly can register controls, prompt or checkpoint comparators, sampling seeds, evaluation cases, and cumulative budgets before candidate submission. Finalization freezes one candidate for evaluation against a separately supplied holdout.
Each attempt remains in the record. Failed, interrupted, truncated, and unscored cases cannot become passes. Target improvements and regressions are reported separately; a completed run can still produce an inconclusive result.
Diagnose: inspect the token probabilities of a supplied continuation and capture selected activations. These observations are separate from generated-answer accuracy.
Compare: evaluate the original, controls, and candidate on registered cases and seeds.
Review: generate an offline HTML report, inspect edit lineage, and retain unsuccessful attempts.
Share: export the program, specification, results, and integrity manifest. Model weights are referenced, not bundled.
Controlled study walkthrough · Scoring and comparison rules · Current workflows
Map the levers
A lever is a tested place in one exact checkpoint's weights: a site, a direction found
by a re-runnable recipe, a dose-response dial, and a verdict. nrly lever derives the
direction, measures it across strengths, and referees the nominated edit on held-out
cases against matched controls and cheaper alternatives such as a prompt change.
Entries are named by their test and tensor, never by a meaning. Everything starts in pencil. Only a registered study with an inference rule and a matched control can ink an entry, and a refuted entry stays on the map, struck. Entries pin weights rather than a machine, so they can be exported and re-refereed elsewhere. Legends reuse existing public feature dictionaries instead of training new ones, and are always pencil.
The first real-model entries are struck. On Qwen3-0.6B, a derived direction for reply-only compliance did not beat its controls on held-out cases, while a one-line stricter prompt did far better. That is the referee working, not a model repair.
Lever guide · Recorded acceptance
Review a decision repair
The new decision pilot compares original and edited weights with both fixed and separately fitted acceptance thresholds. It produces an interactive offline review of coverage, unsupported decisions, and regressions, plus a shadow-only SystemOne handoff for Ratchet. The first real Qwen run verified execution and interoperability and recommended retaining the original; no useful capability gain is claimed.
This initial workflow is available through Python and nrly decision; it does not add MCP
tools or change existing study contracts. See the recorded acceptance.
Connect your tools
Python authoring CLI MCP / TypeScript
│ │ │
└─────────── validated contracts ───────┘
│
application + studies
│
isolated runner ───── evidence store
│
PyTorch kernel
inspect → edit → run → restoreThe CLI and MCP server share the same application operations. The trusted local Python adapter also supports caller-owned PyTorch models directly; that in-process path does not use the isolated runner.
Start the 26-tool MCP server from the configured checkout:
uv run --no-sync python -m nrly.mcp --root .nrly/agent --model-cache .cache/modelsWhen another application launches the server, configure absolute interpreter and workspace paths. The TypeScript client provides typed run/study handles, pagination, deadlines, and adapters for Keywork, Vibrissa, and other MCP clients. It is currently built from source. The Python kernel remains independent of those applications.
Read MCP execution semantics and the integration map. Optional public study-context export supports CorePack-AI's UCP .ai layout; see the UCP assessment.
Status & evidence
Experimental · Python 0.3.0a1 · TypeScript 0.3.0-alpha.1
The 10 November 2026 acceptance record includes 377 Python tests, 22 SDK tests, live MCP checks, the actual Keywork connector, and real Qwen GPU execution. Python wheel/source archives were inspected, and the wheel was exercised outside the checkout using existing dependencies.
On Qwen, nrly recorded 16,384 changed parameter values, nonempty probability and activation evidence, exact restoration, and successful replay. The sampled study's final verdict was inconclusive / retain the original. That establishes working instrumentation, not a useful model repair.
The next research milestone is a repair that beats matched controls on independently prepared held-out cases. Autonomous editor synthesis, quantized/tied-weight editing, merged-checkpoint export, and a hosted community registry remain future work. The research audit explains the foundations and open questions.
Operating envelope
nrly is built for trusted local research. Hugging Face loading requires safetensors and disables remote code. It is not an authenticated multi-user service or an arbitrary-code sandbox. The holdout boundary is enforced by the application; filesystem access can bypass it.
Programs are bounded to 32 operations and 65,536 inline values. Distinct edited tensor storage is capped at 512 MiB; this is not a total-memory limit. Full-state restoration checks cost time proportional to model size. Replay checks exact identities; cross-device or cross-version determinism is not promised.
Read the security policy and evidence semantics before connecting agents or sharing artifacts.
Build with us
Useful contributions start with an experiment: a reproducible failure, an independently evaluated edit, a model adapter, or a clearer way to inspect the evidence. Include the model revision, runtime, recipe, controls, and observed result. Keep private datasets, credentials, and model weights out of issues and bundles.
uv run --no-sync pytest
uv run --no-sync ruff check .
uv run --no-sync mypy
uv run --no-sync python scripts/check_publication.py
bun install --frozen-lockfile
bun run test:client
bun run test:mcpGPU/model-download checks are separate. The optional bun run test:keywork additionally requires KEYWORK_REPO pointing to an existing Keywork checkout. See engineering conventions before changing contracts or execution semantics.
Available Tools
26 toolscancel_runA
Cancel an owned queued/running job; completed records remain immutable.
Inputs: run_id (required). Returns: object
cancel_study_attemptC
Request candidate cancellation; consumed study reservations are not refunded.
Inputs: study_id (required), attempt_id (required). Returns: object
cancel_study_finalC
Stop final evaluation; the nominee remains frozen and the result is inconclusive.
Inputs: study_id (required). Returns: object
capabilitiesA
Discover supported backends, operations and limits without loading a model.
Inputs: no named parameters. Returns: object
compare_runsB
Compare compatible scored runs, exposing improvements and regressions separately.
Inputs: baseline_id (required), candidate_id (required). Returns: object
finalize_studyB
Freeze one completed nominee and queue its one-shot held-out evaluation.
Inputs: study_id (required), attempt_id (required). Returns: object
get_captureC
Page stored activation values with their capture position and invocation metadata.
Inputs: run_id (required), target (required), case_id (required), limit, +1 more. Returns: object
get_diagnosticsC
Page teacher-forced token probabilities; these are not generated task outcomes.
Inputs: run_id (required), case_id (required), limit, offset, +2 more. Returns: object
get_inspectionC
Page a completed run's tensor catalog and captured pre-edit weights.
Inputs: run_id (required), limit, offset, value_limit, +2 more. Returns: object
get_runB
Read status/results; large records return an explicit summary and artifact handle.
Inputs: run_id (required). Returns: object
get_sampleB
Read one sample, bounded output text, captures and exact weight-change evidence.
Inputs: run_id (required), case_id (required), change_limit, output_limit, +2 more. Returns: object
get_samplesC
Enumerate bounded sample summaries, including when the complete run is truncated.
Inputs: run_id (required), limit, offset. Returns: object
get_studyC
Read study design summary, cumulative reservations and aggregate final evidence.
Inputs: study_id (required), target_limit, target_offset. Returns: object
get_study_assessmentC
Page complete assessment JSON; omit attempt_id for public aggregate final evidence.
Inputs: study_id (required), limit, offset, attempt_id. Returns: object
get_study_attemptB
Read a candidate attempt's status and aggregate development assessment.
Inputs: study_id (required), attempt_id (required). Returns: object
get_study_case_messagesB
Read bounded chat messages for development cases only; never sealed holdout text.
Inputs: case_id (required), study_id (required), limit, offset, +2 more. Returns: object
get_study_casesC
Page public development cases and expectations; never returns held-out cases.
Inputs: study_id (required), limit, offset, input_limit, +1 more. Returns: object
get_study_case_specC
Page complete development case JSON including chat and scoring constraints.
Inputs: case_id (required), study_id (required), limit, offset. Returns: object
get_study_comparatorC
Page registered comparator configuration and its measured model identity.
Inputs: study_id (required), comparator (required), limit, offset. Returns: object
get_study_samplesC
Read bounded development outputs for baseline/no_op/control:NAME/candidate arms.
Inputs: arm (required), study_id (required), attempt_id (required), limit, +3 more. Returns: object
list_runsC
List the latest local run summaries.
Inputs: limit. Returns: object
list_studiesB
Find operator-provisioned studies without accessing sealed cases.
Inputs: limit. Returns: object
list_study_attemptsC
Page all candidate attempts, preserving unsuccessful and cancelled attempts.
Inputs: study_id (required), limit, offset. Returns: object
submit_experimentB
Queue a bounded experiment; identical request IDs are idempotent.
Inputs: spec (required), request_id. Returns: object
submit_inspectionC
Queue a model catalog and bounded parameter reads without forward passes.
Inputs: model (required), name, request_id, weight_reads. Returns: object
submit_study_candidateC
Admit a frozen candidate and queue baseline/control/candidate development runs.
Inputs: study_id (required), candidate (required), request_id. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
The set has many closely related retrieval tools: get_run vs. get_study_attempt, get_samples vs. get_sample vs. get_study_samples, and get_study_cases vs. get_study_case_spec vs. get_study_case_messages. Descriptions provide useful distinctions, but the density of similar names and resource boundaries creates real misselection risk for an agent.
Names are overwhelmingly consistent snake_case verb_noun patterns such as submit_experiment, get_run, list_studies, and cancel_study_attempt. The standalone capabilities tool and a few compound study names are minor deviations, but the convention remains predictable.
At 26 tools this is at the heavy end for a single server, though the domain includes multiple complex workflows: experiments, inspections, runs, studies, candidates, and samples. Most tools appear to earn their place, but the surface is large enough to feel burdensome.
The tool set covers experiment submission, retrieval, sampling, diagnostics, cancellation, and comparison, plus a substantial study lifecycle with candidates, attempts, finalization, cases, and assessments. Coverage is strong; gaps are minor and largely explained by immutable completed records.
Maintenance
Related MCP Connectors
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Live, editable canvas for AI agents — author graphs via MCP, then watch and reroute runs live.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server for mechanistic interpretability research, enabling agents to drive probe-causality and SAE-feature experiments via 8 typed tools on user's own compute (Colab).24 PyPIApache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables coding agents to run project-specific checks, replays, simulations, and queries as MCP tools, providing ground-truth feedback on config edits instead of guessing.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables reproducible evaluation of AI coding agents by exposing repository inspection, code editing, test running, and deterministic verification through MCP tools.-
- AlicenseNot gradedqualityBmaintenanceEnables controlled access to language model internals via MCP, including activation capture, patching, ablation, steering, probe fitting, and bounded generation, with a persistent experiment ledger and human-approved compute.MIT