validate_ir
Validate IR
Validate an app.ir.json locally (envelope + every declarative step).
app_ir必填
io.github.imperalcloud由 GitHub 账号 imperalcloud 发布v0.9.13更新于 Nov 8, 2026
Build, validate, smoke-test & deploy Imperal declarative IR apps from any LLM or agent.
为编程智能体加上代码地图、检查点、跨会话记忆和答案事实核查,并提供 Imperal 应用的校验与部署工具。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
参照 仓库 中的启动说明。
[Imperal MCP on mcprush] [PyPI] [Python] [License: GPL v3] [Protocol: ICNLI] [Protocol: MCP]
Stop babysitting your AI. Put it in an exoskeleton: it remembers everything, sees your whole codebase, can undo any change and can't fake a result - or hallucinate one past you. Fewer wasted tokens, fewer broken builds. Works with Claude Code, Cursor, OpenAI Codex, Gemini CLI, Windsurf, Claude Desktop, Cline and Goose.
Keep the quotes: zsh (the macOS default) reads [code] as a file pattern without them. No pipx yet? uv tool install "imperal-mcp[code]" does the same, or see Quick start.
The code tools work offline, no account needed. Memory across sessions, the kernel's frame and the hallucination
check run on an Imperal Cloud account (imperal-mcp login) - sign-up is free, plans
and credits: imperal.io/pricing.
AI coding agents are brilliant - and work blind:
grep the repo and read
three more files.imperal-mcp wraps the agent you already use. Same model, new abilities:
An illustration of one task - your own numbers: token_savings() measures them in every session.
You can't trust a sentence just because it sounds sure. So the exoskeleton doesn't trust the model's words - it checks them against the record of what actually happened in this task.
On every step, the names the agent's thinking leans on - functions, files, sizes - are matched against what the task really read, what its commands really returned and what your code map really holds. A name found nowhere comes back in the next frame as NAMED BUT NOT FOUND, before the agent builds on it.
On the final answer, the same check runs once more. Name a symbol nobody read, a file nobody opened, a size nobody measured - and the answer doesn't reach you. It goes back to the agent:
The agent then reads the code it skipped, or corrects the claim. Either way, what you get is backed by something real.
On "done", words count for nothing: a plan item closes only on a proof the kernel measured - a diff, a check that exited 0, a finding with its sources. "Tests pass" without a test run is not a pass.
What it can't do - and we'd rather tell you: it doesn't make the model smarter. An agent can still draw a wrong conclusion from true facts. What it can no longer do is pass off what it never saw.
HTTP gave every computer one way to talk to every other. ICNLI gives people and AI agents - and agents among themselves - one way to work together that can be proven: whatever the model, whatever the tool.
ICNLI (Infrastructure Contextual Natural Language Interface) is the open protocol at the heart of the exoskeleton - and the reason it can promise honesty, not just speed.
Under ICNLI, an agent's work is a state the kernel can prove, not a story the model tells:
MCP is how your agent talks to the exoskeleton. ICNLI is how the exoskeleton thinks. The specification is open (CC BY-SA 4.0) at icnli.org.
That's it. From the next prompt on, your agent starts each step from the kernel's frame, remembers across sessions and gets its final answer checked.
Claude Code only, in this project:
Adds the imperal server to .mcp.json (keeps your entries, refuses to overwrite malformed JSON), appends the
exoskeleton protocol to CLAUDE.md, and installs a PostToolUse hook that syntax-checks every Edit/Write.
Claude Code CLI:
Cursor / Claude Desktop / Windsurf / Cline (.mcp.json or claude_desktop_config.json):
Any other MCP stdio client: run imperal-mcp with IMPERAL_WORKSPACE set to your repository root.
Pricing: sign-up is free; plans and credits are on imperal.io/pricing. In imperal-mcp only
framespends credits; every other tool is free, and the local code tools work offline.
frame - at the start and after each change. The kernel's step frame: the task and plan with what is proven,
the code around the focus from the exact graph, what the change reaches, the machines and repos, the path so far,
and a DECISION section to act on first. With imperal-mcp setup, the shell's prompt hook puts it in context
automatically.task(goal, items) - declare the request and the plan; an item closes only by a proof the kernel saw. An item
that cannot be finished is marked blocked with the reason.orient -> outline -> read_symbol; search_code / grep_code for exact text;
impact_of_change before editing a shared symbol. The same tools reach a server's repo with
target="host:<alias>" or target="ssh:<connection_id>".checkpoint before risky edits, checkpoint_diff, checkpoint_rollback; check_syntax after.recall,
search_history, state_lens, vault_log_read.imperal-mcp setup)Kernel & task (Imperal Cloud)
Memory & other sessions (Imperal Cloud)
Code map (imperal-mcp[code], local or on a server via target)
Safety net (local)
Apps on Imperal Cloud (ICNLI)
Resources & prompt: imperal://exoskeleton-protocol (the operating discipline), imperal://ir-spec,
imperal://ui-catalog, imperal://examples, and the build_imperal_app prompt for designing, validating,
smoke-testing and deploying an app.
See PRIVACY.md for every data flow in detail.
On Python 3.10+ imperal-mcp runs natively. On older system Pythons (3.7 - 3.9) a zero-dependency launcher provisions
an isolated Python 3.12 runtime via uv on first launch - the full code map works even on legacy systems.
Your agent's memory is your work - your code, your decisions, your mistakes. So it's guarded like one.
Scrubbed on your machine, before sending. Private keys, passwords, tokens, JWTs, API keys, authorization headers,
credentials in URLs, emails, phone numbers, payment cards and SSNs are masked locally by imperal-mcp itself - before
a single byte leaves your machine.
imperal-mcp.setup, claude-setup and install-hooks refuse to overwrite a JSON file they
cannot parse; setup --remove takes away exactly what it added.Does it replace Claude Code / Cursor / Codex? No. It's an exoskeleton, not a new agent: you keep your tool and your model - the exoskeleton makes them remember, see, check and prove.
Which model does it use? Yours. The kernel does the bookkeeping - measuring, remembering, checking - and your agent's model does the thinking.
What does it cost?
Sign-up is free. Plans, included credits and top-ups are on imperal.io/pricing. In
imperal-mcp only frame (the kernel's step frame) spends credits; every other tool - the code map, checkpoints,
memory, history, messaging - is free.
Does it work without the cloud? The code map, symbol reads, blast radius, syntax checks and checkpoints run fully offline. Memory across sessions, the kernel's frame and the hallucination check need your Imperal Cloud account.
How is this different from an MCP server that searches code? Search tells your agent where things are. The exoskeleton also remembers what it did, knows what a change will break, holds it to its plan and checks every claim against what really happened - under one protocol, ICNLI.
Can I remove it?
imperal-mcp setup --remove takes away exactly what setup added. imperal-mcp logout revokes the sign-in and deletes
the local credentials.
Created by Valentin Scerbacov ([email protected]) and built at Imperal.
Imperal, Imperal Cloud, Webbee and ICNLI are trademarks of Imperal, Inc. Claude,
Claude Code, Claude Desktop and Anthropic are trademarks of Anthropic, PBC. Cursor is a trademark of
Anysphere, Inc. OpenAI and Codex are trademarks of OpenAI, Inc. Windsurf is a trademark of Exafunction, Inc.
(Codeium). Gemini is a trademark of Google LLC. All third-party names indicate MCP interoperability only; no
endorsement or affiliation is implied.来源:README.md,提交 8a0ced5
Validate IR
Validate an app.ir.json locally (envelope + every declarative step).
app_ir必填Smoke-test IR
Run one function of an app.ir.json in an ISOLATED store and report {ok,result,trace}.
argsapp_ir必填function必填Deploy IR
Deploy an app.ir.json into the caller's account (creates the app record if needed).
app_id必填app_ir必填List Apps
List the caller's developer apps (PII-masked).
无需输入参数。
Get App
One app: what it is and its callable tools (name, action_type, what it does) -- the run_read_tool / run_write_tool ``function`` names; full=true gives the raw record with the whole manifest (PII-masked).
fullapp_id必填Run Read Tool
Run a READ-only tool of a deployed app (refuses write/destructive). ``function`` is the tool's name as get_app lists it (``tool`` is taken as the same).
argstoolapp_id必填functionRun Write Tool
Run a WRITE or DESTRUCTIVE tool of a deployed app. Money tools always go through out-of-band panel approval (never terminal consent or autopilot): re-run this tool after approving in the panel to complete. Write runs directly; destructive requires human consent (elicitation) or session autopilot; read tools are refused (use run_read_tool).
argstoolapp_id必填functionUpload Local File
Send a file from THIS machine into Imperal and get its ids back. Read the file straight off disk -- never paste its bytes into a tool call, that is truncated long before it reaches the gateway. Returns {file_id, document_id, filename, size_bytes, status}. To then PLACE that file into any extension (a task attachment, an envelope, a post), call run_write_tool with the sink's own file argument set to {"document_id": <document_id>}: the gateway swaps the reference for the real bytes on the way in, so the file never travels through this conversation.
namepath必填Orient on Task
One-call orientation for a task: repo profile + top ranked symbols/snippets from the code graph in Imperal's vault. Call FIRST instead of scanning files blind. `target`: local (default), ssh:<connection_id> or host:<alias> with `root` = the repo path there.
krootquery必填targetRepository Profile
Structured profile of the repository (languages, file count, the most-used definitions) from the code graph.
roottargetSearch Code Graph
Search the code graph: exact names, words and meaning (each hit says how sure it is). Prefer over grep/find.
kkindrootquery必填targetpath_globCode File Outline
Tree-sitter structural map of a source file (classes, functions, methods, major blocks with exact line ranges). Call before reading large files.
path必填roottargetRead Symbol or Span
Read ONE symbol (function, class, Class.method, block name) or line range ('L120-180') from a file without loading the whole file.
name必填path必填roottargetCall Graph Slice
Return definition locations, signatures, direct callers, and callees for a batch of symbols from the code graph.
rootdepthtargetsymbols必填Contract Slice
Return the endpoints and route links across the user's repos, plus the given symbols with their callers.
roottargetsymbols必填Impact of Change
Given symbols you plan to modify, return the files and call sites that depend on them (code first, tests after, uses inside the same file listed apart). Bounded to the first entries with their totals unless full=true.
fullroottargetsymbols必填Task and Plan
Declare what you were asked and your plan (items: {content, status: pending|in_progress|completed}) -- the kernel's frame holds you to it: an item is proven only by what the kernel measured.
goal必填rootitemsFrame
The kernel's step frame for your work (the same frame a Webbee step gets): your task and plan with what is proven, the code around your focus from the exact graph, what your change reaches, the world, your path. Call it FIRST -- at the start and after each change -- before your shell's own search and read tools.
roottargetGrep Code
An exact text (or regex) inside the code -- a string in a function body the symbol search does not index. `target`: local (default), ssh:<connection_id> or host:<alias> with `root` = the repo path there.
krootregextargetpattern必填path_globState Lens
What the kernel holds for your session, by section (law, plan, reality, memory, conversation, path) -- where the frame's counted lines point. ``conversation``: another session of yours working now (an id live_sessions names, e.g. Webbee's) -- its state, its running turn's steps included.
focusoffsetsectionconversationRecall
A past request or answer whole (ref = A<seq> / U<seq> / last_answers / all) -- of your session, or of another conversation of yours by its id (``conversation``, as search_history names it).
nref必填offsetconversationSearch History
Your past conversations that hold ``query`` -- Webbee, the panel, Telegram, other shells' sessions; each hit names its conversation and message, and recall(ref, conversation=...) opens it whole. Nothing of another conversation enters your frame by itself: ask here.
limitquery必填Live Sessions
The user's OTHER sessions active in the last ``minutes`` -- Webbee in a terminal, another shell through imperal-mcp, the panel, Telegram: each with its surface, when it last moved, and its last request, steps and answer, and the newest steps of a turn still running; recall(ref, conversation=...) opens any message whole, state_lens(conversation=...) its state. Read-only, on request: nothing of another session enters your frame by itself.
limitminutesMessage Session
Write to another session of the user that is working now (``live_sessions`` names them -- Webbee in a terminal, another shell): a finding to check, a question, what you are doing so you do not both do it. It reads your words as an AGENT's, never the user's: a message approves nothing and changes no task -- decisions and releases stay the user's. Its answer comes back in your frame as an AGENT MESSAGE. The user sees both.
text必填conversation必填Vault Log Read
An output the kernel kept in the vault (ref = vault://logs/...), paged or grepped.
ref必填greplimitoffsetCheck Syntax (Tree-sitter)
Fast local tree-sitter syntax validation of a source file after editing.
path必填rootWorkspace Coding Context
Project file tree and git status snapshot (respecting .gitignore and pruning heavy build/vendor directories).
rootShadowGit Checkpoint
Capture an instant, invisible ShadowGit snapshot of the workspace without touching the user's real .git history.
rootlabelShadowGit Checkpoint Diff
Show a unified diff between the current workspace state and a ShadowGit checkpoint.
rootpathstargetShadowGit Checkpoint Rollback
Restore the workspace to a previous ShadowGit checkpoint (an auto-safety snapshot is taken first).
roottargetContext Compression Telemetry
Return measured characters and lines returned vs. full-file baseline in this session.
无需输入参数。
Recall Cross-Surface Cloud Memory
Retrieve relevant user directives, preferences, and repository notes from Imperal Cloud Memory across Webbee, Telegram, and the Panel.
limitquery必填include_resolvedinclude_user_factsinclude_repo_memoryRemember Durable User Fact / Directive
Persist a durable user fact, architectural decision, or standing directive to Imperal Cloud Memory (shared across all surfaces).
fact必填tagsscopecategorySave Durable Repository Note
Save a durable repository convention or architectural note to Imperal Cloud Memory.
note必填reporootcitations已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
pipx install "imperal-mcp[code]" && imperal-mcp login && imperal-mcp setupWITHOUT the exoskeleton 1. cat service.py (1,800 lines) -> 72,000 chars dumped into context 2. grep -rn "process_order" . -> 140 noisy matches 3. read 3 more files to trace callers -> +95,000 chars burned 4. edit a shared function blind -> 2 callers broken, a syntax error left behind 5. "I also updated retry_backoff()" -> that function doesn't exist 6. "Done, tests pass!" -> it never ran them 7. open Cursor tomorrow -> total amnesia
WITH the exoskeleton 1. frame -> the task, what is proven, the code around your focus, the world 2. read_symbol("service.py", "Order.run") -> only the 28 lines that matter 3. impact_of_change(["Order.run"]) -> every caller, before you touch a line 4. checkpoint("before-refactor") -> undo in one call if it goes wrong 5. task(goal, items) -> an item closes only when the kernel saw the proof 6. "I also updated retry_backoff()" -> held back: no file it read holds that name 7. tomorrow, any tool -> recall: the whole history is thereKERNEL FACTS: your answer states what the kernel did not see happen:- `retry_backoff` -- no file this task read and no output it got contains this nameCorrect the answer to the facts, or do the missing work first.# 1. Install (Python 3.7 - 3.14; the code map included) -- quotes required in zshpipx install "imperal-mcp[code]"# or: uv tool install "imperal-mcp[code]"# or: pip install "imperal-mcp[code]" only INSIDE a virtual environment: a bare `pip install` into the system# Python is refused on Debian 12+/Ubuntu 23.04+/Homebrew (error: externally-managed-environment)# no pipx? macOS: brew install pipx · Debian/Ubuntu: sudo apt install pipx · then: pipx ensurepath
# 2. Sign in to Imperal Cloud (memory, the kernel's frame, apps)imperal-mcp login
# 3. Wire every shell found on this machine: server + hooks + protocolimperal-mcp setup # Claude Code, Codex, Antigravity CLI, Gemini CLIimperal-mcp claude-setup --with-hooksclaude mcp add imperal -- imperal-mcp{ "mcpServers": { "imperal": { "command": "imperal-mcp", "args": [], "env": { "IMPERAL_WORKSPACE": "/absolute/path/to/your/repo" } } }}imperal-mcp # Start the MCP server over stdioimperal-mcp login # Sign in via browser (device code + PKCE); --no-browser prints the URLimperal-mcp logout # Revoke the refresh token and delete local credentialsimperal-mcp setup [shells] # Wire claude | codex | antigravity | gemini (default: the ones found); --remove undoes itimperal-mcp claude-setup # Configure .mcp.json and CLAUDE.md for one project (--workspace, --with-hooks)imperal-mcp install-hooks # Install the Claude Code PostToolUse syntax-check hookimperal-mcp hook <event> # Run a hook event: session-start | prompt | post-tool | stop (JSON on stdin)imperal-mcp status # Workspace readiness and index profileimperal-mcp watch # Messages from your other agents, one line each, as they arrive (for a shell monitor)